More resources:
Terraform provider for AWS here
- Terraform CLI
- AWS CLI
# Get Terraform
curl -o /tmp/terraform.zip -LO https://releases.hashicorp.com/terraform/0.13.1/terraform_0.13.1_linux_amd64.zip
unzip /tmp/terraform.zip
chmod +x terraform && mv terraform /usr/local/bin/
terraform
You can get the Amazon CLI on it.
We'll need the Amazon CLI to gather information so we can build our Terraform file.
# Access your "My Security Credentials" section in your profile.
# Create an access key
aws configure
Default region name: ap-southeast-1
Default output format: json
Documentation on all the Kubernetes fields for terraform here
cd ./terraform
terraform init
terraform plan
terraform apply
# grab our EKS config
aws eks update-kubeconfig --name getting-started-eks --region ap-southeast-1
# Get kubectl
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
chmod +x ./kubectl
mv ./kubectl /usr/local/bin/kubectl
kubectl get nodes
kubectl get deploy
kubectl get pods
kubectl get svc
cd ./simple_deployments
kubectl apply -f nginx.yml
kubectl apply -f nginx-service.yml
kubectl get pod
kubectl get svc
terraform destroy