- Container Orchestration:
- Orchestration in term of container is term refers managing lifecycle of container or cluster(ex k8s, swarm).
- When we expect our container always runs even-though after failure of container. The term container orchestration refers to same to maintain count of containers(pods in k8s) in cluster.
- Kubernetes Docker Swarm are tools which help us t manage container orchestration.
- When to use Kubernetes / Docker Swarm:
- It is completely depends on criticality of application to business or user.
- For example when you have an application just to show static page for few number of users and its not critical for business, then using orchestration tool for such case will not add more value to business.
- Because adopting new technologies, tools, or platforms introduce additional complexity or operational overhead and associated costs.
- So if you have application / service which is critical t run always for business then we can think of using such orchestration tools.
- Kubernetes:
- Kubernetes is open-source container orchestration tool to manage auto deployment of applications, scaling, management of application in docker container.
- Kubernetes Components & Architecture:
- Basic component can be divided in 2 category
- Worker Node
- Control Plane Node / Master node
- A Kubernetes Cluster can be of single master / multi-master node and multi-worker nodes (can have single also doesn't add value).
- All these nodes have their own components we will discuss most important of them.
- Control Plane Nodes:
- API Server
- API Server intercepts Restful call from users, Admin, developer, operators or worker node then validate and process them.
- During process of requests, API server reads state of cluster from etcd(key-value store) then process request and write new state back to etcd.
- Scheduler
- Scheduler is responsible to manage workload, apply scheduling policies.
- Scheduler reads cluster state from etcd via API server process request and write new state to etcd via API server.
- Controller Manager
- Controller manger runs continues process to reads cluster state from etcd via API server and take corrective actions to meet the desired state of cluster.
- ETCD
- etcd is key-value store used to store Kubernetes cluster state.
- Only API server is allowed to connect with etcd.
- Worker Node:
- Worker node provides running environment for client apps.
- Kubelet
- Kubelete is agent running on each node in cluster. communicates with control plane nodes.
- It receives Pod definition from API server and interacts with container runtime(docker) to run containers associated with pod.
- Kube-Proxy
- kube-proxy is the agent runs on every node in cluster.
- kuber-proxy is responsible for managing all networking in nodes.
- Basically it manages iptables in node to define how pods should communicate.
- Pods
- A pod is smallest scheduling work unit in Kubernetes.
- Pod is collection of 1 or more containers scheduled together.
- Pods can be stopped, started or rescheduled as single unit.
- Kubernetes Component Placement:
- Request Flow in Kubernetes Cluster:
No comments:
Post a Comment