How do you find all pods that run on a master node?

Experience Level: Medior
Tags: Kubernetes

Answer

Run the following command to find a master node:

kubectl get node|grep master

Copy the node name and run the following command:

kubectl get pod -o wide|grep your-master-node-name
Kubernetes Certified Application Developer (CKAD) preparation
Kubernetes Certified Application Developer (CKAD) preparation

Are you learning Kubernetes ? Try our test we designed to help you progress faster.

Test yourself
Kubernetes
Kubernetes

Are you learning Kubernetes ? Try our test we designed to help you progress faster.

Test yourself
25 Kubernetes questions that will help you get certified and become more efficient with K8s
25 Kubernetes questions that will help you get certified and become more efficient with K8s

Are you learning Kubernetes ? Try our test we designed to help you progress faster.

Test yourself