k3s

Kab1r/k3s/module

Terraform Module HCL MODULE

Terraform module to install K3S on all given instances

Install
module "k3s" {
source = "Kab1r/k3s/module"
version = "3.1.2-debug"
}
plain text: /constructs/tfmod-kab1r-k3s-module/install.txt
⭐ Source on GitHub 📦 Registry page
README

terraform-module-k3s !Terraform Version ![GitHub tag (latest SemVer)](https://registry.terraform.io/modules/xunleii/k3s) ![GitHub issues](https://github.com/xunleii/terraform-module-k3s/issues) ![Open Source Helpers](https://www.codetriage.com/xunleii/terraform-module-k3s) ![MIT Licensed](https://tldrlegal.com/license/mit-license) Terraform module which creates a k3s cluster, with multi-server and annotations/labels/taints management features. Usage ``` hcl module "k3s" { source = "xunleii/k3s/module" k3s_version = "v1.0.0" name = "my.k3s.local" cidr = { pods = "10.0.0.0/16" services = "10.1.0.0/16" } drain_timeout = "30s" managed_fields = ["label", "taint"] global_flags = [ "--tls-san k3s.my.domain.com" ] servers = { # The node name will be automatically provided by # the module using the

Inputs (15)
NameTypeDescriptionDefault
depends_on_stringResouce dependency of this module. required
root_server_ipstring required
serversmap(any)K3s server nodes definition. The key is used as node name if no name is provided required
global_flagslist(string)Add additional installation flags, used by all nodes (see https://rancher.com/do[]
managed_fieldslist(string)List of fields which must be managed by this module (can be annotation, label an[ "annotation", "label", "taint" ]
cluster_domainstringK3s cluster domain name (see https://rancher.com/docs/k3s/latest/en/installation"cluster.local"
generate_ca_certificatesboolIf true, this module will generate the CA certificates (see https://github.com/rtrue
drain_timeoutstringThe length of time to wait before giving up the node draining. Infinite by defau"0s"
separatorstringSeparator used to separates node name and field name (used to manage annotations"|"
use_sudoboolWhether or not to use kubectl with sudo during cluster setup.false
k3s_versionstringSpecify the k3s version. You can choose from the following release channels or p"latest"
cidrobject({ pods = stringK3s network CIDRs (see https://rancher.com/docs/k3s/latest/en/installation/insta{ "pods": "10.42.0.0/16", "services"
agentsmap(any)K3s agent nodes definitions. The key is used as node name if no name is provided{}
namestringK3s cluster domain name (see https://rancher.com/docs/k3s/latest/en/installation"!!!DEPRECATED!!!"
kubernetes_certificateslist( object({ file_A list of maps of cerificate-name.[crt/key] : cerficate-value to copied to /var/[]
Outputs (5)
kubernetes_cluster_secret — Secret token used to join nodes to the cluster
kubernetes — Authentication credentials of Kubernetes (full administrator).
kube_config — Genereated kubeconfig.
summary — Current state of k3s (version & nodes).
kubernetes_ready — Dependency endpoint to synchronize k3s installation and provisioning.
Resources (6)
null_resourcerandom_passwordtls_cert_requesttls_locally_signed_certtls_private_keytls_self_signed_cert
Details
FrameworkTerraform Module
LanguageHCL
Version3.1.2-debug
Cloud MODULE
Total downloads449
Inputs15
Outputs5
Resources6
Examples2
NamespaceKab1r
Updated