Kubernetes · Freelance

CloudFormation EKS Platform with Per-Service CI/CD

CloudFormation builds a VPC, EKS node group and one CodePipeline per .NET microservice that builds, pushes and deploys with kubectl.

  • EKS
  • CodePipeline
  • CodeBuild
  • ECR
  • CloudFormation
  • IAM
  • ALB Ingress
  • Docker
  • .NET

// Overview

Separate templates create the network, the worker node group and a pipeline stack with an ECR repository, CodeBuild project and pipeline per service. Each build tags images with repo, branch, time and commit, pushes to ECR, assumes a dedicated kubectl role through STS and applies the manifests. An ALB ingress controller and RBAC config are included.

// The problem

A multi-service .NET application needed automated container build and deployment onto Kubernetes on AWS.

// Flow

CloudFormation EKS Platform with Per-Service CI/CD flow1. VPC stack → 2. EKS node group → 3. ECR → 4. Source → 5. Build → 6. Push → 7. Deploy → 8. Ingress01VPC stack02EKS node group03ECR04Source05Build06Push07 · GATEDeploy08Ingress
  1. VPC stacksubnets, routes, security group
  2. EKS node groupASG, launch configuration, node role
  3. ECRone repository per service
  4. SourceGitHub stage in each pipeline
  5. BuildCodeBuild builds a uniquely tagged image
  6. Pushimage pushed to ECR
  7. Deploy gateassume a short-lived kubectl role, update kubeconfig, apply manifests
  8. IngressALB controller with cluster role and auth mapping

// Design decisions & guardrails

  • A dedicated short-lived (900s) role assumption instead of embedded cluster credentials.
  • Image tag encodes repo, branch, time and commit for traceability.
  • One pipeline per microservice from the same template.
  • Rolling updates and resource limits set in manifests.

// Outcome

Push to branch, get a rolling deployment, per service.

// Related