Back
No there is not set command for restarting a container inside a pod through kubectl but what you can try is killing the container, when you do this your pod fails and Kubernetes automatically recreates is, to do this you need to do is run the command mentioned below
kubectl exec POD_NAME -c CONTAINER_NAME /sbin/killall5
It seems like you are new to Kubernetes, I just want to give you advice before I leave, If you are thinking about making a career in this field and Kubernetes certification training helps a lot while working in a production environment so if you have resources please go for it! anyway I hope I resolved your issue
31k questions
32.8k answers
501 comments
693 users