Troubleshooting
See my previous article : here.
POD and Container Introspection
List the current pods
kubectl get pods
Describe pod
kubectl describe pod <name>
Delete pod
kubectl delete pod <name>
Watch nodes continuously
kubectl get nodes -w
Cluster Introspection
Get cluster information
kubectl cluster-info
Get the configuration
kubectl config view
Get information on a node
kubectl describe node <node>
Debugging
Get logs from container
kubectl logs my-pod -c my-container
Show metrics from nodes
kubectl top node
Show metrics for pods
kubectl top pod
Quick Commands
Launch a POD
kubect run <name> --image=<image-name>
Create a ressource using a yaml file
kubectl create -f something.yml
Scale a replication controller
kubectl scale --replicats=<count> rc <name>
Drain a node
kubectl drain <n> --force --ignore-daemonsets
Create namespace
kubectl create ns <name>