What is Kubernetes(k8s)?



Kubernetes is an opensource container orchestration tool for building a fault-tolerant, scalable platform designed to automate and centrally manage containerized applications.The platform itself can be deployed within almost any infrastructure – in the local network, server cluster, data center, any kind of cloud public (Google Cloud, Microsoft Azure, AWS, etc.), private, hybrid, or even over the combination of these methods.

What is Docker? 


Docker is a containerization platform that packages your application and all its dependencies together in the form of a docker container to ensure that your application works seamlessly in any environment.

What is Container? 

Docker Container is a standardized unit which can be created on the fly to deploy a particular application or environment. It could be an Ubuntu container, CentOs container, etc. to full-fill the requirement from an operating system point of view. Also, it could be an application oriented container like CakePHP container or a Tomcat-Ubuntu container etc.

Kubernetes Architecture components?




K8s Master server has, 

API-Server : 

Performs all the administrative tasks through the API server within the master node.In this REST commands are sent to the API server which validates and processes the requests.After requesting, the resulting state of the cluster is stored in the distributed key-value store.

Controller :

It is a daemon which regulates the Kubernetes cluster which manages the different non-terminating control loops.It watches the desired state of the objects it manages and watches their current state through the API server. If the current state of the objects it manages does not meet the desired state, then the control loop takes corrective steps to make sure that the current state is the same as the desired state.

Scheduler: 

The scheduler schedules the tasks to slave nodes. It stores the resource usage information for each slave node.It schedules the work in the form of Pods and Services.

etcd(Key-value store) : etcd is a distributed key-value store which stores the cluster state. etcd is written in the Go programming language.It is also used to store configuration details such as subnets, ConfigMaps, Secrets, etc

K8s Node has,

Kubelet: 

It is an agent which communicates with the Master node and executes on nodes or the worker nodes. It gets the Pod specifications through the API server and executes the containers associated with the Pod and ensures that the containers described in those Pod are running and healthy.

Kube-proxy:

It is the network proxy which runs on each worker node and listens to the API server for each Service endpoint creation/deletion.For each Service endpoint, kube-proxy sets up the routes so that it can reach to it.

How Kubernetes works?

You have written an application and you used docker as a platform to containerised it. now if you want to run that application, you need to define the docker image in a YAML file and Kubernetes consider that YAML file and created pod(s) for the docker image. pods are group of containers that runs in a shared context. Kubernetes take the request from Application Load Balancer and transfers it to respective nodes and nodes having pods which are containers and application runs on container and generates the result and that result is transferred back to kubernetes and the result is given back to the client.

What are the features of Kubernetes?

1.Service Discovery and load balancing
2.Auto Scaling
3.Self Repair
4.Storage Orchestration
5.Deployments and Automatic Rollbacks
6.Configuration Management and Secrets
7.Batch execution

Kubernetes GUI?

Kubernetes Dashboard provide web-based Kubernetes user interface. You can use Dashboard to deploy containerized applications to a Kubernetes cluster, troubleshoot your containerized application, and manage the cluster resources. 

Kubernetes monitoring tools?




1.Kubelet
2.cAdvisor
3.Kube-state-metrics
4.Kubernetes Dashboard
5.Prometheus
6.Jaeger
7.Kubewatch
8.Weave Scope
9.EFK Stack

Kubernetes alternatives?

1.Docker swarm
2.Rancher
3.Apache Mesos
4.Docker Compose
More are there.

What are the difference between Kubernetes and docker swarm?

Sl.no
Description
Docker Swarm
Kubernetes
1
Developed By
Docker Inc
Google
2
Year Released
2013
2014
3
Companies using
Bugsnag,  Bluestem Brands, Hammerhead, Code Picnic, Dial once etc.
Asana, Buffer, CircleCI, Evernote, Harvest, Intel, Starbucks, Shopify etc.
4
Controller
Manager
Master
5
Storage
Volumes
Persistent and Ephermal
6
Public Cloud Service Provider
Google, Azure, AWS, OTC
Azure
7
Compatibility
Less Extensive and Customizable
More Extensive and highly customizable
8
Installation
Easy to set up
Takes time for installation
9
Tolerance ratio
Low Fault Tolerance
High fault tolerance
10
Large Clusters
Speed is considered for the strong cluster states
Provides container deployment and scaling even in large clusters without considering the speed
11
Load Balancing
Provides load balancing when pods in the container are defined as service
Provides automated internal load balancing through any node in the cluster
12
Deployment unit
Task
Pod
13
Port
Published Port
Endpoint
14
Network
Overlay
Flat Networking space
15
Community
Active user base that regularly updates images for various application
Enjoys strong support from open source communities and big companies like Google, Amazon, Microsoft, and IBM
16
Weakness
No certification plan for vendors. Most organisation need commercially certified version
Inclined towards developers than central IT
17
Strengths
Mostly controlled by a single vendor who can decide product direction
Clear market leader; largest adoption and interest
18
Slave
Worker
Nodes
19
Container set up
Functionality is provided and limited by Docker API
Client API and YAML are unique in kubernetes
20
Scalability
Quick container deployment and scaling even in large containers
Provides strong guarantees to the cluster states at expense of speed


References:

Post a Comment

Previous Post Next Post