Lightweight examples for provisioning an Amazon EKS cluster and deploying Datadog.
This repository includes three cluster provisioning paths:
eksctl(quick start): eksctl/script.sh- CloudFormation template: cloudformation/amazon-eks-template.yaml
- Terraform configuration: terraform/
- AWS CLI v2 configured (
aws configureor equivalent SSO profile) kubectl- One of:
eksctl,terraform, or AWS CloudFormation console access helm(for Datadog Helm install)- Datadog API key (required), Datadog APP key (optional; needed for specific cluster-agent features)
Verify AWS identity before provisioning:
aws sts get-caller-identityChoose one method below.
./eksctl/script.shThe script uses explicit defaults for cluster name, region, Kubernetes version, and managed nodegroup sizing, and can be overridden with environment variables.
Open the CloudFormation create-stack flow and upload cloudformation/amazon-eks-template.yaml:
https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create/template
The template defaults to ProvisionBastionHost=Disabled and a modern Lambda runtime for generated cluster names.
Minimum required CloudFormation inputs include KeyPairName, RemoteAccessCIDR, VPCID, and PrivateSubnet1ID.
Ingress controller behavior for this template:
ProvisionALBIngressControlleris a legacy toggle and isDisabledby default.- Enabling it creates the
ALBIngressStacknested stack fromtemplates/amazon-eks-alb-ingress.template.yaml. - This path is separate from the modern AWS Load Balancer Controller.
Minimal-risk migration path in this repository:
- Safe now (no/low-code): keep
ProvisionALBIngressController=Disabled, document that setting clearly in deployment runbooks, and install AWS Load Balancer Controller as a separate post-cluster step. - Deferred larger migration: replace
ProvisionALBIngressController/ALBIngressStackwiring in the CloudFormation template with a dedicated AWS Load Balancer Controller install path (IRSA, IAM policy updates, and rollout validation).
cd terraform
terraform init
terraform apply -var='cluster-name=terraform-eks-demo'After cluster creation, update kubeconfig:
export AWS_REGION="<your-region>"
export EKS_CLUSTER_NAME="<your-cluster-name>"
aws eks --region "$AWS_REGION" update-kubeconfig --name "$EKS_CLUSTER_NAME"If you used CloudFormation and left EKSClusterName blank, fetch the generated cluster name from stack outputs:
aws cloudformation describe-stacks \
--stack-name "<your-stack-name>" \
--region "$AWS_REGION" \
--query "Stacks[0].Outputs[?OutputKey=='EKSClusterName'].OutputValue" \
--output textValidate access:
kubectl get nodes
kubectl get pods -ASet keys in your current shell (avoid committing keys to files):
export DD_API_KEY="<your-api-key>"
export DD_APP_KEY="<your-app-key>" # optionalhelm repo add datadog https://helm.datadoghq.com
helm repo update
helm upgrade --install datadogagent datadog/datadog \
-f helm/values.yaml \
--set datadog.apiKey="$DD_API_KEY" \
--set datadog.appKey="$DD_APP_KEY"Notes:
- The legacy
stableHelm repository is deprecated and not required. helm upgrade --installis idempotent and safer for repeat runs.
bash ./operator/operator_deploy.shUse this only if you specifically want the operator flow in this repository.
kubectl apply -f storedog/- Kubernetes Overview: https://app.datadoghq.com/screen/integration/86/kubernetes-overview
If you created resources with Terraform:
cd terraform
terraform destroy -var='cluster-name=terraform-eks-demo'