ec2-k3s

command module
v0.0.0-...-a5e26f1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

Provision a k3s Cluster in AWS

ec2-k3s can be used to:

  • Provision AWS infrastructure

    • ec2 instance
    • security group
    • ssh keypair
  • Create k3s cluster on the ec2 instance

Prerequisites

Default Configuration

  • Ubuntu 22.04 LTS AMI for the ec2 instance

  • Security group

    • Ingress rules

      • All ports and protocols allowed from workstation IP address only
    • Egress rules

      • All ports and protocols allowed to any IP address
  • SSH keypair uses local SSH public key at ~/.ssh/id_rsa.pub

Usage

Clone the repository and change directories into it
git clone https://github.com/lucasrod16/ec2-k3s.git && cd ec2-k3s
List Makefile targets
make help
Build from source

The build step outputs the binary in the current working directory

make build

It can be executed by referencing it as ./ec2-k3s

Create a config file

The config file can be YAML or JSON

The region and instanceType fields are required

To view a full list of instance type options, see here

region: us-east-1
instanceType: t2.micro

Provision a k3s cluster in AWS

./ec2-k3s up -f config.yaml

Teardown AWS infrastructure and k3s cluster

./ec2-k3s down -f config.yaml

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
src
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL