
Essay Containers & Clusters
Migrating From ECS to EKS Without Rebuilding Deployment Pipelines
Keep your CI logic and remap networking, IAM, and the deploy step.
Moving from ECS to EKS does not require rebuilding deployment pipelines. The costly mistake is treating a change in deployment machinery as a reason to replace working CI logic. Teams can keep their image builds, tests, promotion triggers, and notification hooks while translating ECS concepts into Kubernetes objects. Teams need to get the networking and identity mapping right, then change how releases reach production.
Why teams on ECS eventually hit ecosystem friction, not ECS itself
ECS does not have to fail before leaving it makes sense. The pressure comes from tools that arrive Kubernetes-first, including Karpenter, ArgoCD, External Secrets Operator, and CRD-driven controllers. Some have ECS equivalents, but those paths can lag or disappear. Teams then have to choose between writing an integration themselves and using one that already exists for Kubernetes.
Figma illustrates that pull without making ECS the villain. Its blockers included no StatefulSets, no Helm, and no clean way to run open-source software such as Temporal. It completed the move in under 12 months and landed on three EKS clusters with Karpenter. Access to those tools requires a different runtime model, but it does not invalidate the logic that builds and approves a release.
The false assumption that makes migrations expensive: pipelines must be rebuilt
The false assumption is that a new orchestrator demands new CI/CD from scratch. That turns a bounded translation into a redesign of triggers, test gates, promotions, and rollback procedures. Container images need no changes because both environments use Docker/OCI images, and ECR registries transfer without modification. Environment variables can also stay as they are, though workloads need a different way to consume secrets.
The core object map is straightforward. A Task Definition becomes a Pod template inside a Deployment or Job, and an ECS Service becomes a Kubernetes Deployment together with a Kubernetes Service. An ECS Cluster maps to an EKS Cluster, although nodes are managed separately from the control plane. Capacity Providers and ASGs map to Karpenter NodePools. Fargate workloads can move to EKS Fargate or EC2 nodes managed by Karpenter.
The supporting objects have counterparts too. Cloud Map discovery becomes Kubernetes Service discovery with CoreDNS, and Service Auto Scaling becomes workload scaling through HPA plus node scaling through Karpenter. Deployment and CodeDeploy flows map to ArgoCD or Flux, with Argo Rollouts for rollout control. Secrets move through External Secrets Operator, and Fluent Bit or an OTel collector takes over the logging for each task. Networking and IAM are the two translations that need closer attention before this map becomes safe to use.
The two rows that will bite you: networking and IAM
The networking trap is running out of subnet addresses. ECS awsvpc mode and AWS VPC CNI both give each task or pod a VPC IP address, but EKS can pack more pods onto an instance. More density needs more address space. Subnet sizing that worked for ECS can therefore fail under EKS load. Plan subnet CIDR space before creating the first EKS node group so that a shortage does not come as a surprise during scale-out.
IAM needs the same care for a different reason. ECS Task Roles map to IRSA or Pod Identity, preserving least privilege per workload. IRSA uses a ServiceAccount annotated with an IAM role ARN, a cluster OIDC provider, and projected tokens. New clusters should also evaluate Pod Identity. The healthcare platform migration applied IRSA across all 15+ microservices.
The dangerous shortcut is a default ServiceAccount with a catch-all IAM role. One ServiceAccount per workload and one IAM role per ServiceAccount preserve the separation teams already maintained on ECS. That discipline bounds the reach of a compromised pod. Once address allocation and workload identity are mapped correctly, the remaining pipeline translation is much more mechanical than a wholesale rebuild.
How ECS autoscaling maps to Karpenter and KEDA — and why the new model is faster
The healthcare platform shows why scaling can justify the move. Its CloudWatch-driven ECS autoscaling had a multi-minute delay, so month-end CPU spikes arrived before scale-out and pushed P99 latency higher. Engineers compensated with manual pre-scaling. Task placement fragmentation also left capacity unused when no individual instance had enough available resources for a task, despite spare capacity across the cluster.
EKS separates that problem into workload and node scaling. HPA changes workload replica counts using CPU or memory signals, while Karpenter watches pending pods and launches suitable instances directly, without an ASG intermediary. Karpenter also consolidates underused nodes.
KEDA adds scaling from signals such as SQS queue depth, Kafka consumer lag, and Prometheus metrics. Existing upstream signals can remain in use. Teams translate their thresholds into scaler configuration instead of inventing new triggers, with pollingInterval and cooldownPeriod controlling responsiveness. SailPoint standardized on Karpenter and KEDA during its migration. The speed advantage comes from responding to pending work and provisioning directly.
Preserving CI/CD pipelines by adopting GitOps as the deploy plane, not a replacement for CI
The pipeline boundary is the deploy step. Before migration, CI builds an image, pushes it to ECR, runs its gates, and calls aws ecs update-service. With GitOps, those earlier steps stay, but CI updates a manifest or Helm values file in Git. ArgoCD or Flux then reconciles the cluster to that declared state.
That division is more useful than replacing the ECS command with kubectl apply. A direct apply from CI does not establish a GitOps reconciliation loop or its drift detection. GitOps makes release changes auditable through Git and supports rollback by reverting the change.
Matters.AI preserved its GitHub Actions build-and-test workflow and used ECR, Helm Charts, and ArgoCD for delivery. Only the deploy step was replaced. SailPoint extended its pipeline to check whether an ArgoCD application and an ECS service existed for the service being released, then trigger both where present. That allowed one release process to serve both runtimes during the transition.
GitOps still asks something of the team. Engineers must know how reconciliation works, keep secrets outside Git, and act when drift occurs. For teams not ready for that controller overhead, Helm upgrades triggered from CI provide an intermediate path with rollback through Helm history.
Its blockers included no StatefulSets, no Helm, and no clean way to run open-source software such as Temporal.
Running both environments simultaneously during the traffic shift

