This in-line module deploys the K3S cluster.
-
Terraform tries to replace all variables within the templated script, so it fails
As a workaround, an extra dollar symbol ($) has been added to the variables that doesn't need to be replaced by terraform templating.
-
The loopback interface for API LB cannot be up until K3s is fully installed in the extra control plane nodes
Otherwise they will try to join themselves... that's why there is a curl to the K3s API that waits for the first master to be up before trying to install K3s and also why the bird configuration happens after K3s is up and running in the other nodes.
-
ServiceLB disabled
--disable servicelb
is required for metallb to work
Name | Version |
---|---|
terraform | >= 1.3 |
equinix | >= 1.14.2 |
random | >= 3.5.1 |
Name | Version |
---|---|
equinix | >= 1.14.2 |
random | >= 3.5.1 |
No modules.
Name | Type |
---|---|
equinix_metal_bgp_session.all_in_one | resource |
equinix_metal_bgp_session.control_plane_master | resource |
equinix_metal_bgp_session.control_plane_second | resource |
equinix_metal_bgp_session.control_plane_third | resource |
equinix_metal_device.all_in_one | resource |
equinix_metal_device.control_plane_master | resource |
equinix_metal_device.control_plane_others | resource |
equinix_metal_device.nodes | resource |
equinix_metal_reserved_ip_block.api_vip_addr | resource |
equinix_metal_reserved_ip_block.ip_pool | resource |
random_string.random_k3s_token | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
metal_metro | Equinix Metal Metro | string |
n/a | yes |
metal_project_id | Equinix Metal Project ID | string |
n/a | yes |
cluster_name | Cluster name | string |
"K3s cluster" |
no |
control_plane_hostnames | Control plane hostname prefix | string |
"cp" |
no |
custom_k3s_token | K3s token used for nodes to join the cluster (autogenerated otherwise) | string |
null |
no |
deploy_demo | Deploys a simple demo using a global IP as ingress and a hello-kubernetes pods | bool |
false |
no |
global_ip_cidr | Global Anycast IP that will be mapped on all metros via BGP | string |
null |
no |
ip_pool_count | Number of public IPv4 per metro to be used as LoadBalancers with MetalLB | number |
0 |
no |
k3s_ha | K3s HA (aka 3 control plane nodes) | bool |
false |
no |
k3s_version | K3s version to be installed. Empty for latest | string |
"" |
no |
metallb_version | MetalLB version to be installed. Empty for latest | string |
"" |
no |
node_count | Number of K3s nodes | number |
"0" |
no |
node_hostnames | Node hostname prefix | string |
"node" |
no |
os | Operating system | string |
"debian_11" |
no |
plan_control_plane | K3s control plane type/size | string |
"c3.small.x86" |
no |
plan_node | K3s node type/size | string |
"c3.small.x86" |
no |
Name | Description |
---|---|
k3s_api_ip | K3s API IPs |