k3s
camptocamp/k3s/docker
Terraform Module
HCL
DOCKER
Install
module "k3s" {
source = "camptocamp/k3s/docker"
version = "1.0.1"
}
README
terraform-docker-k3s A terraform module to create a K3s cluster on Docker. Available through the Terraform registry. Inspired by and adapted from this docker composition.
Inputs (12)
| Name | Type | Description | Default |
|---|---|---|---|
| cluster_endpoint | string | The api endpoint, when empty it's the container's IP. | required |
| network_name | string | Docker network to use. Creates a new one if null. | required |
| cluster_name | string | The name of the Kubernetes cluster to create. | required |
| registry_mirrors | map | {
"docker.io": [
"REGISTRY_PROXY_R | |
| restart | string | Restart policy for the cluster. | "unless-stopped" |
| server_ports | set(object({ internal = nu | Port mappings of the server container. | [] |
| wait_for_cluster_cmd | string | Custom local-exec command to execute for determining if the eks cluster is healt | "for i in `seq 1 60`; do if `command -v |
| wait_for_cluster_interpreter | list(string) | Custom local-exec command line interpreter for the command to determining if the | [
"/bin/sh",
"-c"
] |
| server_config | list(string) | The command line flags passed to the K3s server | [] |
| worker_groups | map(object({ node_count = | A map defining worker group configurations | {
"default": {
"node_count": 2,
|
| csi_support | bool | Container Storage Interface requires /var/lib/kubelet to be mounted with rshared | false |
| k3s_version | string | The K3s version to use | "v1.19.2-k3s1" |
Outputs (3)
cluster_endpointingress_ip_addresskubeconfig — kubectl config file contents for this K3s cluster.Resources (7)
docker_containerdocker_imagedocker_networkdocker_volumelocal_filenull_resourcerandom_password
Details
FrameworkTerraform Module
LanguageHCL
Version1.0.1
Cloud DOCKER
★ Stars6
Forks7
Total downloads32.1k
Inputs12
Outputs3
Resources7
Submodules1
Namespacecamptocamp
Updated