GithubHelp home page GithubHelp logo

cesarbgoncalves / terraform-k3s-on-ec2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yardbirdsax/terraform-k3s-on-ec2

0.0 0.0 0.0 52 KB

A Terraform module for deploying single node k3s on AWS EC2 instances

License: Apache License 2.0

HCL 64.11% Dockerfile 35.89%

terraform-k3s-on-ec2's Introduction

k3s on EC2 with Terraform

This is a Terraform module that will provision a single node k3s cluster using AWS EC2 instances.

Requirements

No requirements.

Providers

Name Version
aws n/a
cloudinit n/a
random n/a

Modules

No modules.

Resources

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

Inputs

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

Outputs

Name Description
instance n/a

Worker-Node Autoscaling Group Feature

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.

terraform-k3s-on-ec2's People

Contributors

yardbirdsax avatar cesarbgoncalves avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.