Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/damoun/terraform-hetzner-kube

Terraform module to deploy Kubernetes on Hetzner Cloud.
https://github.com/damoun/terraform-hetzner-kube

Last synced: about 1 month ago
JSON representation

Terraform module to deploy Kubernetes on Hetzner Cloud.

Awesome Lists containing this project

README

        


terraform-hetzner-kube


Terraform module to deploy Kubernetes on Hetzner Cloud.


Requirements
Example
Providers
Modules
Inputs
Outputs
Resources

## Requirements

| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.8.4 |
| [hcloud](#requirement\_hcloud) | 1.48.0 |

## Example

```hcl
module "hz-eu" {
source = "damoun/kube/hetzner"

hcloud_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

name = "hz-eu"

ssh_public_key = file("~/.ssh/id_ed25519.pub")
ssh_private_key = file("~/.ssh/id_ed25519")

region = "eu-central"

control_plane_nodepools = [{
server_type = "cax11"
location = "fsn1"
}]

agent_nodepools = [{
server_type = "cax11"
location = "fsn1"
}]
}
```

## Providers

No providers.

## Modules

| Name | Source | Version |
|------|--------|---------|
| [kube](#module\_kube) | kube-hetzner/kube-hetzner/hcloud | 2.14.4 |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [agent\_nodepools](#input\_agent\_nodepools) | The number of agent nodes. |

list(object({
name = optional(string, "agent")
server_type = string
location = string
backups = optional(bool)
floating_ip = optional(bool)
labels = optional(list(string), [])
taints = optional(list(string), [])
longhorn_volume_size = optional(number)
swap_size = optional(string, "")
zram_size = optional(string, "")
kubelet_args = optional(list(string), ["kube-reserved=cpu=50m,memory=300Mi,ephemeral-storage=1Gi", "system-reserved=cpu=250m,memory=300Mi"])
selinux = optional(bool, true)
placement_group_compat_idx = optional(number, 0)
placement_group = optional(string, null)
count = optional(number, 1)
nodes = optional(map(object({
server_type = optional(string)
location = optional(string)
backups = optional(bool)
floating_ip = optional(bool)
labels = optional(list(string))
taints = optional(list(string))
longhorn_volume_size = optional(number)
swap_size = optional(string, "")
zram_size = optional(string, "")
kubelet_args = optional(list(string), ["kube-reserved=cpu=50m,memory=300Mi,ephemeral-storage=1Gi", "system-reserved=cpu=250m,memory=300Mi"])
selinux = optional(bool, true)
placement_group_compat_idx = optional(number, 0)
placement_group = optional(string, null)
append_index_to_node_name = optional(bool, true)
})))
}))
| n/a | yes |
| [autoscaler\_nodepools](#input\_autoscaler\_nodepools) | The cluster autoscaler nodepools. |
list(object({
name = string
server_type = string
location = string
min_nodes = number
max_nodes = number
labels = optional(map(string), {})
kubelet_args = optional(list(string), ["kube-reserved=cpu=50m,memory=300Mi,ephemeral-storage=1Gi", "system-reserved=cpu=250m,memory=300Mi"])
taints = optional(list(object({
key = string
value = string
effect = string
})), [])
}))
| `[]` | no |
| [control\_plane\_nodepools](#input\_control\_plane\_nodepools) | The number of control plane nodes. |
list(object({
name = optional(string, "control-plane")
server_type = string
location = string
backups = optional(bool)
labels = optional(list(string), [])
taints = optional(list(string), [])
count = optional(number, 1)
swap_size = optional(string, "")
zram_size = optional(string, "")
kubelet_args = optional(list(string), ["kube-reserved=cpu=250m,memory=1500Mi,ephemeral-storage=1Gi", "system-reserved=cpu=250m,memory=300Mi"])
selinux = optional(bool, true)
placement_group_compat_idx = optional(number, 0)
placement_group = optional(string, null)
}))
| n/a | yes |
| [dns\_servers](#input\_dns\_servers) | The DNS servers to use. | `list(string)` |
[
"185.12.64.1",
"185.12.64.2",
"2a01:4ff:ff00::add:1"
]
| no |
| [etcd\_s3\_backup](#input\_etcd\_s3\_backup) | Etcd cluster state backup to S3 storage | `map(any)` | `{}` | no |
| [firewall\_kube\_api\_source](#input\_firewall\_kube\_api\_source) | Source networks that have Kube API access to the servers. | `list(string)` |
[
"0.0.0.0/0",
"::/0"
]
| no |
| [firewall\_ssh\_source](#input\_firewall\_ssh\_source) | Source networks that have SSH access to the servers. | `list(string)` |
[
"0.0.0.0/0",
"::/0"
]
| no |
| [hcloud\_token](#input\_hcloud\_token) | The Hetzner Cloud API token. | `string` | n/a | yes |
| [ingress\_controller](#input\_ingress\_controller) | Ingress controller to install. Disabled by default. | `string` | `"none"` | no |
| [name](#input\_name) | The name of the cluster. | `string` | n/a | yes |
| [region](#input\_region) | The region where the cluster should be created. | `string` | n/a | yes |
| [ssh\_private\_key](#input\_ssh\_private\_key) | SSH private Key. | `string` | n/a | yes |
| [ssh\_public\_key](#input\_ssh\_public\_key) | SSH public Key. | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| [kubeconfig](#output\_kubeconfig) | Value of the kubeconfig |
| [ssh\_key\_id](#output\_ssh\_key\_id) | The ID of the SSH key on Hetzner Cloud. |

## Resources

No resources.