Wednesday, July 20, 2022

Kuberenetes Introduction - Part 1

 

What is Kubernetes?

  • Kubernetes is an open-source system for automating the deployment, scaling, and management of containerized applications.
  • Kubernetes helps to package and distribute apps using image format and container technologies.
  • It groups containers that make up an application into logical units for easy management and discovery.
  • Kubernetes builds upon 15 years of experience of running production workloads at Google, combined with best-of-breed ideas and practices from the community.
  • Kubernetes Features

    Automatic bin packing

    • Automatically places containers based on their resource requirements and other  constraints, while not sacrificing availability.

    • Mix critical and best-effort workloads in order to drive up utilization and save even more resources.

    Automated rollouts and rollbacks

    • Kubernetes progressively rolls out changes to your application or its configuration,  while monitoring application health to ensure it doesn't kill all your instances at the same time.

    • If something goes wrong, Kubernetes will roll back the change for you.

    • Take advantage of a growing ecosystem of deployment solutions.

    Horizontal scaling

    • Scale your application up and down with a simple command, with a UI, or automatically based on CPU usage.

    Service discovery and load balancing

    • No need to modify your application to use an unfamiliar service discovery mechanism.

    • Kubernetes gives containers their own IP addresses and a single DNS name for a set of containers and can load-balance across them.

    Storage orchestration

    • Automatically mount the storage system of your choice, whether from local storage, a  public cloud provider such as GCP or AWS, or a network storage system such as NFS,  iSCSI, Gluster, Ceph, Cinder, or Flocker.

    Self-healing

    • Restarts containers that fail, replace and reschedule containers when nodes die, kills  containers that don't respond to your user-defined health check, and doesn't advertise  them to clients until they are ready to serve.

    Secret and configuration management

    • Deploy and update secrets and application configuration without rebuilding your image and without exposing secrets in your stack configuration.

    Kubernetes Architecture

    Node Controller/ Master

    • The node controller is a Kubernetes master component that manages various aspects of nodes.

    • The node controller has multiple roles in a node’s life. (1). The first is assigning a CIDR block to the node when it is registered (if the CIDR  assignment is turned on).  (2). The second is keeping the node controller’s internal list of nodes up to date with the cloud provider’s list of available machines. (3).  The third is monitoring the nodes’ health.

    • The services on a Node Controller/Master Node include kube-api, kube-scheduler, kube-controller-manager and etcd.

    Node/Minions

    • A node is a worker machine in Kubernetes, previously known as a minion.

    • A node may be a VM or physical machine, depending on the cluster.

    • Each node has the services necessary to run pods and is managed by the node components.

    • The services on a Node include Docker, kubelet and kube-proxy, CNI.





    Node Controller/Master Components

    Kube-ApiServer

    • The Kubernetes API-server generally validates the configuration data store in ‘Etcd’ and the details of the deployed container that are in agreement.

    • It also provides a RESTful interface to make communication easy.

    Kube-Controller-Manager

    • It is generally responsible for handling the cluster level function such as replication controller.

    • Whenever the desired state of the cluster changes it is written to Etcd and then the controller manager tries to bring up the cluster in the desired state.

    Kube-Schedule Server

    • It is responsible for assigning tasks to nodes/minions in the cluster.

    Etcd

    • It is an open-source key-value store developed by the CoreOs team. Kubernetes uses  ‘Etcd’ to store the configuration data accessed by all nodes (minions and master) in the cluster.

    Node Components

    Kubelet

    • Host-level pod management.

    • It deals with pod specifications that are defined in YAML or JSON format.

    • It is responsible for managing pods and their containers.

    • It is an agent process that runs on each node.

    • Kubelet takes the pod specifications and checks whether the pods are running healthy or not.

    Kube-Proxy

    • Every node in the cluster runs a simple network proxy. Using a proxy node in cluster routes requests to the correct container in a node.

    • Manages the container network (IP addresses and ports) based on the network service manifests received  from the Kubernetes master.

    Docker

    • An API and framework built around Linux Containers (LXC) that allows for the easy management of containers and their images.

    CNI

    • A network overlay that will allow containers to communicate across multiple hosts.



    No comments:

    Post a Comment

    Featured Post

    Ansible Tool Introduction

                                                                                                                                        Next ...