Closed jasperf closed 3 years ago
We can using exec
followed by pod name, namespace and container name
kubectl exec -it localweb-5fcbfb587-f7tzh -n smt-local -c nginx -- /bin/bash
bash-5.0# ll
bash: ll: command not found
bash-5.0# ls
bin etc mnt run tmp
dev home opt sbin usr
docker-entrypoint.d lib proc srv var
docker-entrypoint.sh media root sys
bash-5.0# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Need to add details on how to access containers inside pods so we can run commands inside them manually when need be.