Skip to Content
Mengty Learns
Platform tools

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.

explanationintermediateTested with kubernetes 1.35.10 (docs), ansible-core 2.22 (docs), argocd 3.x (docs)Updated Nov 27, 2026

Intent

TL;DR

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:

  1. 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.
  2. 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 distinct CODEOWNERS and branch protections.
  3. Immutable artifacts promoted by digest: CI builds and signs the artifact once (container image or OS package) and promotes the exact sha256: digest through dev → staging → prod.
  4. Two delivery tracks:
    • Track A (VMs): Terraform provisions VMs and load balancers; Ansible applies CIS hardening, configures vault-agent for 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 restricted Pod Security at admission time.

Real-world analogy

▶ Flow: watch it work

Immutable Artifact Delivery: VM Track vs Kubernetes Track

Overview of Immutable Artifact Delivery: VM Track vs Kubernetes Track. 6 steps.
Overview6 steps in this flow

Press Start or tap any step dot to trace the path.

▸All steps (6)

Structure

A clean multi-repo boundary keeps change control auditable:

RepositoryOwnerPurposePromotion Gate
infra-terraformPlatformNetworks, VMs, clusters, load balancersPlan on PR, manual apply in CI
infra-ansiblePlatformHost baseline, CIS hardening, VM app deploy--check --diff before apply
platform-gitopsPlatformIngress, cert-manager, Kyverno, Vault ESOPlatform approval
apps-gitopsDev + PlatformPer-env image digests and Helm/Kustomize valuesDev proposes, Platform approves prod
app-<service>Dev teamApp source, Dockerfile, Helm chart, runbookCI 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

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