Problem
User wants to restart pod without reseting to default pods settings. for example making changes that requires reload for several applications inside the pods
Solution
You can use some commands available inside the pods to restart it
kubectl exec POD_NAME -c CONTAINER_NAME /sbin/killall5
kubectl exec -it [POD_NAME] -c [CONTAINER_NAME] -- /bin/sh -c "kill 1"
kubectl exec -it [POD_NAME] -c [CONTAINER_NAME] -- /bin/sh -c "/sbin/reboot"
Example
kubectl exec prom-operator-grafana-6848c59c99-zn7hq -c grafana /sbin/reboot -n monitoring
We do this for a living.
Kubernetes, DevOps and platform engineering, delivered in days — not another weekend lost to a stack trace.
Start a project →