Roadmap: Container & Kubernetes Operations
1. Overview
This roadmap defines a container operations infrastructure for:
-
Containerized service deployment (Docker, Podman)
-
Kubernetes orchestration for production workloads
-
Container security scanning and policies
-
GitOps-based deployment workflows
-
Service mesh and observability
|
Containers are the foundation of modern infrastructure. This roadmap establishes patterns from single-host Docker to production Kubernetes, with emphasis on security and automation throughout. |
2. Architecture Vision
direction: right
# Environments
dev: "Development" {
shape: rectangle
style.fill: "#313244"
style.stroke: "#89b4fa"
docker: "Docker Compose"
}
staging: "Staging" {
shape: rectangle
style.fill: "#313244"
style.stroke: "#f9e2af"
k3s: "k3s (single)"
}
prod: "Production" {
shape: rectangle
style.fill: "#313244"
style.stroke: "#a6e3a1"
k8s: "Kubernetes (HA)\n3 control + N workers"
}
dev -> staging -> prod
# Infrastructure
registry: "Registry" {
shape: rectangle
style.fill: "#45475a"
style.stroke: "#cba6f7"
harbor: "Harbor (private)"
trivy: "Trivy scan"
}
gitops: "GitOps" {
shape: rectangle
style.fill: "#45475a"
style.stroke: "#94e2d5"
argo: "ArgoCD"
flux: "FluxCD"
ci: "GitLab CI"
}
obs: "Observability" {
shape: rectangle
style.fill: "#45475a"
style.stroke: "#fab387"
prom: "Prometheus"
graf: "Grafana"
loki: "Loki"
}
# Security & Network
security: "Security" {
shape: rectangle
style.fill: "#1e1e2e"
style.stroke: "#f38ba8"
opa: "OPA/Gatekeeper"
falco: "Falco"
rbac: "RBAC"
}
secrets: "Secrets" {
shape: rectangle
style.fill: "#1e1e2e"
style.stroke: "#cba6f7"
vault: "Vault"
eso: "External Secrets Op"
}
network: "Network" {
shape: rectangle
style.fill: "#1e1e2e"
style.stroke: "#89b4fa"
cni: "Cilium CNI"
np: "NetworkPolicy"
ing: "Traefik Ingress"
}
3. Current State
| Component | Status | Notes |
|---|---|---|
Docker |
OPERATIONAL |
Single-host containerization |
Podman |
PARTIAL |
Rootless containers tested |
Kubernetes |
PLANNED |
k3s for home enterprise in scope |
Container Registry |
PLANNED |
Harbor or registry:2 |
GitOps |
REFERENCE |
ArgoCD patterns in Codex |
Security Scanning |
PLANNED |
Trivy, grype not deployed |
4. Phase 1: Docker Mastery
4.1. Objectives
-
Production-grade Docker Compose patterns
-
Multi-stage builds for minimal images
-
Health checks and restart policies
-
Volume management and backup
4.2. Docker Best Practices
# Multi-stage build for minimal image
FROM golang:1.21-alpine AS builder
WORKDIR /app
COPY go.* ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /app/server
FROM gcr.io/distroless/static-debian12
COPY --from=builder /app/server /server
USER nonroot:nonroot
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=3s \
CMD ["/server", "health"] || exit 1
ENTRYPOINT ["/server"]
4.3. Tasks
| # | Task | Priority |
|---|---|---|
1.1 |
Document multi-stage build patterns |
HIGH |
1.2 |
Create Docker Compose production template |
HIGH |
1.3 |
Implement container health checks |
HIGH |
1.4 |
Document volume backup procedures |
MEDIUM |
1.5 |
Create .dockerignore best practices |
MEDIUM |
1.6 |
Document in domus-linux-ops containers section |
HIGH |
5. Phase 2: Rootless Containers (Podman)
5.1. Objectives
-
Rootless container execution
-
Podman-Docker compatibility
-
Systemd integration for services
-
Quadlet for declarative containers
6. Phase 3: Kubernetes Foundation (k3s)
6.1. Objectives
-
Deploy k3s for home enterprise Kubernetes
-
Establish namespace organization
-
Configure persistent storage
-
Implement basic RBAC
6.2. k3s Deployment
# Single-node k3s installation
curl -sfL https://get.k3s.io | sh -s - \
--write-kubeconfig-mode 644 \
--disable traefik \
--tls-san k8s.inside.domusdigitalis.dev
# Verify installation
kubectl get nodes
kubectl get pods -A
6.3. Namespace Strategy
| Namespace | Purpose | Services |
|---|---|---|
kube-system |
Core Kubernetes components |
CoreDNS, metrics-server |
monitoring |
Observability stack |
Prometheus, Grafana, Loki |
apps |
Application workloads |
Custom applications |
ingress |
Ingress controllers |
Traefik, cert-manager |
vault |
Secrets management |
Vault agent, external-secrets |
7. Phase 4: GitOps with ArgoCD
8. Phase 5: Container Security
8.1. Objectives
-
Image scanning with Trivy
-
Runtime security with Falco
-
Policy enforcement with OPA/Gatekeeper
-
RBAC hardening
8.2. Security Scanning Pipeline
# Scan image with Trivy
trivy image --severity HIGH,CRITICAL myapp:latest
# Scan Kubernetes manifests
trivy config --severity MEDIUM,HIGH,CRITICAL ./k8s/
# Scan running cluster
trivy k8s --report summary cluster
# Generate SBOM
trivy image --format spdx-json -o sbom.json myapp:latest
9. Phase 6: Observability Stack
10. Work Applicability
|
This roadmap directly supports work enterprise requirements:
Container patterns validated in home enterprise deploy to enterprise Kubernetes. |