Everyday task Kubernetes cheat sheet
My own kubernetes cheat sheet for everyday admin tasks
Here is my Kubernetes kubectl cheat sheet that I use everyday as a reference. There are some many commands that form part of the toolkit for managing a Kubernetes cluster on a day to day basis. Enjoy!!
list all pods in nodes across names spaces.
kubectl get pod --all-namespaces
Describe a node to see its configuration
## get a list of nodes first
kubectl get nodes
### describe the required node
kubectl describe nodes <node name>
Describing a pod will showing its configuration and it events.
## get the pods name
kubectl get pod --all-namespaces
## describe pod to see its configuration
kubectl describe pod <pod name>
Use exec to connect to a pod and execute command locally on the pod. This can be usefule for troubleshooting the pod itself.
## get the pods name
kubectl get pod --all-namespaces
## this example is for exec'ing to a ribbitmq pod
kubectl exec-it my-rabbitmq-0 -- /bin/bash