Secure Deployment Platform: VM & Kubernetes Tracks
How a regulated deployment platform separates environments, builds immutable artifacts once, and delivers them across parallel VM and Kubernetes tracks.
Intent
Design a single deployment platform that supports both VM-based workloads and Kubernetes workloads with consistent security boundaries, immutable artifacts, short-lived credentials, and clear audit trails.
Problem
Teams often treat VM deployments and Kubernetes deployments as unrelated worlds—ad-hoc SSH scripts on VMs, manual kubectl apply on clusters, shared secrets across environments, and separate builds per stage. That creates configuration drift, unverified artifacts in production, and weak blast-radius isolation.
Solution
Organize the platform around four shared invariants, then split only the final delivery mechanism:
- Network zones & blast-radius isolation: Inbound internet traffic terminates in a DMZ reverse proxy/WAF. Application zones accept traffic only from the DMZ, data zones accept only from the app zone, and production runs in its own dedicated cluster/VPC—never sharing a cluster or secrets engine with lower environments.
- Everything as code, split by ownership: Infrastructure (
infra-terraform), host configuration (infra-ansible), cluster GitOps state (apps-gitops), and application source (app-*) live in separate repositories with distinctCODEOWNERSand branch protections. - Immutable artifacts promoted by digest: CI builds and signs the artifact once (container image or OS package) and promotes the exact
sha256:digest throughdev→staging→prod. - Two delivery tracks:
- Track A (VMs): Terraform provisions VMs and load balancers; Ansible applies CIS hardening, configures
vault-agentfor short-lived secrets, and rolls out updates one node at a time behind HAProxy/Nginx. - Track B (Kubernetes): Terraform + Ansible provision the cluster; Argo CD reconciles manifests from Git; Kyverno enforces signed digests and
restrictedPod Security at admission time.
- Track A (VMs): Terraform provisions VMs and load balancers; Ansible applies CIS hardening, configures
Real-world analogy
▶ Flow: watch it work
Immutable Artifact Delivery: VM Track vs Kubernetes Track
Press Start or tap any step dot to trace the path.
▸All steps (6)
Structure
A clean multi-repo boundary keeps change control auditable:
| Repository | Owner | Purpose | Promotion Gate |
|---|---|---|---|
infra-terraform | Platform | Networks, VMs, clusters, load balancers | Plan on PR, manual apply in CI |
infra-ansible | Platform | Host baseline, CIS hardening, VM app deploy | --check --diff before apply |
platform-gitops | Platform | Ingress, cert-manager, Kyverno, Vault ESO | Platform approval |
apps-gitops | Dev + Platform | Per-env image digests and Helm/Kustomize values | Dev proposes, Platform approves prod |
app-<service> | Dev team | App source, Dockerfile, Helm chart, runbook | CI gates + code review |
When to use / when to avoid
- Use this dual-track architecture when you operate regulated workloads, hybrid infrastructure (legacy VMs alongside Kubernetes), or need auditable segregation of duties.
- Avoid the full multi-repo split for a solo project or early-stage prototype where a single repository with GitHub Actions and managed cloud PaaS/Containers delivers faster with far less ceremony.
Pros / Cons
- Pros: Same security baseline and secret authority (Vault + OIDC) across both tracks; immutable digest promotion eliminates "works in staging, fails in prod" rebuild drift; clean audit evidence.
- Cons: Higher operational overhead (maintaining separate repos, registries, and GitOps controllers); requires disciplined promotion automation so digest bumps do not become manual toil.
Relations
- Pull-based Kubernetes delivery builds directly on What GitOps Is.
- Artifact scanning and signing extend Supply-Chain Security and Pipeline Anatomy.
Check yourself
Check Yourself
1. Why does a regulated platform separate the application source repo from the GitOps deployment repo?
2. What is the safest way to promote a release from staging to production?
Sources
Related Notes
Argo CD vs Flux: Picking a GitOps Controller
Compare Argo CD and Flux CD across architecture, web UI, multi-tenancy, Helm/Kustomize support, and team fit.
Platform Security Baseline: Hosts, Clusters, and Exceptions
Enforce a practical, auditable security baseline across Linux hosts (CIS, SELinux, firewalld, auditd, AIDE) and Kubernetes namespaces (PodSecurity, NetworkPolicy, Kyverno).