This post will help you to understand the Kubernetes architecture in detail. In the last post, we have covered the below topics.
1. Kubernetes Introduction2. Kubernetes Architecture
3. Kubernetes Basic Commands
4. Kubernetes Concepts
5. Simplified guide to Deploy Application on Kubernetes
If you are interested in learning, Request you to go through the below recommended tutorial.
DevOps Full Course Tutorial for Beginners - DevOps Free Training Online
Docker Full Course Tutorial for Beginners - Docker Free Training Online
Kubernetes Full Course Tutorial for Beginners - Kubernetes Free Training Online
Ansible Full Course Tutorial for Beginners - Ansible Free Training Online
Openstack Full Course Tutorial for Beginners - Openstack Free Training Online
Lets get started.
Introduction to Kubernetes Architecture
Kubernetes architecture is a simple master and slave model. Kubernetes master node is the main node that is responsible for managing the entire kubernetes cluster and its components. Kubernetes slave nodes are also known as worker nodes, These Kubernetes workers nodes are the nodes where all applications will be deployed to run the applications. Kubernetes master node will completely control the state of the entire kubernetes cluster, that includes scheduling the containers on kubernetes worker nodes, scaling applications to make sure the high availability of the applications.
Kubernetes Architecture Components
Kubernetes architecture consists of multiple components that work together to manage the containerized applications running on the kubernetes cluster. Here are the list of main key components of the Kubernetes architecture:
Master Node: Kubernetes master node is the main node that is responsible for managing the kubernetes cluster and its components. It runs Kubernetes API server that is the central control plane for the entire kubernetes cluster. It also runs etcd database that will store the configuration data for the entire kubernetes cluster.
Worker Node: Kubernetes worker nodes are the slave nodes that is responsible for running the applications. It runs kubelet agent in every worker nodes and that will communicate with kubernetes master node to send and receive instructions.
Pods: Kubernetes Pods are the very smallest deployable units in Kubernetes cluster. It will contain one or more containers inside the pods and it will share same network namespace and storage volumes. Kubernetes Pods are scheduled by kubernetes worker nodes on each worker nodes.
ReplicaSets: ReplicaSets is one of the other main component that maintain the specified number of identical pods running all the time. If any pod fails or got deleted for any reason, ReplicaSet will make sure to schedule new pod and replace the failed or removed pods.
Services: Kubernetes Services will create IP address and DNS name for Kubernetes pods. That will act as load balancer, routing traffic to the respective pods based on service selectors.
Deployments: Kubernetes Deployments will manage rollout and rollback of changes to the applications deployed on the kubernetes cluster. They ensure that the desired number of replicas are running and that new replicas are created before old ones are deleted.
Kubernetes Architecture Commands and Examples
Here are some of the most common kubernetes commands and examples for working with the Kubernetes architecture:
kubectl get nodes: This command lists all the worker nodes in the cluster.
kubectl get pods: This command lists all the pods running in the cluster.
kubectl create deployment myapp --image=myimage: This command creates a deployment with the name myapp and the image myimage.
kubectl scale deployment myapp --replicas=3: This command scales the deployment myapp to three replicas.
kubectl expose deployment myapp --port=80 --target-port=8080: This command exposes the deployment myapp on port 80, routing traffic to port 8080 on the pods.
kubectl delete deployment myapp: This command deletes the deployment myapp.
That's it for this post. Keep practicing and have fun. Leave your comments if any.
Related Searches and Questions asked:
0 Comments