skip to Main Content

How to ssh into Kubernetes pod

kubectl exec -it <podname> -- sh

To get a list of running pods in the current namespace:

kubectl get pods

To ssh into a specific container:

kubectl exec -it <podName> -c <containerName> -- sh

I occasionally blog about programming (.NET, Node.js, Java, PowerShell, React, Angular, JavaScript, etc), gadgets, etc. Follow me on Twitter for tips on those same topics. You can also find me on GitHub.

See About for more info.

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top