21.4 Restarting the Azure Kubernetes cluster

Perform the following steps to ensure that all the IDM components shutdown gracefully:

  1. Log in to the Azure portal.

  2. Go to your Kubernetes cluster.

  3. Under Kubernetes resources, Click Workloads.

  4. Go to Deployments tab, Click Filter by namespace drop-down list, select your namespace.

  5. Select the deployment (s), Click Delete.

  6. Go to Pods tab, Click Filter by namespace drop-down list, select your namespace.

  7. Click Refresh, to check the component-pod(s) are completely removed.

  8. Go to Stateful sets tab, click Filter by namespace drop-down list, select your namespace.

  9. Select the Stateful set (s), Click Delete.

  10. Again, Go to Pods tab, Click Filter by namespace drop-down list, select your namespace.

  11. Click Refresh, to check the components are completely removed.

  12. Go to Overview Under Kubernetes resources, Click Stop and wait for some time.

  13. Once the cluster is stopped completely, then click Start.

  14. In Azure CLI, run the following command to restart Nginx-ingress controller:

    helm upgrade nginx-ingress ingress-nginx/ingress-nginx --namespace <your namespace> --set controller.replicaCount=1 --set controller.service.loadBalancerIP=<Public IP address assigned to load balancer> --set controller.service.annotations."service\.beta\.kubernetes\.io/azure-dns-label-name"=<LoadBalancerName>

    For example

    helm upgrade nginx-ingress ingress-nginx/ingress-nginx --namespace idm --set controller.replicaCount=1 --set controller.service.loadBalancerIP=192.168.0.1 --set controller.service.annotations."service\.beta\.kubernetes\.io/azure-dns-label-name"=identitymanager

  15. Run the following command to restart the remaining components:

    helm upgrade identity-manager helm_charts/identity-manager-1.3.0.tgz --namespace <namespace> -f values.yaml

    For example

    helm upgrade identity-manager helm_charts/identity-manager-1.3.0.tgz --namespace idm -f values.yaml

  16. Wait till all the pods are in ready state.

    To check the current status of the pods run the following command:

    kubectl get pods --watch -n <namespace>
  17. Run the following command to restart the engine service:

    kubectl rollout restart -n <namespace> statefulset/identityengine

    For example

    kubectl rollout restart -n idm statefulset/identityengine

  18. Repeat Step 16.