Last active
September 23, 2022 13:53
-
-
Save rduque1/990f7fcade1a19205f23f13b0ac7e049 to your computer and use it in GitHub Desktop.
Kubernetes
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
# get number of running pods | |
kubectl get -A pods --field-selector=status.phase=Running --output json | jq -j '.items | length' | |
# get number of NOT running pods | |
kubectl get -A pods --field-selector=status.phase!=Running --output json | jq -j '.items | length' | |
# find out why a pod is in pending | |
describe pod -n <namespace> <pod-name> | |
# get a node max number of pods | |
get node vmmts02 -ojsonpath='{.status.capacity.pods}{"\n"}' | |
# scale a deployment | |
kubectl scale -n <namespace> --replicas=1 deployment <deployment-name> | |
# list images | |
k3s crictl images | |
# list containers | |
k3s crictl ps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment