CKS simulator
Useful kubectl commands for the CKS simulator exam environment, including listing pods with their node assignments and container images.
The following command lists all pods across all namespaces, showing which node each pod is scheduled on and what container images it uses. The output is sorted and filtered to show only pods running on cluster1-worker1.
1
k get pods -A -o jsonpath='{range .items[*]}{.spec.nodeName}{"\t\t\t\t"}{.spec.containers[*].image}{"\t"}{"\n"}{end}' | sort | grep cluster1-worker1
This post is licensed under CC BY 4.0 by the author.