- AWS account
- AWS IAM user
% aws --version
aws-cli/2.11.5 Python/3.11.2 Darwin/22.3.0 exe/x86_64 prompt/off
% aws sts get-caller-identity
{
"UserId": "YYA4ZRSAMPLE6IDAGV2YP",
"Account": "378929636692",
"Arn": "arn:aws:iam::378929636692:user/dockerbisson"
}
- Create account
- Create an org
- Terraform variables with AWS credentials
From the top level of the repo
brew install terraform
terraform init
terraform plan
time terraform apply -auto-approve
Get kubectl
config (more details):
aws eks --region us-west-2 update-kubeconfig --name demo-eks
The region
and name
values match those in the main.tf
file.
Install the helm chart
cd helm
helm install --create-namespace -n hello-telepresence-for-docker app ./hello-telepresence-for-docker --debug
Get all details in that namespace
kubectl get all -n hello-telepresence-for-docker
Open the app
open "http://$(kubectl get service -n hello-telepresence-for-docker -o json | jq -r '.items[].status.loadBalancer.ingress[].hostname')"
helm delete -n hello-telepresence-for-docker $(helm ls --namespace hello-telepresence-for-docker --short)
From the top-level of the repo
terraform destroy -auto-approve
- Manually delete any load balancers associated with the cluster in the web console
terraform destroy -auto-approve
again
If needed...
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- Originally created as a fork of https://github.com/hashicorp/learn-terraform-provision-eks-cluster, based on a Terraform EKS tutorial: https://developer.hashicorp.com/terraform/tutorials/kubernetes/eks
- the "hello-app" is derived from https://github.com/paulbouwer/hello-kubernetes