A Comprehensive Guide to Validating Kubernetes Cluster Installed using Kubeadm

Introduction

When setting up a Kubernetes cluster using Kubeadm, it’s essential to validate the installation to ensure everything is functioning correctly. In this blog post, we will guide you through the steps to Validating Kubernetes Cluster Installed using Kubeadm and Kubectl.

Learn how to validate your Kubernetes cluster installation using Kubeadm and ensure smooth operations. Follow our step-by-step guide for easy validation.

You have Installed Kubernetes using Kubeadm on Ubuntu: A Step-by-Step Guide

Validating Kubernetes Cluster Installed using Kubeadm: Step-by-Step Guide

Validating CMD Tools: Kubeadm & Kubectl

First, let’s check the versions of Kubeadm and Kubectl to ensure they match your cluster setup.

Checking “kubeadm” version

kubeadm version
Validating Kubernetes Cluster Installed using Kubeadm

Checking “kubectl” version

kubectl version
Checking "kubectl" version

Make sure the versions of Kubeadm and Kubectl are compatible with your Kubernetes cluster.

Validating Cluster Nodes

Next, we need to ensure that all nodes in the cluster, including both Master and Worker nodes, are in the “Ready” state.

To check the status of all nodes:

kubectl get nodes
kubectl get nodes -o wide

This command will display a list of all nodes in the cluster along with their status. Ensure that all nodes are marked as “Ready.”

Validating Kubernetes Components

It’s crucial to verify that all Kubernetes components on the Master node are running correctly.

To check the status of Kubernetes components:

kubectl get pods -n kube-system
kubectl get pods -n kube-system -o wide

This command will show the status of various Kubernetes components in the kube-system namespace. Ensure that all components are in the “Running” state.

Validating Services: Docker & Kubelet

To ensure the proper functioning of your cluster, we need to validate the services Docker and Kubelet on all nodes.

Checking Docker service status

systemctl status docker

This command will display the status of the Docker service. Ensure that it is “Active” and running without any errors.

Checking Kubelet service status

systemctl status kubelet

This command will show the status of the Kubelet service. Verify that it is “Active” and running correctly.

Deploying Test Deployment

To further validate your cluster, let’s deploy a sample Nginx deployment and check its status.

Deploying the sample “nginx” deployment:

kubectl apply -f https://k8s.io/examples/controllers/nginx-deployment.yaml

This command will create the Nginx deployment in your cluster.

Validate the deployment:

kubectl get deploy
kubectl get deploy -o wide

These commands will display the status of the Nginx deployment, including the number of replicas and the desired and current states.

Check if the pods are in the “Running” state:

kubectl get pods
kubectl get pods -o wide

Make sure all pods are running without any errors.

Verify that containers are running on the respective worker nodes:

docker ps

This command will show the running containers on each worker node. Ensure that the Nginx containers are running as expected.

Delete the deployment:

kubectl delete -f https://k8s.io/examples/controllers/nginx-deployment.yaml

This command will delete the Nginx deployment from your cluster.

Conclusion

By following these steps, you can validate your Kubernetes cluster installation using Kubeadm and Kubectl. It’s essential to ensure that all the components, services, and deployments are running correctly to have a reliable and stable Kubernetes environment. I hope will this your helpful. Thank you for reading the DevopsRoles page!

About HuuPV

My name is Huu. I love technology and especially Devops Skill such as Docker, vagrant, git so forth. I likes open-sources. so I created DevopsRoles.com site to share the knowledge that I have learned. My Job: IT system administrator. Hobbies: summoners war game, gossip.
View all posts by HuuPV →

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.