Kubernetes Complete Cheat Sheet
Kubernetes Complete Cheat Sheet
Namespaces kubectl get namespaces Displays all available namespaces in the cluster
Pods kubectl get pods Lists all pods in the current namespace
Pods kubectl get pods -n <namespace> Lists all pods in a specified namespace
Pods kubectl describe pod <pod-name> Displays detailed information about a specific pod
Deployments kubectl get deployments Lists all deployments in the current namespace
Deployments kubectl rollout status deployment/<name> Monitors the rollout status of a deployment
Deployments kubectl rollout undo deployment/<name> Rolls back the last deployment
Services kubectl get services Lists all services in the current namespace
Logs kubectl logs <pod-name> -c <container-name> Displays logs of a specific container in a pod
Exec kubectl exec -it <pod-name> -- /bin/bash Accesses the shell of a running pod
Nodes kubectl describe node <node-name> Displays detailed info about a specific node
Resource Usage kubectl top nodes Shows CPU and memory usage for nodes
Resource Usage kubectl top pods Shows CPU and memory usage for pods
Persistent Volumes kubectl get pvc Lists all Persistent Volume Claims