Shashikant shah

Wednesday, 17 January 2024

What is Container Orchestration and kubernetes ?

 1.What is Container Orchestration ?

  • Orchestration is not a tools it’s a method or approach used in the management and coordination of complex systems, processes, or services.  Container Orchestration is all about managing the life cycles of containers, especially in large, dynamic environments.

2.Why we used Container Orchestration?

     Container Orchestration can be used to perform lot of tasks, some of them         includes:
  • Provisioning and deployment of containers.
  • AutoScaling :- Scaling up or removing containers to spread application load evenly. (vertical and Horizontal)
  • Platform Independent :- Movement of containers from one host to another if there is a shortage of resources.
  • Load Balancing of service discovery between containers.
  • Health monitoring of containers and hosts.
              Rollback :-  Can go back to previous version.
              Batch execution :- one time, sequential, Parallels.
              Fault Tolerance :- node and pods failure.

3.Container Orchestration Solutions which are available, some of the popular ones include:

  • Kubernetes.
  • Docker Swarm.
  • Apache Mesos.
  • Azure Kubernetes service (AKS as PAAS Platform as a services).
  • Elastic Kubernetes service (AWS EKS as PAAS Platform as a services).
  • Google Kubernetes Engine (GKE).
  • Dokku.
  • opensift.

4.What is Kubernetes ?

  • Kubernetes is a container management system developed in the Google platform. The purpose of Kubernetes is to manage a containerized application in various types of physical, virtual and cloud environments. Google  Kubernetes is a highly flexible container tool to deliver even complex applications, consistently. Applications Run on clusters of hundreds to of individual servers.

5.What is Container?

  • Container separately provide like a isolated workspace we can deployed application and dependencies.
  • Containers isolate the application from accessing the resources as these are VMs.
  • Container is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries.

5.1 There are  many plugin for k8s :-

1.OCI :- Open Container Initiative (dockershim) (1.24  k8s) remove
2.CRI :- Container Runtime Interface
3.CNI :- Container Network Interface
4.CSI :- Container Storage Interface
5.SMI :- Service Mesh Interface
6.CPI :- Cloud Provider Interface



a) What is Open Container Initiative OCI ?

OCI is a specification for container runtimes and image formats. It focuses on defining standards for container formats and runtime specifications to ensure interoperability across different container runtimes.
OCI provides a set of specifications that describe how container images should be structured and how container runtimes should execute and manage containers.

OCI specifications consist of two main components:

Image Specification: Describes the format and contents of a container image. It defines the structure of the filesystem, configuration, and metadata within an image.
Runtime Specification: Describes the configuration and execution of a container. It specifies how a container runtime should create and run a container based on the image.

b)What is Container Runtime Interface CRI ?

The Container Runtime Interface (CRI) is a specification and set of APIs (Application Programming Interfaces) that define the interface between containerD and  Kubernetes.

Kubelet communicates with the container runtime over Unix sockets using the gRPC framework, where kubelet acts as a client and the CRI containerD as the server.

Selecting a container runtime for use with Kubernetes Interfaces.

1.Docker (supported OCI)

2.containerd-CRI (compatible OCI and CRI)

3.rocket(RKT) (compatible OCI and CRI)

4.podman (compatible OCI and CRI)

5.CRI-O (compatible OCI and CRI)

6.Runc (compatible OCI and CRI)

7.Native (compatible OCI and CRI)

8.Frakti (compatible OCI and CRI)

9.Railcar (compatible OCI and CRI)

10.Runv (compatible OCI and CRI)


c) What is Container Network Interface CNI ?

Container Network Interface(CNI) is a specification and library for configuring network interfaces in Linux containers. In Kubernetes, CNI is the standard way to provide networking to pods
The main purpose of CNI is to allow different networking plugins to be used with container runtimes. This allows Kubernetes to be flexible and work with different networking solutions, such as Calico, Flannel, and Weave Net. CNI plugins are responsible for configuring network interfaces in pods, such as setting IP addresses, configuring routing, and managing network security policies.


Type of CNI Container Network Interface for Kubernetes. 


d) What is Container Storage Interface CSI ?

The Container Storage Interface is a community-based project for developing a standardized API enabling communication between container orchestration (CO) platforms and storage plugins. In theory, a standardized communication protocol allows storage providers to write plugins more easily, to just one specification.



E) SMI :- Service Mesh Interface





SMI is a technology pattern that can be applied to a microservice-based system to manage networked communication between services.

Traffic policy — apply policies like identity and transport encryption across services

Traffic telemetry — capture key metrics like error rate and latency between services

Traffic management — shift traffic between different services

See some of SMI implementations below:

Istio addon

Istio is an open source service mesh that layers transparently onto existing distributed applications. It provides a uniform and more efficient way to secure, connect, and monitor services.

It is the path to load balancing, service-to-service authentication, and monitoring — with few or no service code changes.

Istio addresses the challenges developers and operators face with a distributed or microservices architecture.

Monitoring tools :-

i). Kiali :- Kiali is an open-source observability and management console for Istio, the service mesh platform. It provides a graphical user interface (GUI) to visualize, monitor, and manage the traffic flows within a microservices application that is managed by Istio.
console for Istio, the service mesh platform. It provides a graphical user
interface (GUI) to visualize, monitor, and manage the traffic flows within a
microservices application that is managed by Istio.

ii) Grafana :- Grafana can be configured to connect to Prometheus as a data source. This allows users to build dashboards that visualize metrics collected by Prometheus.

iii) Prometheus :- Prometheus is a monitoring and alerting toolkit designed for reliability and scalability.

iv) Jaeger :- Jaeger is an open-source, end-to-end distributed tracing system that is commonly used to monitor and troubleshoot microservices-based applications. When integrated with Istio, Jaeger provides detailed insights into the flow of requests and responses across the services within the Istio service mesh.

F) CPI :- Cloud Provider Interface

CPI is a specification on how to implement a Kubernetes cluster. It decouples intelligence of underlying cloud infrastructure features from the core Kubernetes.

See some of CPI implementations below:

AWS

Azure

GCP

No comments:

Post a Comment