Phase 8 β Container Strategy
Understanding how containers work in a k3s cluster.
Runtimeβ
β k3s uses containerd (not Docker)
β Docker images still work β OCI-compatible
β No Docker daemon required on nodes
Building Imagesβ
Build on your local machine or in CI:
docker build -t my-app:v1.0 .
docker tag my-app:v1.0 registry.local/my-app:v1.0
docker push registry.local/my-app:v1.0
What You Can Deployβ
β Node.js apps
β Python / FastAPI services
β AI/ML inference services
β SaaS applications
β Databases (PostgreSQL, Redis, etc.)
Registry Optionsβ
| Option | Use Case |
|---|---|
| Docker Hub | Public images |
| GitLab Registry | Private images + CI integration |
| Harbor | Self-hosted, enterprise features |
| Local registry | Air-gapped / development |
Sample Deployment Manifestβ
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
replicas: 2
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: my-app
image: registry.local/my-app:v1.0
ports:
- containerPort: 3000