2.1 Architecture: Control Plane & Nodes
Kubernetes (K8s) follows a client-server architecture:
- Control Plane: Manages the cluster (API Server, Scheduler, Controller Manager, etcd).
- Nodes: Worker machines that run the applications (Kubelet, Kube-proxy, Container Runtime).
2.2 Pods, Deployments, and Services
Pods: The smallest deployable units in K8s. A pod represents a single instance of a running process.
Deployments: Manage the creation and scaling of Pods (ReplicaSets).
Services: An abstract way to expose an application running on a set of Pods as a network service.
2.3 ConfigMaps and Secrets
Decouple configuration artifacts from image content to keep containerized applications portable.
- ConfigMap: Stores non-confidential data in key-value pairs.
- Secret: Stores sensitive information, such as passwords, OAuth tokens, and ssh keys.
🎯 Practical Exercise
Deploy a simple Nginx server to a local Kubernetes cluster (like Minikube or Docker Desktop) using a Deployment and expose it via a Service.