kubectl exec into container of a multi container pod

Ah once more detailed reading the man page of kubectl exec :

Flags:

  -c, --container="": Container name. If omitted, the first container in the pod will be chosen
  -p, --pod="": Pod name
  -i, --stdin[=false]: Pass stdin to the container
  -t, --tty[=false]: Stdin is a TTY

So i just used the container name from my manifest.yaml and it worked like charm.

Name of the container: ipengine-net-benchmark-iperf-server

kubectl exec -ti ipengine-net-benchmark-488656591-gjrpc -c ipengine-net-benchmark-iperf-server /bin/bash

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)