Created
March 24, 2020 12:55
-
-
Save unstppbl/6268e59669ece42c5fce5fc4814b2ef7 to your computer and use it in GitHub Desktop.
Kubectl cmds
This file contains hidden or 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
# list all pods | |
kubectl -n dev get pods | |
# list all config maps (CM) for env vars etc. | |
kubectl -n dev get cm | |
# get logs of pod | |
kubectl -n dev logs -f <pod name> | |
# get content of CM | |
kubectl -n dev get cm <cm name> -o yaml | |
# enter inside of pod | |
kubectl -n dev exec -it <pod name> <command> | |
# list all PersistentVolumes (where VOLUME is hosted) | |
kubectl -n dev get pv | |
kubectl -n dev get pv -o yaml | |
# list all secrets (passwords etc.,). Secrets are stored as base64 encoded | |
kubectl -n dev get secrets | |
kubectl -n dev get secrets <secret> -o yaml | |
# list all Deployments, and Docker version of pods | |
kubectl -n dev get deployments -o wide | |
kubectl -n dev get deployments <deployment> -o yaml | |
# list all Services (ports etc) | |
kubectl -n dev get svc | |
kubectl -n dev get svc <svc> -o yaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment