Kubernates basics and its architecture
What is Kubernates
Kubernates is the container orchestration platform.It creates container centric infrastructure. It helps from host centric infrastructure to container centric infrastructure so that you can run you application on any host.Kubernates is for achieving high availability (minimum one master and 2 nodes should be running) with micro service architecture.
container orchestration means :-
- Automatiing deployments (with CI/CD)
- Scaling of application
- Operations of application containers across clusters
Its some of the important stuff which we need to perform over containers in order to achieve real world efficient microservices in the action.
Why kubernates is required
- Its required to simplify complex microservices architecture. If you don’t have complex microservice architecture (with high availability) then kubernates is not required for you.
Kubernates architecture is a cluster architecture, which has multiple nodes and multiple pods which finally holds the containers on it.So kubernates is a combination of two parts kubernates master and kubernates nodes.
From very high level architecture is as below:-
You can see master is the controller for other kubernates nodes.
Components of kubernates master machine
- Etcd: it stores key value pair value (of configuration information) which is accessible to all the nodes. It is only accessible by kubernates API server.
- API server:-It is responsible for doing communication among the cluster using API. It contain libraries and tools which are required to do API configuration. Precisely its Kubeconfigis the tool who does the communication.
- Controller Manager: It’s responsible for collecting and sending information to API server. It works towards getting the shared state of the server then make the changes to bring it in desired state (its like business logic layer in MVC which contains business logic to achieve the goal). The key controllers to achieve this goal are
- Replication controller
- Endpoint controller
- Namespance controller
- Service account controller
- Scheduler: Its responsible for distributing the workloads. It tracks the load on cluster nodes and placing the workload accordingly.
Components of kubernates node machine
- Docker: each node does have docker machine.
- Kubelet service: It’s a small service on each node which is responsible to communicate from control plane service (collection of processes running on cluster). It interacts with etcd store to read and write configuration values. This communicates with master component to receive commands and work accordingly. The kubelet service has the responsibility of maintain the state of the work and node server. It manages network rules, port forwarding etc.
- Kubernates Proxy service: It runs on each node and helps in making services available to external host. It helps in forwarding the request to correct containers. And is capable of performing load balancing over containers. It ensures networking environment is predictable, accessible and isolated. It manages pods on the node, volumes, secrets, creating new containers, health check etc.