Working with Kubernetes Using kubectl

Use kubectl to Check the Status of Worker Nodes in the Cluster

  • Use kubectl to list all nodes in the cluster

  • Verify the nodes are in the READY state

Get a List of Pods Running in the Cluster

  • Use kubectl to list Pods in all namespaces

  • Verify whether or not these Pods are all up and running

kubectl get pods --all-namespaces

Delete an Existing Pod

  • Delete the Pod named web-frontend

Create a New Pod

  • Create a new Pod called web-frontend

  • Make it run a container with the nginx image

web-frontend.yml

Last updated