lesson
Kubernetes Fundamentals
Pods, Deployments, Services, Ingress, and ConfigMaps — the core K8s building blocks.
Kubernetes Fundamentals
Core Concepts
Pod
The smallest deployable unit. Contains one or more containers that share networking and storage.apiVersion: v1
kind: Pod
metadata:
name: my-app
spec:
containers:
- name: app
image: myapp:1.0
ports:
- containerPort: 8080Deployment
Manages a set of identical Pods. Handles rolling updates and rollbacks.apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
replicas: 3
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: app
image: myapp:1.0
resources:
requests: { cpu: "100m", memory: "128Mi" }
limits: { cpu: "500m", memory: "256Mi" }Service
Stable network endpoint for a set of Pods.| Type | Description |
|---|---|
| ClusterIP | Internal only (default) |
| NodePort | Exposes on each node's IP |
| LoadBalancer | Creates cloud LB (AWS ALB, GCP LB) |
Ingress
Routes external HTTP traffic to Services based on hostname/path.Interview Must-Knows
Sign in to use the AI study buddy on this lesson.