AWS EKS: From VPC to Enterprise Workflow
Trace the enterprise AI workflow platform from AWS networking and an EKS control plane to EC2-backed pods, identity, load balancing, and OOM recovery.
The enterprise problem and today’s slice
Enterprise problem: An Amazon Elastic Kubernetes Service (EKS) cluster can be “active” while the enterprise AI workflow platform remains unreachable, unschedulable, over-privileged, or OOM-killed because the customer still owns the virtual network, worker capacity, workload identity, manifests, and service outcome. Whole-course context: The incoming shared-responsibility matrix separates provider-operated control-plane infrastructure from customer configuration and workloads; today instantiates that model in AWS. Today’s slice: We follow Terraform and Kubernetes declarations through an Amazon Virtual Private Cloud (VPC), EKS control plane, managed node group, AWS load balancer integration, and the enterprise AI workflow platform pods. End-of-day evidence: Resource IDs, Kubernetes identities, rollout revision, network path, denied AWS action, OOM recovery, and reader probe form one deployment record. Still unsolved: Karpenter's just-in-time nodes, event-driven pod scaling, and GitOps promotion are deferred.
The thesis is that EKS manages a Kubernetes control plane, not the whole application platform. Start with AWS, pods, and readers; then expand the network, compute, identity, and ownership interfaces that must all work.
Customer use cases
Creating an EKS resource is not a customer outcome, and conflating the two leaves broken network and identity paths undiscovered. These use cases prove deployment and recovery through the complete AWS-to-reader chain.
| Use case ID | Actor | Customer job | Success outcome | Denial or recovery evidence |
|---|---|---|---|---|
| D61-UC-01 | AWS platform engineer | Provision a private EKS foundation and expose the enterprise AI workflow platform through an approved public edge | Healthy the enterprise AI workflow platform replicas run across failure domains and readers receive the expected page through the AWS load balancer | Unapproved network access and workload AWS API calls are denied while approved probes succeed |
| D61-UC-02 | Application on-call engineer | Recover an OOM-killed the enterprise AI workflow platform pod without confusing EKS control-plane health with worker or workload health | Justified revision rolls out on nodes with headroom and replay completes without another OOM | Unsafe resize stays Pending or is denied; control plane and unaffected replica remain healthy |
Actor-centred user stories
EKS operations cross AWS and Kubernetes identities, so acceptance must join both planes without implying that permission in one grants the other. These stories name the network, workload, denial, and recovery observations required.
| Story ID | Use case IDs | User story | Observable acceptance conditions |
|---|---|---|---|
| D61-US-01 | D61-UC-01 | As an AWS platform engineer, I want a reproducible VPC-to-ingress deployment, so that the enterprise AI workflow platform is reachable only through approved paths | Terraform outputs identify VPC, subnets, cluster and node group; Kubernetes shows Ready nodes/endpoints; public probe passes; private API and denied workload action tests behave as designed |
| D61-US-02 | D61-UC-02 | As a application on-call engineer, I want OOM evidence connected to EC2-backed node capacity, so that I change the application boundary or compute supply for the right reason | Pod UID, node UID, EC2 instance ID, limit, allocatable headroom, revision, replay, and unaffected replica are recorded |
End-to-end product flows
An EKS deployment crosses two declarative control planes, so skipping the order can create pods before networking, nodes, or identities exist. The flow begins with a customer-approved release and ends with browser and denial evidence, not with an API returning success.
| Flow ID | Use case IDs | Path | Trigger | Numbered steps | Terminal evidence |
|---|---|---|---|---|---|
| D61-FLOW-01 | D61-UC-01 | Happy | Platform engineer promotes the enterprise AI workflow platform's AWS environment revision | 1. Terraform creates VPC, subnets, routes, roles, EKS cluster, and managed node group. 2. Engineer obtains scoped cluster access. 3. Platform controllers and workload identity are installed/configured. 4. the enterprise AI workflow platform resources are applied. 5. AWS load balancer path becomes healthy. 6. Public probe and denied AWS API test run. | Terraform state/run ID, AWS resource ARNs, cluster/node UIDs, deployment digest, load-balancer DNS, positive probe, denied action, environment, actor, timestamp |
| D61-FLOW-02 | D61-UC-02 | Recovery | Reader errors correlate with an enterprise AI workflow platform OOMKilled termination | 1. Preserve request, pod, node, and AWS instance evidence. 2. Check limit breach, node pressure, requests, and managed-node-group capacity. 3. Choose code fix, justified resource revision, or node capacity action. 4. Roll out one change. 5. Replay traffic and compare unaffected replica. 6. Seal incident. | Old termination, node/instance mapping, infrastructure or manifest diff, rollout revision, replay result, and immutable incident ID |
System design derived from the flows
The EKS control plane and worker nodes occupy different ownership and network boundaries, so drawing them as one box conceals routing, security-group, IAM, and capacity failures. The design expands the AWS-managed and customer-managed VPCs and keeps AWS authorization distinct from Kubernetes authorization.
| Use case ID | Entry point | Responsible services | Authoritative store | Failure evidence |
|---|---|---|---|---|
| D61-UC-01 | Terraform pipeline, AWS APIs, and Kubernetes API | VPC, subnets/routes/NAT or endpoints, IAM, EKS, managed node group, VPC CNI, load balancer controller, Kubernetes Deployment/Service/Ingress | Terraform backend and AWS resource APIs plus Kubernetes API desired/status state | Node join failure, exhausted subnet addresses, unauthorized API, unhealthy target, absent endpoints, or denied workload identity test mismatch |
| D61-UC-02 | Incident console, Kubernetes API, EC2/EKS telemetry | Kubelet/runtime, scheduler, Deployment controller, managed node group, CloudWatch/metrics pipeline, application profiler | Kubernetes status/events, AWS instance/node-group state, telemetry and incident store | OOMKilled, MemoryPressure, Pending Insufficient memory, failed node update/provisioning, or replay regression |
AWS documents two VPCs in an EKS design: an AWS-managed VPC hosts the control plane, while a customer-managed VPC hosts nodes and customer infrastructure such as load balancers (EKS subnet architecture). The EKS architecture currently places control-plane instances across multiple Availability Zones and offers managed node groups, self-managed nodes, Karpenter, and other compute modes with different ownership (Amazon EKS architecture).
Data model and ownership
Troubleshooting stalls when an EC2 instance ID, Kubernetes node UID, pod UID, IAM role, and Terraform address cannot be joined. These records preserve references across planes while leaving authority with AWS IAM, Kubernetes RBAC, the workload controller, and the application data owner respectively.
Generated-application database: Not created in this slice — the enterprise AI workflow platform's existing content database remains application-owned; Terraform state, AWS resources, Kubernetes state, telemetry, and deployment evidence model the infrastructure slice.
| Record or entity | Store and owner | Primary key | Foreign key or opaque reference | Tenant key | Material constraint | Lifecycle and deletion | Use case IDs |
|---|---|---|---|---|---|---|---|
| EKSClusterResource | AWS EKS API, owned by AWS service for managed fields and customer cloud team for configuration | Cluster ARN | VPC/subnet/security-group and IAM role references | AWS account ID | Name/region unique in account; endpoint, version, logging, and access configuration match policy | Created, upgraded, deleted through reviewed infrastructure run; AWS retention follows service policy | D61-UC-01, D61-UC-02 |
| ManagedNodeGroup | AWS EKS/EC2 APIs, owned by customer platform team with AWS lifecycle automation | Node-group ARN | Cluster ARN, launch-template version, subnet and node-role references | AWS account ID plus cluster name | Desired/min/max bounds and immutable-image policy; nodes span approved subnets | Created, updated with drain/replacement, scaled, deleted; run evidence retained | D61-UC-01, D61-UC-02 |
| KubernetesWorkloadRevision | Kubernetes API store, owned by Deployment controller and platform team | Deployment UID plus revision | Opaque image digest, IAM role/service-account mapping, node and pod UIDs | Namespace | Image digest immutable; resource, spread, probe, and service-account policy pass admission | Rolled out, rolled back, superseded, retained by rollout/audit policy | D61-UC-01, D61-UC-02 |
| DeploymentEvidence | Customer evidence store, owned by platform operations | Environment plus release/run ID | Terraform state version, AWS ARNs, cluster/node/pod UIDs, probe and denial IDs | AWS account plus service key | Positive and denied tests use the promoted revision and named environment | Sealed after promotion/incident, retained, exported, and expired by policy | D61-UC-01, D61-UC-02 |
Build the AWS foundation in dependency order
Creating resources out of order produces misleading secondary failures, such as a node that cannot join because its routes, IAM role, DNS, or security path is incomplete. Build and prove each dependency before relying on the layer above it.
- Account and region: establish quotas, IAM administration, audit logging, encryption policy, support path, and failure-domain requirements.
- VPC and subnets: allocate non-overlapping addresses and enough pod IP capacity; decide public/private routing, NAT cost/availability, and VPC endpoints.
- EKS control plane: select endpoint access, version/upgrade policy, logging, encryption, authentication, and control-plane subnets.
- Compute: choose managed node groups initially, with instance types, image, subnets, labels, taints, scaling bounds, and update policy.
- Cluster integrations: configure CNI, DNS, storage, metrics, load-balancer reconciliation, and workload identity through reviewed versions.
- the enterprise AI workflow platform workload: apply immutable image, requests/limits, replicas, topology spread, probes, disruption policy, Service, and ingress.
- Evidence: test public path, private API restrictions, denied AWS permission, node loss, OOM recovery, and rollback.
Managed node groups automate EC2 provisioning and draining around updates, but AWS states that customers remain responsible for deploying patched EKS-optimized AMI releases to their node groups; custom AMIs increase that ownership (EKS managed node groups).
Terraform and manifests versus AWS and hardware effects
Terraform code declares AWS resources while Kubernetes YAML declares desired cluster objects; neither line by itself proves a packet path or available RAM. Map each declaration to the API action, real compute, and customer observation it should cause.
module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "REVIEW_AND_PIN"
cluster_name = "enterprise-workflow-prod"
cluster_version = var.kubernetes_version
subnet_ids = module.vpc.private_subnets
eks_managed_node_groups = {
general = {
instance_types = ["m7i.large"]
min_size = 3
max_size = 6
desired_size = 3
}
}
}
apiVersion: apps/v1
kind: Deployment
metadata:
name: enterprise-workflow-api
namespace: workflow-platform
spec:
replicas: 3
template:
spec:
serviceAccountName: enterprise-workflow-api
containers:
- name: workflow-platform
image: ACCOUNT.dkr.ecr.REGION.amazonaws.com/enterprise-workflow@sha256:REPLACE_ME
resources:
requests:
memory: 384Mi
limits:
memory: 768Mi
| Code or action | AWS effect | Kubernetes/software effect | Hardware and deployment reality |
|---|---|---|---|
| VPC module and private subnets | Creates addresses, route tables and network boundaries in customer account | Supplies reachability and pod/node address substrate | No server exists yet; address exhaustion can still prevent pods/nodes |
| EKS cluster resource | Requests an AWS-operated regional control plane and interfaces into selected subnets | Produces Kubernetes API endpoint and control-plane behavior | Control-plane hosts run in AWS-managed VPC and are not customer EC2 nodes |
Managed node group with three m7i.large | Creates group/launch configuration and three EC2 workers across eligible subnets | Kubelets join and report three separate allocatable budgets | AWS schedules VMs backed by physical hosts; RAM remains per node, not one shared pool |
| Kubernetes Deployment | Stores desired replica/template state in EKS API | Controllers create pods; scheduler selects eligible nodes | Container processes consume EC2 node CPU and memory |
| Service/Ingress plus AWS controller | Controller calls Elastic Load Balancing APIs and configures targets | Service endpoints track Ready pods | Network flows cross a real AWS load balancer, security groups, subnets and pod/node targets |
| Memory limit increase | No EC2 instance is resized | Replacement container receives higher cgroup limit | Uses more of the same node's finite RAM unless compute capacity is separately changed |
Pin and review module/provider versions in real code; the placeholder above deliberately avoids asserting a current release. Terraform state contains sensitive infrastructure metadata and requires a protected remote backend, locking, encryption, and least-privilege access.
OOM recovery on EKS
EKS control-plane health does not imply the enterprise AI workflow platform or its EC2 node has enough memory. Diagnose from the container outward and change AWS capacity only after proving that the scheduler—not merely the process limit—is the constrained layer.
kubectl -n workflow-platform get pod -l app=enterprise-workflow-api -o wide
kubectl -n workflow-platform describe pod POD_NAME
kubectl describe node NODE_NAME
aws eks describe-nodegroup --cluster-name enterprise-workflow-prod --nodegroup-name general
aws ec2 describe-instances --instance-ids INSTANCE_ID
kubectl -n workflow-platform rollout status deployment/enterprise-workflow-api
| Evidence | Interpretation | Smallest safe action |
|---|---|---|
OOMKilled, node healthy, legitimate bounded peak | Container cgroup ceiling is too low | Raise request/limit through reviewed revision if per-node headroom is proven |
OOMKilled, unbounded application growth | Application does not remain within a stable envelope | Fix/profile code; temporary traffic control may restore service |
Replacement Pending with Insufficient memory | No eligible node has request capacity | Scale/change node group or later use dynamic provisioning; keep justified request |
Node MemoryPressure and evictions | Aggregate runtime pressure threatens node | Reduce/rebalance load, add compatible nodes, and preserve kube/system headroom |
| API unavailable but nodes/workload path observations differ | Control-plane/network failure, not proof of workload OOM | Separate customer VPC DNS/routes/security from AWS-managed service status and escalate with evidence |
Decision rule: Kubernetes YAML changes pod placement and cgroup boundaries; Terraform changes AWS infrastructure supply. Use the former for a correctly bounded workload envelope and the latter when justified pods cannot fit or survive the required failure domain.
Key takeaways
EKS operates the Kubernetes control plane across AWS infrastructure while the enterprise AI workflow platform executes on customer-selected compute and network paths. Reliable operation joins AWS and Kubernetes identities, keeps their authorization planes distinct, and tests the public outcome plus a denied path.
- An active EKS cluster is necessary but insufficient for a reachable application.
- Managed node groups automate lifecycle steps but retain customer choices and patch rollout duties.
- OOM recovery changes manifests, application code, or worker supply according to the failed boundary.
Checklist
An EKS deployment is incomplete if the team can show resources but not trace a request or denial across them. Verify each item with one immutable environment run.
- [ ] Linked VPC, subnet, EKS, node-group, EC2 node, Kubernetes node, pod, and revision IDs.
- [ ] Proved public the enterprise AI workflow platform access and denied unapproved cluster/AWS access.
- [ ] Distinguished AWS IAM from Kubernetes access and RBAC.
- [ ] Mapped Terraform and YAML to actual provider, software, VM, and memory effects.
- [ ] Replayed OOM recovery and preserved an unaffected positive control.
Primary references
Managed control planes do not transfer workload, identity, or availability ownership; validate each boundary against the provider guidance for EKS security, EKS control-plane operations, and EKS reliability.