Skip to content

unamem/terraform-aws-kubernetes

 
 

Repository files navigation

Terraform module for kubernetes on AWS

Build Status https://www.terraform.io/ License: MIT Average time to resolve an issue Percentage of issues still open

This repo contains the module to install a kubernetes cluster in your environment. More informations can be found at its own repo:

NOTE: It only suppport terraform 0.12.x onward.

For older Terraform version please use:

  • For 0.11 the tag v0.11.x-last-supported-code

Connect to the cluster

You can follow the guide here:

AWS EKS

If you are interested in AWS EKS I can advice to read the following link:

The code is already implemented here:

AWS also released a quickstart here:

Gotchas

This module is not ready for a production workload. The first thing you want to do if going in that direction is to separate etcd in it's own external cluster or run it with the operator platoform.

The second thing you want to do is add autoscaling to the workers nodes and diversify the set of ec2 server to give different combination of CPU/RAM.

As it is now there is no path to upgrade aside moving the workload to another cluster. It is not a big problem if you run everything stateless, but keep it in mind.

Implementation choices

At the moment I wanted to avid dependencies to external tools like ansible, so the installation happens in bash with cloud-init. This means some architectural choices are defined in there and they can't be modified. One example is I am using weave as overlay network implementation and swapping it with flannel is not possible.

Obviously this can be fixed, just fork and PR into this :)

Regenerate docs

The script "regenerate.sh" is used to refresh the dependencies and the params file. It should be run it after any parameter change or when new resources are added.

./regenerate.sh
k8s: params regenerated

You need to install terraform-docs:

go get github.com/segmentio/terraform-docs

About

A terraform open source module to spin a kubernetes cluster in your AWS environment

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 82.7%
  • Shell 17.3%