aws
Using Docker image
This is the easiest way to deploy an HA Kubernetes cluster on AWS with kubernautslabs/tk8 docker image.
Prerequisites
Git
Docker
Existing SSH keypair in AWS
AWS access and secret keys
Provision the cluster using CLI
Prerequisites
You can download the TK8 CLI for Linux and Mac OSX under releases here.
Make sure you have the sufficient permissions to create following resources in AWS
VPC with Public/Private Subnets, and NAT Gateways in different Availability Zones
EC2 instances used for bastion host, masters, etcd, and worker nodes
AWS ELB in the Public Subnet for accessing the Kubernetes API from the internet
IAM Roles which will be used with the nodes
Provide the AWS credentials in either of the following ways:
Environment Variables. You will need to specify
AWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
.
Clone the tk8 repo
Adapt the config.yaml
file to specify the cluster details. Example config:
Once done run:
Post installation the kubeconfig will be available at: ./kubespray/inventory/awscluster/artifacts/admin.conf
Do not delete the kubespray directory post installation as the cluster state will be saved in it.
Destroy the provisioned cluster
Make sure you are in same directory where you executed tk8 cluster init
with the cloned kubespray directory.
To delete the provisioned cluster run:
Last updated