How do I restart a Kubernetes pod?

Purpose

Perform this procedure to restart a Kubernetes pod in an NSP cluster; for example, as directed by technical support during a maintenance operation.

Steps
 

Log in as the root or NSP admin user on the NSP cluster host.


Open a console window.


Enter the following to list the pod that you need to restart:

kubectl get pods -A | grep string

where string is part of the pod name

The pod instance names that include string are listed.


Enter the following:

kubectl delete pod pod_name -n $(kubectl get pods -A | awk '/pod_name/ {print $1;exit}') ↵

where pod_name is the name of the pod to restart

The pod is deleted and recreated.


Close the console window.

End of steps