Skip to content

rajeshkio/terraform-aws-k8s

Repository files navigation

Setting up kubernetes on AWS EC2 with terraform

Script has been written for 1 master and multi worker setup. Adding multiple master will need changes in the scripts. This will create a VPC, subnets, private ips, security groups and other required aws resources . This will create cluster in ap-south-1, if you are creating in different region, please use the correct AMI.

Step:

1 - Install terraform and configure aws credentials using awscli aws configure --profile <profilename>

  https://learn.hashicorp.com/tutorials/terraform/aws-build?in=terraform/aws-get-started

2 - git clone https://github.com/rk280392/terraform-aws-k8s.git

3 - cd terraform-aws-k8s

4 - terraform plan

5 - terraform apply

Get Nodes

get-nodes

Get Pods

get-pods

Manage EC2 instances:

You can modify the script as you need.

List all instances created using the key-pair of terraform:

  • ./aws-cli-scripts.sh list <profile-name>

list-instances

Stop all instances listed by list command:

  • ./aws-cli-scripts.sh stop <profile-name>

stop-instances

Start all instances listed by list command:

  • ./aws-cli-scripts.sh start <profile-name>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published