How to enter docker containers deployed on Google cluster?

12/13/2018

I have deployed my application via docker on Google Kubernetes cluster. I am facing an application error due to which I want to enter inside the container and check a few things. At local, all I had to do was run sudo docker ps and then exec -it into the container.

How can I do that when containers are deployed on a Kubernetes cluster?

-- aviral sanjay
docker
kubernetes

1 Answer

12/13/2018

You need to use kubectl

kubectl get pods
kubectl exec -it pod-container-name -- /bin/bash
-- Edmhs
Source: StackOverflow