Containers are lightweight packages of an application including all the dependencies. Docker is one such platform for creating containerised applications.
K8s automates the deployment and management of containers across a cluster of machines. It handles tasks such as container scheduling, scaling, load balancing, and rolling updates.
K8s provides a built-in service discovery mechanism that allows containers to find and communicate with each other. It also offers load balancing capabilities to distribute incoming traffic across multiple instances of an application.
K8s enables automatic scaling of application instances based on CPU usage, memory utilization, or custom metrics. It can also automatically restart containers that have failed, ensuring high availability of applications.
K8s allows you to define and manage application configurations using declarative manifests. You can specify the desired state of your application, and Kubernetes will work to ensure that the actual state matches the desired state.
K8s provides a way to manage persistent storage volumes and attach them to containers as needed. This allows applications to store and retrieve data even when containers are rescheduled or restarted.
K8s offers tools for monitoring the health and performance of applications running in the cluster. It integrates with various logging and monitoring systems to collect and analyze container and application metrics.
+-----------------------+
| Master Node |
+-----------------------+
| |
| +----------------+ |
| | API Server | |
| +----------------+ |
| | |
| | |
| +----------------+ |
| | etcd | |
| +----------------+ |
| | |
| | |
| +----------------+ |
| | Controller Mgr | |
| +----------------+ |
| | |
| | |
| +----------------+ |
| | Scheduler | |
| +----------------+ |
+-----------------------+
|
|
+-------------------------+
| |
+------------+ +------------+
| Worker Node| | Worker Node|
+------------+ +------------+
| Kubelet | | Kubelet |
| Container | | Container |
| Runtime | | Runtime |
| kube-proxy | | kube-proxy |
+------------+ +------------+