Kubernetes(K8) is an open-source container orchestration tool used for automating deployment, scaling and management of containerized applications.
Features:
1. Self-Healing: It restarts container that failed or
kills the container that do not respond to container health check endpoint. It
always maintains user defined number of replicas
2. Secret and configuration management: It
maintains an application level configuration and secrets in a separate
location. So, it can be modified without re-building and deploying container
3. Horizontal scaling: It is easy to scale-up/down
containers with a simple command or automatically based on CPU usage.
4. Automatic bin packing: It automatically places
containers into the required Worker nodes based on specified CPU/Memory.
5. Storage orchestration: It allows to mount a local
storage or cloud providers
6. Automated rollouts and rollbacks: It allows to rollout
new application changes by spinning up new container without killing existing
container until proper health check verified. It will rollback
automatically if new container does not respond to user defined health check.
7. Service discovery and Load balancing: It does by using Labels and Selectors associated with PODs and Services, and can load-balance across them
Architecture & Components:
Kubernetes(K8) architecture designed as a cluster. It
consists of one master node and one worker node at least. It supports multiple
master nodes and worker nodes.
1. Master Node:
It is responsible for maintaining
entire Kubernetes cluster and there might be more than one master node in the
cluster for providing fault-tolerance and high availability.
It has various components like API Server, Control manager,
Scheduler and etcd, commonly known as Control plane.
a) API Server: It is the only entry point for the
entire cluster and exposes REST endpoints to communicate with cluster.
b) etcd: It is key-value data store used as maintain
cluster data like configurations, network activities and etc
c) scheduler: It is responsible for scheduling new
POD based on nodes workload. It maintains resource information about each
worker node and distribute workload accordingly.
d) control manager: It has different individual
processes to maintain cluster stability
Node
controller: Responsible for noticing and responding when nodes go down.
Replication
controller: Responsible for maintaining the correct number of pods as per
replica specification
Endpoints controller: Populates the endpoint objects
by using Labels and selectors of pods and services.
Service Account & Token controller: Create
default accounts and API access tokens for new namespaces
It is the place where every
pod/container run. It consists of several components
a) kubelet: It runs on each worker node and gets the
pod specifications from API server and interact with the container runtime to
perform start/stop of the container, mount pod volume and secrets.
It monitors state of
the pods by using heartbeat messages and transmit data to master node API
server
b) kube-proxy: It is a network proxy that runs on
each worker node in the cluster, it maintains network rules to allow communication
to the Pods from inside or outside of the cluster
It routes traffic to the appropriate pod based on the
associated service name and the port number of an incoming request
c) Container runtime: It is the software needs to be
installed in each worker node to run the containers i.e. Docker, containerd etc.
d) Pod: It is the place where single or multiple containers run together.
- Kubernetes for Developers #25: PersistentVolume and PersistentVolumeClaim in-detail
- Kubernetes for Developers #24: Kubernetes Volume hostPath in-detail
- Kubernetes for Developers #23: Kubernetes Volume emptyDir in-detail
- Kubernetes for Developers #22: Access to Multiple Clusters or Namespaces using kubectl and kubeconfig
- Kubernetes for Developers #21: Kubernetes Namespace in-detail
- Kubernetes for Developers #20: Create Automated Tasks using Jobs and CronJobs
- Kubernetes for Developers #19: Manage app credentials using Kubernetes Secrets
- Kubernetes for Developers #18: Manage app settings using Kubernetes ConfigMap
- Kubernetes for Developers #17: Expose service using Kubernetes Ingress
- Kubernetes for Developers #16: Kubernetes Service Types - ClusterIP, NodePort, LoadBalancer and ExternalName
- Kubernetes for Developers #15: Kubernetes Service YAML manifest in-detail
- Kubernetes for Developers #14: Kubernetes Deployment YAML manifest in-detail
- Kubernetes for Developers #13: Effective way of using K8 Readiness Probe
- Kubernetes for Developers #12: Effective way of using K8 Liveness Probe
- Kubernetes for Developers #11: Pod Organization using Labels
- Kubernetes for Developers #10: Kubernetes Pod YAML manifest in-detail
- Kubernetes for Developers #9: Kubernetes Pod Lifecycle
- Kubernetes for Developers #8: Kubernetes Object Name, Labels, Selectors and Namespace
- Kubernetes for Developers #7: Imperative vs. Declarative Kubernetes Objects
- Kubernetes for Developers #6: Kubernetes Objects
- Kubernetes for Developers #5: Kubernetes Web UI Dashboard
- Kubernetes for Developers #4: Enable kubectl bash autocompletion
- Kubernetes for Developers #3: kubectl CLI
- Kubernetes for Developers #2: Kubernetes for Local Development
- Kubernetes for Developers #1: Kubernetes Architecture and Features
Happy Coding :)
Great :) Keep it up.
ReplyDeleteAwesome posts ..
ReplyDelete