Kubernetes Introduction | Explained Kubernetes Concepts

Kubernetes Introduction

This post will introduce you to Kubernetes and explore its core concepts, architecture, and basic commands. By the end of this post, you will have a better understanding of Kubernetes and be ready to start using it.

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

Kubernetes Introduction

Kubernetes has popularly increased as a tool for managing and deploying containerized applications. Kubernetes, is also known as K8s, It is an open-source platform that will help us to automate deployment, scaling, and management of containerized applications.

It was originally developed by Google and is now maintained by the Cloud Native Computing Foundation (CNCF).

Kubernetes Architecture

Kubernetes follows a client-server architecture where user can interact with Kubernetes API server to deploy, manage and monitor the containers. Kubernetes cluster consists of the following main components:

  1. Master Node: Kubernetes master node is fully responsible for managing the Kubernetes cluster. It includes API server, scheduler, etcd, and controller manager.

  2. Worker Node: Kubernetes worker nodes are the slave nodes or member nodes in the kubernetes clutser, where containers are deployed to run the applications. It includes kubelet, container runtime and kube-proxy.

  3. etcd: etcd is also one of the main component, it is a distributed key-value store used by the Kubernetes master nodes to store important configuration data.

Kubernetes Basic Commands

Let's see  some Kubernetes basic commands that you will need to know, before move into understand the Kubernetes concepts and Kubernetes architecture.

  1. kubectl version: This command will show the version of kubectl that is installed in the kubernetes cluster along with Kubernetes API and Kubernetes client libraries.

  2. kubectl get nodes: This command will show the list of worker nodes connected with Kubernetes cluster.

  3. kubectl get pods: This command will show the list of running pods in the Kubernetes cluster from default namespace.

  4. kubectl create deployment: This command is used to create deployment resources in Kubernetes.

  5. kubectl delete deployment: This command is used to delete deployment resources in Kubernetes.

Kubernetes Concepts

Lets understand the concepts of Kubernetes.

  1. Pods: A pod is the only smallest unit of deployment in Kubernetes. It is a logical host for one or more containers. All containers in a pod share the same network namespace and can communicate with each other using localhost.

  2. ReplicaSets: A ReplicaSet is used to ensure that a specified number of replicas of a pod are running at any given time. If a pod fails, the ReplicaSet creates a new pod to replace it.

  3. Deployments: A Deployment manages the deployment and scaling of a set of ReplicaSets. It allows for rolling updates, rollbacks, and scaling of applications.

  4. Services: A Service is an abstraction that defines a logical set of pods and a policy by which to access them.

Simplified guide to Deploy Application on Kubernetes

Hope you had good understanding of Kubernetes concepts and basic commands, let's go through the simplified step-by-step procedure of how to deploy application on Kubernetes.

  1. Create Docker Image: The first step is to create a Docker image of your application. You can use any language or framework to create your application.

  2. Create Kubernetes Deployment: Create Kubernetes Deployment using kubectl create deployment command. This command creates deployment with single replicas.

  3. Scale Deployment: To scale deployment, use kubectl scale command. This command allow us to increase (scale up) or decrease (scale down) the number of replicas.

  4. Expose Service: To expose service, use kubectl expose deployment command. This command allow us to create service and exposes the deployment to the outside world.

  5. Access the deployed Application: To access the application deployed on kubernetes cluster, use the IP address of the service created in the previous step, kubectl get svc command will show the IP address created for the service.

That's it for this post. Keep practicing and have fun. Leave your comments if any.

Related Searches and Questions asked:

  • Which is Better Ubuntu or Linux Mint?
  • Most Demanding AI tools in 2023
  • Best Linux Desktop Environments for Productivity
  • Top 5 Best Programming Languages in 2023

  • Post a Comment

    0 Comments