Kubernetes
Kubernetes (K8s) is an open-source container orchestration platform designed to automate the deployment, scaling, and management of containerized applications. It serves as a framework to run distributed systems resiliently.
Key features include:
- Automatic Scaling
- Self-Healing
- Load Balancing
- Rolling Updates
- Horizontal Scaling
A basic workflow using Kubernetes could involve:
- Containerizing your application (e.g using Docker)
- Defining K8s configuration files (YAML)
- Deploying app to a cluster
Concepts
- Nodes: Machines in a cluster. Nodes can be virtual or physical machines.
- Pods: Smallest deployable unit. Contains containers that share resources.
- Clusters: A set of machines (nodes) that work together to run containers.
- Control Plane: A node of a cluster that manages the worker nodes.
- Deployment: Describes the desired state for your pods and replica sets.
- Services: Defines a logical set of pods and a policy to access them.
Components
- Kube-API Server: Frontend of control plane. Used to interact with the cluster
- etcd: Key-value store used for storing all cluster data
- Kube-Scheduler: Assigns pods to nodes based on resources
- Kube-Controller-Manager: Handles routine tasks in the cluster
- Kubelet: Agent that runs on each node. Ensures containers are healthy.
- Kube-Proxy: Handles networking within the cluster.