08 Kubernetes
Orchestration
Is
docker runon a local developer machine container orchestration?
No it is not. Manually running a single container with docker run is not orchestration. Orchestration is the automated configuration, coordination, and management of containers and services. It involves deploying multiple containers, scaling them up or down, and managing their lifecycle.
Orchestration has to following properties:
- Cluster: Container orachestration is about managing multiple containers across multiple servers (nodes).
- Dynamic: Instances are dynamically assigned and distributed across the cluster.
- Abstraction: Infrastructure is abstracted and is automatically managed by the orchestration platform.
- Declarative: Reconciliation loop, desired state vs. current state
- Self-healing: Monitor containers and automatically restart if they fail
- Modularity: Composable and extensible using interfaces (CSI, CNI, CRI) or plugins (service discovery, load balancing, etc.)
Architecture
graph TD
API[kube-api-server] --> E[etcd]
S[kube-scheduler] --> API
C[kube-controller-manager] --> API
W[kubelet] --> API
P[kube-proxy] --> API
W --> R[Container Runtime]
K8s Deployments
- Kubernetes the Hard Way
- Kubernetes Distros:
- IoT/Edge (Lightweight): K3s, MicroK8s, KubeEdge
- Local/Dev: Minikube, Kind
- General Purpose: RKE, Kubespray, Kubeadm
- PaaS: OpenShift, Tanzu
- Managed Service:
- Google Kubernetes Engine (GKE)
- Amazon Elastic Kubernetes Service (EKS)
- Azure Kubernetes Service (AKS)
| Feature | Manual | Distro | Managed |
|---|---|---|---|
| Installation | High | Medium | Low |
| Maintenance | High | Medium | Low |
| Customization | High | Medium | Low |
| Scalability | Low | Medium | High |
| Practicability | Low/Medium | High | High |
Container Storage Interface (CSI)
The container storage interface (CSI) is a standard for exposing storage systems to containerized workloads on Kubernetes. It allows storage vendors to develop plugins that can be used by Kubernetes to provision and manage storage resources. CSI is an independent storage interface definition that is not specific to any container runtime or orchestration platform.
- CSI Node Plugin: Runs on each node and interacts with the container runtime.
- CSI Controller Plugin: Runs on the control plane (or any other platform that can be accessed by the control plane) and interacts with the storage system.