As many of you working with the Kubernetes cluster for deploying your applications and other supporting components. There are a lot of commands which you need to learn or remember when you are managing the cluster.
Here I’m trying to provide the list of the commands which I’m using to manage the cluster. So let’s go through that,
The above command will list all the namespaces which are available in the Kubernetes cluster.
The above command will list all the pods in the default namespace
List the pods on a specific namespace
Here test the namespace name, and it will list all the pods which are running in the test namespace
List the nodes
kubectl get nodes
This will list all the worker nodes joined with cluster
Get detailed information about nodes
The above commands give the node IP hostname etc
Get into the running pod
To get into the pod we need the pod name first, got get pod name first
Copy the pod name
Replace the pod name with the expected name
Get the pod logs
First get the pod name, once you got name
This will give the details of the running log of the pod.
Get more detail about the pod
More information about the pod is required when you need to troubleshoot or when you need to get more information about the pod.
Get more details about the node
© 2021, Techrunnr. All rights reserved.