Best Practices - Shut Down a VM
It is important to stop the microk8s service before you shut down a VM used to deploy connectors. Once you start the VM, ensure you start the microk8s service again.
-
Execute the following commands to stop the microk8s service:
root@lubuntu-core:~# kubectl get pods -n cwpp NAME READY STATUS RESTARTS AGE connector-ztna-5454cd865c-6hhdk 1/1 Running 0 6d21h cwpp-cicd-56d6dcc9b7-dl5cq 1/1 Running 0 6d21h cwpp-connector-7f8kj 1/1 Running 0 6d21h cwpp-logging-4xkzx 1/1 Running 0 6d21h cwpp-pop-manager-1642047000-jzqxw 0/1 Completed 0 12m cwpp-pop-manager-1642047300-mvbwz 0/1 Completed 0 7m10s cwpp-pop-manager-1642047600-fhtmc 0/1 Completed 0 2m10s root@lubuntu-core:~# root@lubuntu-core:~# microk8s stop Stopped root@lubuntu-core:~# microk8s status microk8s is not running. Use microk8s inspect for a deeper inspection
-
Shut down and start the VM or reboot the VM.
-
Execute the following commands to start the microk8s service:
root@lubuntu-core:~# microk8s start Started. Enabling pod scheduling node/lubuntu-core already uncordoned root@lubuntu-core:~# kubectl get pods -n cwpp NAME READY STATUS RESTARTS AGE connector-ztna-5454cd865c-6hhdk 1/1 Running 1 6d21h cwpp-cicd-56d6dcc9b7-dl5cq 1/1 Running 1 6d21h cwpp-connector-7f8kj 1/1 Running 1 6d21h cwpp-logging-4xkzx 1/1 Running 1 6d21h cwpp-pop-manager-1642047000-jzqxw 0/1 Completed 0 14m cwpp-pop-manager-1642047300-mvbwz 0/1 Completed 0 9m27s cwpp-pop-manager-1642047600-fhtmc 0/1 Completed 0 4m27s