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
 
1 

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


2 

Open a console window.


3 

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.


4 

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.


5 

Close the console window.

End of steps