k8s reboot pod and vm
to reboot you need to kill the pod/vmi and recreate it, thereby all its states will be lost.
1 | kubectl delete pod <pod_name> |
for vmi there is an option called soft-reboot
which is absent in pods. however the vm runner pod must not exit.
1 | virtctl soft-reboot <vmi_name> |
for pod you you can scale down the replicas of deployment (recommended), or kill the pod directly.
1 | kubectl scale deployment <deployment_name> --replicas=0 |
for vm you are supposed to use virtctl
1 | virtctl start <vm_name> |