Under the root path of the repository, run the following commands:
$ docker build -t <Docker_ID>/idsrv4-auth -f docker\auth.dockerfile .
$ docker build -t <Docker_ID>/idsrv4-backend -f docker\backend.dockerfile .
$ docker push <Docker_ID>/idsrv4-auth:latest
$ docker push <Docker_ID>/idsrv4-backend:latestOr use Github Action.
$ kubectl create namespace idsrv-demoOr use the yaml file:
$ kubectl apply -f kubernetes-namespace.yaml
namespace/idsrv-demo created$ kubectl create secret docker-registry <secret_name> --docker-server=<docker_registry_host> --docker-username=<user_name> --docker-password=<password> --docker-email=<email_addr> --namespace idsrv-demo$ cd kubernetes
$ kubectl create secret generic secret-appsettings-auth --from-file=./artifects/auth/appsettings.Kubernetes.json --namespace idsrv-demo
$ kubectl create secret generic secret-appsettings-backend --from-file=./artifects/backend/appsettings.Kubernetes.json --namespace idsrv-demo
$ kubectl create secret generic secret-js-appconfig-backend --from-file=./artifects/backend/app-config.js --namespace idsrv-demo
$ kubectl create secret generic secret-appsettings-health --from-file=./artifects/health/appsettings.Kubernetes.json --namespace idsrv-demoTo edit the secret (base64 encoded string):
$ kubectl edit secrets <secret_name>To delete the secret:
$ kubectl get secrets
NAME TYPE DATA AGE
secret-appsettings-auth Opaque 1 7h58m
secret-appsettings-backend Opaque 1 7h57m
secret-js-appconfig-backend Opaque 1 7h57m
$ kubectl delete secrets secret-appsettings-auth -n idsrv-demo
$ kubectl delete secrets secret-appsettings-backend -n idsrv-demo
$ kubectl delete secrets secret-js-appconfig-backend -n idsrv-demo$ cd kubernetes
$ kubectl apply -f kubernetes-idsrv-deployments.yml --namespace idsrv-demo$ kubectl delete all --all --namespace idsrv-demoor delete certain resources by type,
$ kubectl delete deploy,service,pod,pvc,pv --all --namespace idsrv-demo$ kubectl delete namespace idsrv-demo$ kubectl get events --all-namespaces --sort-by='.metadata.creationTimestamp'
$ kubectl get events --namespace idsrv-demo --sort-by='.metadata.creationTimestamp'or
$ kubectl logs <pod_name> [-c <container_name>] --namespace idsrv-demo
$ kubectl describe pods <pod_name> --namespace idsrv-demoUse the following command to enter the container,
$ kubectl exec -it <pod_name> -- bash