Kubernetes 101 : Some practical and useful Kubernetes commands - JSONPATH, --field-selector, ... -
To see the running pods in a specific namespace, we could add the "-n namespace_name" parameter.
To see the pods that are running on a particular node, we could use the below command:
To display the pods in a particular namespace, we could use:
To get the Yaml configuration file of a pod, so that we could alter it and re-apply the changes, we could use the below command:
Pods, when they fail, they get restarted. We could list the pods and their restart attempts using the below command:
To list all the worker nodes, we list all the nodes except the ones with the "node-role.kubernetes.io/master" label which is reserved for the master nodes:
Then we can apply the above JASONPATH template to our search as follows:
Comments