Skip to main content

Posts

Showing posts from October, 2020

How to issue shell commands from a pod

I was trying to troubleshoot the network connectivity between a K8s cluster and a VM in GCP, at first i just SSHed into the nodes and then trying to ssh into an external VM, it all worked smoothly but still had problems with the app trying to connect to the external VM, so , the next step was to connect to the pod and start a session: kubectl exec -it --namespace <namespace> <pod> --container <containername> -- /bin/bash from there i was able to issue a command to ssh into the external vm.