The AWS Quickstart Terraform scripts can be used to create the needed infrastructure for a Kubernetes HA cluster. Check out the following AWS getting started walkthrough to learn more about how to use the scripts and how to provision a Kubernetes cluster using KubeOne.
terraform apply
terraform output -json > tf.json
export AWS_PROFILE=default
kubeone install config.yaml --tfjson .
cp hannes-kubeconfig ~/.kube
export KUBECONFIG=~/.kube/hannes-kubeconfig
kubeone reset config.yaml --tfjson
terraform destroy
Name | Version |
---|---|
terraform | >= 0.12.10 |
Name | Version |
---|---|
aws | n/a |
random | n/a |
Name | Description | Type | Default | Required |
---|---|---|---|---|
ami | AMI ID, use it to fixate control-plane AMI in order to avoid force-recreation it at later times | string |
"" |
no |
ami_filters | map with AMI filters | map |
{ |
no |
aws_region | AWS region to speak to | string |
"eu-west-3" |
no |
bastion_port | Bastion SSH port | number |
22 |
no |
bastion_type | instance type for bastion | string |
"t3.nano" |
no |
bastion_user | Bastion SSH username | string |
"ubuntu" |
no |
cluster_name | Name of the cluster | any |
n/a | yes |
control_plane_type | AWS instance type | string |
"t3.medium" |
no |
control_plane_volume_size | Size of the EBS volume, in Gb | number |
100 |
no |
initial_machinedeployment_replicas | number of replicas per MachineDeployment | number |
1 |
no |
internal_api_lb | make kubernetes API loadbalancer internal (reachible only from inside the VPC) | bool |
false |
no |
open_nodeports | open NodePorts flag | bool |
false |
no |
os | Operating System to use in AMI filtering and MachineDeployment | string |
"ubuntu" |
no |
ssh_agent_socket | SSH Agent socket, default to grab from $SSH_AUTH_SOCK | string |
"env:SSH_AUTH_SOCK" |
no |
ssh_port | SSH port to be used to provision instances | number |
22 |
no |
ssh_private_key_file | SSH private key file used to access instances | string |
"" |
no |
ssh_public_key_file | SSH public key file | string |
"~/.ssh/id_rsa.pub" |
no |
ssh_username | SSH user, used only in output | string |
"ubuntu" |
no |
subnets_cidr | CIDR mask bits per subnet | number |
24 |
no |
vpc_id | VPC to use ('default' for default VPC) | string |
"default" |
no |
worker_os | OS to run on worker machines, default to var.os | string |
"" |
no |
worker_type | instance type for workers | string |
"t3.medium" |
no |
Name | Description |
---|---|
kubeone_api | kube-apiserver LB endpoint |
kubeone_hosts | Control plane endpoints to SSH to |
kubeone_workers | Workers definitions, that will be transformed into MachineDeployment object |