Question

Command to stop and start POD

  • 18 May 2022
  • 1 reply
  • 341 views

Userlevel 5
Badge +11

Hello,

using mtctl start --namespace custA_prod and

          mtctl stop --namespace custA_prod

we can restart the name environment/name space

Is there any command which we can use to restart just a pod instead of whole 

Please suggest.

Best Regards

Pankaj


1 reply

Userlevel 5
Badge +11

Hi @paguin,

 

You might need to use kubectl command to restart a pod

  • Restart a pod

kubectl delete pod pod_name -n namespace_name

or

kubectl scale deployment pod_name  -n  namespace_name --replicas=0

kubectl scale deployment pod_name  -n  namespace_name --replicas=1

kubectl get pods -n namespace_name

 

Thank you

 

Reply