Careeroza
Kubernetes Essentials
Core Objects
| Object | What it is |
|---|---|
| Pod | one or more containers scheduled together; the smallest unit |
| Deployment | keeps N identical pods running and handles rolling updates |
| Service | a stable network name and load balancer for a set of pods |
| Ingress | HTTP routing from outside the cluster to services |
| ConfigMap / Secret | configuration and sensitive values for pods |
A Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: api
spec:
replicas: 3
selector:
matchLabels: { app: api }
template:
metadata:
labels: { app: api }
spec:
containers:
- name: api
image: asia-south1-docker.pkg.dev/my-project/apps/myapi:1.4.2
ports: [{ containerPort: 8000 }]
resources:
requests: { cpu: 250m, memory: 256Mi }
limits: { memory: 512Mi }Tip: The GCP crash course covers running this on Google Kubernetes Engine (GKE).