Skip to content

An attempt to implement Kelsey Hightower's kubernetes-the-hard-way tutorial on AWS using Terraform.

Notifications You must be signed in to change notification settings

pauldailly/kubernetes-the-hard-way-terraform-aws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes the hard way - Terraform AWS

An attempt to implement Kelsey Hightower's kubernetes-the-hard-way tutorial on AWS using Terraform and Ansible.

Installation

The following steps are required to setup and run this project:

  1. Clone the repo
  2. Generate an SSH key which can be used to SSH to the Kubernetes EC2 instances which will be created. The generated public/private key pair should be generated in a folder matching the path(s) found in the respective variables PATH_TO_PRIVATE_KEY and PATH_TO_PUBLIC_KEY which are declared in the Terraform variables file. An example of generating such a public/private key pair is given below:
ssh-keygen -t rsa -b 4096 -C "kubernetes-the-hard-way" -f kubernetes_ec2_key
  1. Ensure that the AWS credentials profile that you wish to use to run this project is specified correctly in the AWS_PROFILE variable in the Terraform variables file.
  2. Install Terraform.
  3. Install go.
  4. Install the following cfssl tools:
go get -u github.com/cloudflare/cfssl/cmd/cfssl
go get -u github.com/cloudflare/cfssl/cmd/cfssljson
go get -u github.com/cloudflare/cfssl/cmd/mkbundle
  1. From the terraform directory execute the following to ensure that the expected resources will be created:
terraform plan

and then to actually create the required AWS resources:

terraform apply
  1. Install Ansible:
pip install ansible
  1. Install boto
pip install boto
  1. From the ansible directory run
./infrastructure.sh
  1. Install kubectl
  2. From project root run:
./configure-kubectl.sh  [URL OF LOADBALANCER]

where URL OF LOADBALANCER should be the URL of the load balancer created as part of the cluster setup.

About

An attempt to implement Kelsey Hightower's kubernetes-the-hard-way tutorial on AWS using Terraform.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published