Skip to content

Played around with Terraform to create Amazon EKS Kubernetes cluster and deploy something to it

Notifications You must be signed in to change notification settings

Envek/terraform-eks-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform example for Amazon EKS

Creates Amazon's Elastic Kubernetes service and installs stateful Redis into it.

This example is based on Terraform's manual on EKS with some parts replaced by more short eks_node_group declaration.

Prerequisites

  1. Install terraform
  2. Install aws-cli and configure it to your account
  3. Install kubectl and helm
  4. Install aws-iam-authenticator

Create a cluster

  1. Run terraform init to download binaries for providers: aws, kubernetes, helm
  2. Run terraform apply to create all the things (terraform will display what exactly and ask your consent)
  3. Wait patiently: it will take about 15 minutes.
  4. Insert generated kubectl configuration into ~/.kube/config (don't forget to switch current-context to it!)
  5. Enjoy your cluster with kubectl and helm!
  6. Don't forget to drop everything with terraform destroy (EKS isn't eligible for free tier and costs $0,10 per hour)

What to do next?

For example, you can install anycable-go or imgproxy:

helm repo add anycable https://helm.anycable.io/
helm install anycable-go anycable/anycable-go --set "ingress.enable=false,env.anycableRedisUrl=redis://:$(kubectl get secret --namespace default redis-test -o jsonpath="{.data.redis-password}" | base64 --decode)@redis-test-master:6379/0" --wait --atomic

What is missing?

Many things required for production usage: Ingress, authentication and authorization, …

About

Played around with Terraform to create Amazon EKS Kubernetes cluster and deploy something to it

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages