You finish another pull request, hit merge, and hope the cloud behaves. The pipeline feels like a Rube Goldberg machine—CloudFormation stacks over here, Kubernetes manifests over there, GitOps somewhere in between. What if that whole dance could actually stay in sync?
That’s where CloudFormation and FluxCD can stop fighting and start building together. CloudFormation defines your AWS infrastructure with consistent, versioned templates. FluxCD keeps Kubernetes clusters updated by pulling desired state from Git. The trick is to let CloudFormation handle what it does best—cloud resources—and let FluxCD handle continuous delivery without someone babysitting kubectl.
When you wire them up, CloudFormation provisions the base—networking, IAM roles, EKS clusters—while FluxCD keeps your apps steady with GitOps cycles. CloudFormation exports key outputs like endpoint URLs or role ARNs, which FluxCD reads as configuration values or secrets. Instead of two tools guessing each other’s state, you get a handshake where AWS creates, FluxCD deploys, and Git becomes the source of truth.
The workflow looks like this:
- Use CloudFormation to define and bootstrap an EKS cluster.
- Configure an IAM service account and OIDC provider so FluxCD can pull AWS credentials securely.
- Point FluxCD at your Git repository, where manifests reference CloudFormation outputs.
- Commit changes to Git, let FluxCD reconcile, and watch updates roll through AWS without your direct interference.
Most engineers trip on permissions. CloudFormation manages identity through IAM roles and policies, but FluxCD runs inside Kubernetes with service accounts. Map them via IRSA (IAM Roles for Service Accounts) to avoid secret sprawl. Rotate those IAM roles frequently. AWS Config and OIDC-based identity make that easier than yet another shared key file.