K8s Basics



List all the nodes in the cluster.
Use the following command to list the nodes in your cluster:
kubectl get nodes

List all the pods in all namespaces.
Use the following command to list the pods in all namespaces:
kubectl get pods --all-namespaces

List all the namespaces in the cluster.
Use the following command to list all the namespaces in the cluster:
kubectl get namespaces

Check to see if there are any pods running in the default namespace.
Use the following command to list the pods in the default namespace:
kubectl get pods

Find the IP address of the API server running on the master node.
Use the following command to find the IP address of the API server:
kubectl get pods --all-namespaces -o wide

See if there are any deployments in this cluster.
Use the following command to check for any deployments in the cluster:
kubectl get deployments

Find the label applied to the etcd pod on the master node.
Use the following command to view the label on the etcd pod:
kubectl get pods --all-namespaces --show-labels -o wide

No comments:

Post a Comment

Certified Kubernetes Administrator Preparation

Kubernetes core concepts: Masters -  1 or more Workers -  o or more Master have API server, Scheduler,  controller manager and etcd W...