Skip to content

Opinionated terraform way to deploy Kubernetes on AWS

Notifications You must be signed in to change notification settings

RichardKnop/amazonetes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

amazonetes

This repository provides an opinionated Terraform module to deploy a Kubernetes cluster on AWS using CoreOS.

It is a WORK IN PROGRESS, please use it on your own risk.

Index

Quick Start

It creates an etcd cluster and private docker registry with S3 storage backend, sets up a private Route53 DNS and then creates Kubernetes master and worker nodes. All internal traffic is encrypted using self signed certificates.

First, init terraform modules.

terraform get

Second , choose a public key of your ssh key. It will get uploaded to all instances so you can ssh via the bastion.

export TF_VAR_public_key='ssh-rsa...'

Next, use terraform plan command to preview infrastructure that will get created:

make plan DEPLOY_ENV=stage

Finally, if you are happy with planned changes, use terraform apply to deploy Kubernetes:

make apply DEPLOY_ENV=stage

You can delete the Kubernetes cluster using terraform destroy command:

make destroy DEPLOY_ENV=stage

Bastion

Once you run the apply command, Terraform will write nat_public_ip output to the console at the end of deployment.

In order to ssh to instances inside the VPC, run this script to create a local ssh.config file:

./scripts/render-ssh-config $NAT_PUBLIC_IP

Replace $NAT_PUBLIC_IP with the real value from Terraform outputs.

Then you will be able to ssh to instances like this:

ssh -F ssh.config 10.0.1.10

About

Opinionated terraform way to deploy Kubernetes on AWS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published