kubectl
Documentation
https://kubernetes.io/docs/reference/kubectl/cheatsheet/
tmux setenv NAMESPACE <namespace>
tmux setenv POD1 <pod-1-name>
tmux setenv POD2 <pod-2-name>
tmux setenv POD3 <pod-3-name>
tmux setenv SEC1 <secret-name>
Namespace
Node
list
Pods
list
kubectl get pods -n $NAMESPACE
kubectl get pods -n $NAMESPACE -o wide
kubectl get pods -n $NAMESPACE -o wide --show-labels
kubectl describe pods $POD1 -n $NAMESPACE
kubectl describe pods $POD2 -n $NAMESPACE
kubectl describe pods $POD3 -n $NAMESPACE
kubectl get pods -n $NAMESPACE -o jsonpath='{range .items[*]}{"\nPod: "}{.metadata.name}{" ==> Containers: "}{range .spec.containers[*]}{.image}{" | "}{end}{end}' | sort
kubectl get pods -n $NAMESPACE -o jsonpath='{range .items[*]}{"\nPod: "}{.metadata.name}{" ==> Containers: "}{range .spec.containers[*]}{.name}{" | "}{end}{end}' | sort
kubectl exec --stdin --tty $POD1 -n $NAMESPACE -- /bin/sh
kubectl exec --stdin --tty $POD1 -c <container-name> -n $NAMESPACE -- /bin/sh
Service
Secret
list
details