A shared ALB has one target group for ECS tasks and another for EKS pods, with weighted rules controlling the split. AWS Load Balancer Controller can connect the Kubernetes side through TargetGroupBinding. Both deploy paths remain active. This lets the team validate EKS with production traffic while keeping ECS available.
The healthcare platform used a five-week progression. In Week 1, ECS served all traffic while the team validated pod startup, health checks, and IRSA credentials. Week 2 gave EKS a small canary slice, and Week 3 split traffic roughly evenly. Week 4 put most traffic on EKS while ECS remained a hot standby. Week 5 completed the cutover, with ECS services scaled to zero but retained through post-cutover observation.
During Weeks 1–4, rollback was a single ALB weight change with 15-second propagation, without redeployment or a pipeline rerun. The platform moved 15+ microservices across six engineering teams with zero downtime, zero rollbacks, and zero production incidents. Other migrations may have different results. Teams that follow this pattern should have CI deploy to both environments while they run side by side, and keep the ECS task-definition update path working until Week 5.
Secrets, logging, and monitoring: where the operational surface changes without requiring pipeline work
Secrets change consumption paths while their upstream home can stay the same. ECS injected them from Secrets Manager or SSM Parameter Store through task definitions. External Secrets Operator instead syncs upstream secrets into Kubernetes Secrets, which pods consume as environment variables or mounted files. Rotation still needs careful handling. In the healthcare migration, Vault rotated credentials on a schedule, and pods picked up new secrets on their next restart without a pipeline trigger, removing manual rotation work from deployment.
Logging moves from routing for each task to infrastructure that the tasks share. FireLens routing maps to a Fluent Bit DaemonSet or an OTel collector, while destinations such as CloudWatch and S3 can stay. Existing CloudWatch Log Groups can also remain, preserving downstream alerts and dashboards based on them. Fluent Bit is still another component to manage. The gain is continuity at the destination without rebuilding CI around the new routing layer.
Keeping monitoring useful also means keeping what the data tells the team, even if configuration files have to change. SailPoint maintained Grafana dashboards through ServiceMonitor label management, relabeling rules, and label replacements compatible with its ECS setup. CloudWatch Container Insights also works in both environments. Teams can therefore start with CloudWatch parity and adopt Prometheus incrementally. Richer observability is a later benefit, beyond the requirements for the first EKS release.
Compliance and security posture during and after the migration
EKS enables more granular controls, but moving workloads does not establish compliance by itself. Per-workload IAM separation must survive, and image checks still belong in CI. Teams should use base images they trust and block critical vulnerabilities before they deploy. The runtime change gives the approved workload a different set of controls once it runs.
Network policies or SecurityGroupPolicy can turn controls on how tasks communicate into rules that restrict how pods communicate. For regulated workloads, the recommended approach is to permit only declared communication paths. Human access also needs auditable identity integration through AWS IAM Identity Center or SSO with Kubernetes RBAC. External Secrets Operator with Vault adds an audit trail of access to secrets. Configuring and operating these enforceable controls is part of establishing that a workload on EKS is HIPAA-compliant.
What the migration actually costs small engineering teams, and how to reduce that cost
Keeping CI does not make EKS free to operate. Before applications run, someone must own the load balancer controller, Karpenter, CSI drivers, secrets operator, logging agent, and monitoring stack. Each adds versions and upgrades to track. Cluster maintenance, CVE patches, and cost rightsizing remain real work. When the Kubernetes owner is also the backend tech lead, that work competes directly with product delivery.
For a small team, reducing that burden means choosing how much infrastructure it will own. A managed platform layer, such as Porter, a Platform as a Service that deploys Kubernetes-based apps into a team's own AWS, GCP, or Azure account, can take care of cluster upgrades, patches, add-ons, and autoscaling configuration while engineers keep their application manifests and deployment pipelines. AI and GPU workloads add GPU node groups, MIG partitioning, and time-slicing to that calculation. Those are infrastructure responsibilities a managed layer can absorb. Separately, rightsizing resource requests and enabling Karpenter consolidation reduce wasted compute without changing release logic.
A migration sequence that puts the concept map into practice
The practical sequence begins with assessment, before writing Kubernetes YAML. Inventory task definitions, launch types, IAM roles, scaling signals, secret injection, and log destinations. Flag ECS-specific SDK calls and hardcoded metadata endpoints as actual application changes. Resolve subnet capacity next. Then choose IRSA or Pod Identity, including the OIDC provider where IRSA is used.
Translation follows those decisions. Turn task definitions into Deployments with resource requests and limits, create ServiceAccounts for each workload, and map the scaling signals already in use into the new configuration. Point secret resources at the upstream stores that are already in use. Change the EKS deploy step to a Git update or Helm upgrade and keep the build and test gates. Keep the ECS path during parallel operation.
The next decision is whether EKS is ready for traffic. Attach its target group with an initial weight of zero, then validate health checks, credentials, secrets, logs, and Karpenter provisioning. Advance through traffic splits only when error rates and P99 latency compare acceptably with ECS. Keep rollback available through the ALB. The five-week healthcare progression is a traffic-shift example, while Matters.AI’s approximately two and a half months covered its full migration.
A conservative sequence keeps ECS available through observation before scaling it to zero and deleting task definitions, allowing one full month-end cycle for batch-heavy workloads. Then remove the ECS deploy step, right-size pod requests based on data about how much they use, and check consolidation and the Spot mix. The pipeline work done on ECS becomes the foundation for EKS.


