Last active
July 30, 2020 16:54
-
-
Save shahabedinh/07b5a41728a8e3797e7c18816b7066a2 to your computer and use it in GitHub Desktop.
To List All Containers in a Pod in Kubernetes Cluster
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### To List All Containers in a Pod in Kubernetes Cluster | |
kubectl get pods <pod_name> -n <namespace> -o jsonpath={.spec.containers[*].name} | |
### Example | |
kubectl get pods ops-manager-0 -n test -o jsonpath={.spec.containers[*].name} | |
mongodb-ops-manager |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment