Unified Kubernetes Strategy for Multi-Environment Application Stacks and Testing
This document proposes a unified Kubernetes-based strategy for running application stacks across multiple environments: EKS (production and final validation), local development, CI, and on‑prem / isolated (VMware / ESXi) setups.
The core principle is:
Kubernetes is the contract. EKS is the reference implementation. |
All application and Helm-level artifacts remain identical across environments. Differences are isolated strictly into a platform layer (base charts, defaults, and cluster configuration).
This approach minimizes environment drift, enables fast integration testing, supports proper autoscaling validation, and avoids coupling application delivery to specific infrastructure implementations.
We need a solution that:
Runs the same application stack across:
AWS EKS (production)
Local developer machines
CI pipelines (ephemeral environments)
On‑prem / isolated environments (VMware / ESXi, single or few VMs)
Supports integration and system tests that provision and tear down full stacks quickly
Allows proper autoscaling validation (HPA and cluster autoscaling)
Avoids leaking infrastructure or cloud-specific assumptions into application code or Helm charts
Keeps the number of supported Kubernetes distributions to a minimum
This proposal explicitly does not aim to:
Perfectly reproduce AWS‑specific behavior outside AWS
Make local or on‑prem environments identical to EKS at the infrastructure level
Support unlimited Kubernetes distributions
Hide all behavioral differences between cloud and non‑cloud environments
Behavioral parity is achieved only on EKS. Other environments provide functional validation.
Kubernetes APIs (not VMs, not cloud providers) define the system boundary
Application charts depend only on:
Core Kubernetes APIs
A small, explicit set of platform capabilities
Layer | Responsibility |
Application | Workloads, services, HPAs, configs, business logic |
Platform | Ingress, storage classes, metrics, autoscaling infra, cloud integrations |
Application charts must not embed platform or vendor specifics.
Environment | Purpose |
EKS | Production, final validation, real AWS behavior |
Local / CI | Fast feedback, integration tests, developer workflows |
On‑prem / Isolated | Customer environments, regulated or air‑gapped setups |
To minimize complexity while covering all requirements:
Amazon EKS (mandatory)
k3s (non‑EKS environments)
EKS provides authoritative behavior for networking, autoscaling, IAM, and storage
k3s provides:
Upstream‑compatible Kubernetes APIs
Multi‑node clusters on VMs
Functional autoscaling (HPA + cluster autoscaler)
Operation on local machines, CI, and VMware / ESXi
This combination covers all environments with only two Kubernetes substrates.
Aspect | k3s | EKS |
HPA logic | ✅ | ✅ |
Scheduling pressure | ✅ | ✅ |
Node scaling | ✅ (VM‑based) | ✅ (AWS‑based) |
Cloud constraints (ENI, spot, ASG) | ❌ | ✅ |
Interpretation rule:
Autoscaling is functionally validated on k3s and behaviorally validated on EKS. |
Each Kubernetes cluster must provide the following capabilities:
A default StorageClass suitable for standard PVC usage
A default IngressClass
A working metrics pipeline (metrics‑server / Prometheus)
Support for HPA
Support for cluster autoscaling (where applicable)
Standard DNS and service discovery
Implementation details may differ per environment but must be invisible to applications.
The following cannot be made equivalent outside AWS:
AWS VPC CNI semantics (ENI limits, IP exhaustion behavior)
ALB/NLB controller behavior
IRSA and IAM failure modes
EBS/EFS performance and attachment semantics
Spot interruption and AWS capacity constraints
Tests relying on these behaviors must run on EKS.
LocalStack may be used as an AWS API emulator in local/CI environments:
Emulates AWS services (S3, SQS, SNS, etc.)
Runs as a workload inside Kubernetes
Reduces AWS cost and dependency for non‑prod tests
LocalStack does not replace Kubernetes or EKS.
Provision Kubernetes cluster (k3s or EKS)
Deploy platform layer
Deploy application stack (same charts/values)
Run tests
Collect results
Tear down cluster
Local / CI → k3s multi‑node → EKS
Confidence increases at each stage; artifacts remain identical.
Risk | Mitigation |
App charts leak platform details | Enforce platform contract and reviews |
False confidence from non‑AWS tests | Explicit EKS validation stage |
Platform drift | Version pinning and documented defaults |
This proposal establishes a clear, minimal, and scalable Kubernetes strategy:
Kubernetes is the abstraction boundary
EKS is the reference and final validator
k3s covers all non‑AWS environments
Application artifacts remain identical everywhere
Platform differences are explicit, documented, and controlled
This balances speed, correctness, and operational sanity without over‑engineering or false guarantees.
Approve substrate selection (EKS + k3s)
Define platform capability contract as policy
Document base chart responsibilities
Classify tests by required environment (k3s vs EKS)!