This is a Terraform module that will provision a single node k3s cluster using AWS EC2 instances.
No requirements.
Name | Version |
---|---|
aws | n/a |
cloudinit | n/a |
random | n/a |
No modules.
Name | Type |
---|---|
aws_autoscaling_group.agent_autoscaling_group | resource |
aws_iam_instance_profile.instance_profile | resource |
aws_instance.k3s_instance | resource |
aws_key_pair.k3s_keypair | resource |
aws_launch_template.agent_launch_template | resource |
random_string.agent_token | resource |
aws_ami.ubuntu | data source |
cloudinit_config.agent_user_data | data source |
cloudinit_config.userData | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
ami_id | The AMI ID to use when provisioning the instance. If left at the default null value, the latest Ubuntu server image is used. | string |
null |
no |
assign_public_ip | If set to 'true', a public IP address will be assigned to the instance. | bool |
true |
no |
deployment_name | A unique name used to generate other names for resources, such as instance names. | string |
"k3s" |
no |
enable_worker_nodes | If set to 'true', a separate autoscaling group will be created for worker nodes. | bool |
false |
no |
iam_role_name | The name of an IAM Role to assign to the instance. If left blank, no role will be assigned. | string |
null |
no |
instance_type | The AWS EC2 Instance Type to provision the instance as. | string |
"t3.small" |
no |
keypair_content | The raw data to be used for the public key for the instance. If this is used, no value must be specified for 'keypair_path'. | string |
"" |
no |
keypair_path | The path to the public key to use for the instance. | string |
"" |
no |
kubeconfig_mode | Sets the file mode of the generated KUBECONFIG file on the master k3s instance. Defaults to '600'. | string |
"600" |
no |
manifest_bucket_path | The AWS S3 bucket name and path that will be used to download manifest files for auto-installation as per this documentation. Should be specified as 'bucket name/folder name/'. The IAM Role assigned to the instance must have GetObject access to this bucket. | string |
"" |
no |
security_group_ids | A list of Security Group IDs to assign to the instance. | list(string) |
n/a | yes |
subnet_id | The ID of a VPC subnet to assign the instance to. If left blank, the instance will be provisioned in the default subnet of the default VPC. | string |
"" |
no |
worker_node_desired_count | The desired number of worker nodes to provision. | number |
0 |
no |
worker_node_max_count | The maximum number of worker node instances to provsion. | number |
0 |
no |
worker_node_min_count | The minimum number of worker node instances to provision. | number |
0 |
no |
Name | Description |
---|---|
instance | n/a |
Currently the module allows for the provisioning of a separate autoscaling group for worker (non master) nodes. This is a new feature and has the following caveats / limitations:
- The worker-node instances will be placed in the same subnet as the master node. Deployments in multiple subnets are not currently possible.
- The worker-node instances will be assigned to the same security group(s) as the master node.
- The worker-node instances will be assigned to the same instance profile as the master node.
- The worker-node instances will be the same Instance Type as the master node.
- The worker-node instances will be assigned public IPs if the master node is.
It is the intention to enhance the module over time to allow more granular control of the worker nodes, such as assigning different Instance Profiles, multiple subnets, etc.
Please keep a close watch on the Change Log file as versions are published, as behavior may change over time. Effort will be made to keep key functionality the same as much as possible.