- Create a VPC (intra, private and public subnets)
- Create a management EKS cluster in a single zone
- Use SPOT instances
- Use bottlerocket AMI
- Install and configure Karpenter
- Install and configure Flux
- Write a secret that contains the cluster's specific variables that will be used with Flux. (please refer to variables substitutions)
- Deploy Cilium
- Edit the file
backend.tf
and put your own S3 bucket name. - Create a file that contains your own variables. Here's an example:
variables.tfvars
env = "dev"
cluster_name = "mycluster-0" # Generated with petname
github_owner = "Smana"
github_token = <REDACTED>
repository_name = "cilium-gateway-api"
tags = {
GithubRepo = "cilium-gateway-api"
GithubOrg = "Smana"
}
- Apply with
terraform apply -var-file variables.tfvars
In order to really clean everything you should follow these steps:
-
Suspend Flux reconciliations
flux suspend kustomization --all
-
Delete
Gateways
(These create AWS loadbalancers)kubectl delete gateways --all-namespaces --all
-
Wait 3/4 minutest and delete all
IRSA
kubectl delete irsa --all-namespaces --all
-
terraform destroy --var-file variables.tfvars
One step:
flux suspend kustomization --all && \
kubectl delete gateways --all-namespaces --all && sleep 60 && \
kubectl delete irsa --all-namespaces --all && sleep 30 && \
terraform destroy --var-file variables.tfvars