Tired of creating clusters manually just to try something out for a few minutes? Then run this. Need some apps on that cluster really fast? Use Terraforms Helm Provider on top of their kubernetes provider to quickly deploy EKS clusters with your apps on top of them. In this example, I'm deploying Jenkins + AWX on EKS. It takes about 15 minutes from start to finish and minimal work.
- Terraform installed
- AWS cli installed on a host to connect to the cluster
- AWS credentials configured
- kubectl installed on a host to deploy to the cluster
- Install Terraform
- Clone this repository
- Edit
the jenkins-values.yamlandthe awx-values.yamlto match your values - Edit or remove the
set_sensitivearguments inhelm_release.tfif you would like to. These values will override the values in the*-values.yamlfiles. - Run a
terraform initto grab providers and modules - Run
aws_configureand establish your credentials for aws - Run a
terraform_applyand wait 10 - 15 minutes. Note: If it fails for HTTP timeout while waiting to apply the Helm chart, retryterraform_apply - Run
aws eks --region us-east-1 update-kubeconfig --name dev-clusterto add the cluster context to your kubeconfig - Run
kubectl get podsandkubectl get svcto ensure the applications deployed as expected - Run
kubectl patch svc <SERVICE_NAME> -p '{"spec": {"type": "LoadBalancer"}}'to change theServiceto typeLoadBalancer - Run
kubectl get svcagain to grab the AWS created DNS address - Go to your browser and navigate to
http://<dns-address>:<port>Note: This may take 3 - 5 minutes to resolve while waiting for the apps and the ELB to fully initialize. - Log in with the credentials you set in the
*-values.yamlor thehelm_release.tf - Profit
- Run
aws eks --region us-east-1 update-kubeconfig --name dev-clusterto add the context to your kubeconfig
- Possibility of resources not efficient. The instances in the worker group could be too small to assign IP addresses to all the pods
- Ensure the workers are getting public IP addresses