Kubernetes
Introduction
Kubernetes (K8s) is an open-source container orchestration platform for automating deployment, scaling, and management of containerized applications.
Core Components
Pods
The smallest deployable unit in Kubernetes, containing one or more containers.
Services
An abstraction that defines a logical set of Pods and a policy to access them.
Deployments
Manages the desired state of your application, handling updates and rollbacks.
ConfigMaps & Secrets
Store configuration data and sensitive information separately from container images.
Basic Commands
# Get all pods
kubectl get pods
# Apply a configuration
kubectl apply -f deployment.yaml
# Scale a deployment
kubectl scale deployment myapp --replicas=3
# View logs
kubectl logs <pod_name>
Architecture
- Control Plane: API Server, Scheduler, Controller Manager, etcd
- Worker Nodes: Kubelet, Kube-proxy, Container Runtime