https://github.com/richardknop/amazonetes
Opinionated terraform way to deploy Kubernetes on AWS
https://github.com/richardknop/amazonetes
coreos kubernetes terraform
Last synced: about 2 months ago
JSON representation
Opinionated terraform way to deploy Kubernetes on AWS
- Host: GitHub
- URL: https://github.com/richardknop/amazonetes
- Owner: RichardKnop
- Created: 2016-12-15T10:16:33.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-19T07:50:24.000Z (over 9 years ago)
- Last Synced: 2025-10-24T06:27:47.108Z (9 months ago)
- Topics: coreos, kubernetes, terraform
- Language: HCL
- Homepage:
- Size: 44.9 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
* [amazonetes](#amazonetes)
* [Index](#index)
* [Quick Start](#quick-start)
* [Bastion](#bastion)
# 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.
```sh
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.
```sh
export TF_VAR_public_key='ssh-rsa...'
```
Next, use `terraform plan` command to preview infrastructure that will get created:
```sh
make plan DEPLOY_ENV=stage
```
Finally, if you are happy with planned changes, use `terraform apply` to deploy Kubernetes:
```sh
make apply DEPLOY_ENV=stage
```
You can delete the Kubernetes cluster using `terraform destroy` command:
```sh
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:
```sh
./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:
```sh
ssh -F ssh.config 10.0.1.10
```