Kubernetes — Operations & Monitoring
Kubernetes
Nodes
Look at the status of a node…
- …debug strange behaviour of pods
- …collect debug & log information
# list all nodes
kubectl get nodes
# list pods on a node, and resource utilization
kubectl describe node $node_name
crictl
crictl
1 command-line interface
- …for CRI-compatible container run-times…
- …inspect & debug containers on a Kubernetes node
# list all pods
crictl pods
crictl pods --name $pod_name
crictl pods --namespace $namespace
# list containers
crictl ps -a
# list containers in a pod
crictl ps --pod $pod_id
# list all local container images
crictl images
# interactive shell in a container
crictl exec -it $container_id sh
# print container logs
crictl logs $container_id
# follow container logs
crictl logs -f $container_id