Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mastodon/terraform-hetzner-k8s-kubeone
Terraform module for deploying kubernetes clusters in Hetzner Cloud.
https://github.com/mastodon/terraform-hetzner-k8s-kubeone
Last synced: about 1 month ago
JSON representation
Terraform module for deploying kubernetes clusters in Hetzner Cloud.
- Host: GitHub
- URL: https://github.com/mastodon/terraform-hetzner-k8s-kubeone
- Owner: mastodon
- Created: 2023-04-03T23:43:47.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-26T13:01:36.000Z (5 months ago)
- Last Synced: 2024-09-30T09:21:18.087Z (about 1 month ago)
- Language: HCL
- Size: 18.6 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mastodon Terraform - Hetzner KubeOne Cluster
Terraform module for creating a Kubernetes cluster in Hetzner using KubeOne.
As Hetzner doesn't have a managed Kubernetes service, this module sets up a cluster to be compatible with [KubeOne](https://github.com/kubermatic/kubeone) as the cluster manager.
## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.8.0 |
| [hcloud](#requirement\_hcloud) | ~> 1.47.0 |## Providers
| Name | Version |
|------|---------|
| [hcloud](#provider\_hcloud) | ~> 1.47.0 |## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [hcloud_firewall.cluster](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/firewall) | resource |
| [hcloud_load_balancer.load_balancer](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/load_balancer) | resource |
| [hcloud_load_balancer_network.load_balancer](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/load_balancer_network) | resource |
| [hcloud_load_balancer_service.load_balancer_service](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/load_balancer_service) | resource |
| [hcloud_load_balancer_target.load_balancer_target](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/load_balancer_target) | resource |
| [hcloud_network.net](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/network) | resource |
| [hcloud_network_subnet.kubeone](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/network_subnet) | resource |
| [hcloud_placement_group.control_plane](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/placement_group) | resource |
| [hcloud_server.control_plane](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/server) | resource |
| [hcloud_server_network.control_plane](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/server_network) | resource |
| [hcloud_ssh_keys.admin_keys](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/data-sources/ssh_keys) | data source |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [apiserver\_alternative\_names](#input\_apiserver\_alternative\_names) | subject alternative names for the API Server signing cert. | `list(string)` | `[]` | no |
| [cluster\_name](#input\_cluster\_name) | prefix for cloud resources | `string` | n/a | yes |
| [control\_plane\_datacenters](#input\_control\_plane\_datacenters) | n/a | `list(string)` |[| no |
"fsn1",
"nbg1",
"hel1"
]
| [control\_plane\_replicas](#input\_control\_plane\_replicas) | n/a | `number` | `3` | no |
| [control\_plane\_source\_ips](#input\_control\_plane\_source\_ips) | List of IPs that are allowed to connect to the control instances | `list(string)` | n/a | yes |
| [control\_plane\_type](#input\_control\_plane\_type) | n/a | `string` | `"cx22"` | no |
| [datacenter](#input\_datacenter) | n/a | `string` | `"nbg1"` | no |
| [disable\_kubeapi\_loadbalancer](#input\_disable\_kubeapi\_loadbalancer) | E2E tests specific variable to disable usage of any loadbalancer in front of kubeapi-server | `bool` | `false` | no |
| [image](#input\_image) | n/a | `string` | `"ubuntu-20.04"` | no |
| [initial\_machinedeployment\_operating\_system\_profile](#input\_initial\_machinedeployment\_operating\_system\_profile) | Name of operating system profile for MachineDeployments, only applicable if operating-system-manager addon is enabled.
If not specified, the default value will be added by machine-controller addon. | `string` | `""` | no |
| [ip\_range](#input\_ip\_range) | ip range to use for private network | `string` | `"192.168.0.0/16"` | no |
| [ip\_range\_cloud](#input\_ip\_range\_cloud) | ip range to use for the cloud instances | `string` | `"192.168.0.0/17"` | no |
| [lb\_type](#input\_lb\_type) | n/a | `string` | `"lb11"` | no |
| [network\_zone](#input\_network\_zone) | network zone to use for private network | `string` | `"eu-central"` | no |
| [ssh\_agent\_socket](#input\_ssh\_agent\_socket) | SSH Agent socket, default to grab from $SSH\_AUTH\_SOCK | `string` | `"env:SSH_AUTH_SOCK"` | no |
| [ssh\_key\_selector](#input\_ssh\_key\_selector) | Selector to use when automatically pulling existing SSH keys. | `string` | `"role=admin"` | no |
| [ssh\_keys](#input\_ssh\_keys) | List of SSH keys that will have access to the server. If none are given, existing SSH keys in Hetzner will be used. | `list(string)` | `[]` | no |
| [ssh\_port](#input\_ssh\_port) | SSH port to be used to provision instances | `number` | `22` | no |
| [ssh\_username](#input\_ssh\_username) | SSH user, used only in output | `string` | `"root"` | no |
| [worker\_os](#input\_worker\_os) | OS to run on worker machines | `string` | `"ubuntu"` | no |
| [worker\_type](#input\_worker\_type) | n/a | `string` | `"cx22"` | no |## Outputs
| Name | Description |
|------|-------------|
| [kubeone\_api](#output\_kubeone\_api) | kube-apiserver LB endpoint |
| [kubeone\_hosts](#output\_kubeone\_hosts) | Control plane endpoints to SSH to |
| [ssh\_commands](#output\_ssh\_commands) | n/a |