A Terraform module for provisioning and managing Kubernetes clusters on Thalassa Cloud. This module provides a complete solution for creating production-ready Kubernetes clusters with configurable node pools, networking, and advanced features.
| Name | Version |
|---|---|
| terraform | >= 1.0 |
| thalassa | >= 0.8 |
| Name | Version |
|---|---|
| thalassa | >= 0.8 |
| Name | Source | Version |
|---|---|---|
| nodepools | ./modules/nodepool | n/a |
| Name | Type |
|---|---|
| thalassa_kubernetes_cluster.this | resource |
| thalassa_kubernetes_node_pool.this | resource |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| name | The name of the Kubernetes cluster | string |
n/a | yes |
| region | The region to create the Kubernetes & Module resources in | string |
"nl-01" |
yes |
| subnet_id | The ID of the subnet to create the Kubernetes cluster in | string |
n/a | yes |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| organisation_id | The ID of the organisation to create the resources in. If not provided, the organisation set in the provider will be used | string |
null |
no |
| description | The description of the Kubernetes cluster | string |
null |
no |
| labels | The labels to apply to the module resources | map(string) |
{} |
no |
| annotations | The annotations to apply to the module resources | map(string) |
{} |
no |
| cni | The CNI to use for the Kubernetes cluster | string |
"cilium" |
no |
| cluster_version | The version of the Kubernetes cluster | string |
"1.33" |
no |
| vpc_id | The ID of the VPC to create the Kubernetes cluster in | string |
n/a | no |
| nodepools | The nodepools to create for the Kubernetes cluster | map(object({...})) |
{} |
no |
The nodepools variable accepts a map of node pool configurations with the following structure:
nodepools = {
"pool-name" = {
machine_type = string
availability_zones = list(string)
replicas = optional(number, 1)
subnet_id = string
# Node pool metadata
labels = optional(map(string))
annotations = optional(map(string))
# Auto scaling
enable_auto_scaling = optional(bool, false)
min_replicas = optional(number)
max_replicas = optional(number)
# Auto healing
enable_autohealing = optional(bool, false)
# Versioning
kubernetes_version = optional(string)
upgrade_strategy = optional(string, "always")
# Node customizations
node_labels = optional(map(string))
node_annotations = optional(map(string))
node_taints = optional(list(object({
key = string
value = string
effect = string
})))
}
}| Name | Description |
|---|---|
cluster_id |
The ID of the created Kubernetes cluster |
cluster_name |
The name of the created Kubernetes cluster |
cluster_region |
The region where the cluster is deployed |
cluster_version |
The Kubernetes version of the cluster |
cluster_cni |
The CNI used by the cluster |
nodepool_ids |
Map of node pool names to their IDs |
module "kubernetes" {
source = "thalassa-cloud/kubernetes/thalassa"
organisation_id = "your-org-id"
name = "my-cluster"
description = "Production Kubernetes cluster"
region = "nl-01"
subnet_id = "subnet-12345"
labels = {
environment = "production"
team = "platform"
}
}module "kubernetes" {
source = "thalassa-cloud/kubernetes/thalassa"
organisation_id = "your-org-id"
name = "production-cluster"
description = "Production Kubernetes cluster with multiple node pools"
region = "nl-01"
subnet_id = module.vpc.private_subnet_ids["private"]
labels = {
environment = "production"
team = "platform"
}
nodepools = {
"system" = {
machine_type = "pgp-large"
availability_zones = ["nl-01a", "nl-01b"]
replicas = 2
subnet_id = module.vpc.private_subnet_ids["private"]
enable_autohealing = true
labels = {
node-pool = "system"
}
}
"workers" = {
machine_type = "pgp-medium"
availability_zones = ["nl-01a", "nl-01b", "nl-01c"]
replicas = 3
subnet_id = module.vpc.private_subnet_ids["private"]
enable_auto_scaling = true
min_replicas = 3
max_replicas = 10
enable_autohealing = true
node_labels = {
node-pool = "workers"
workload = "general"
}
node_taints = [
{
key = "workload"
value = "general"
effect = "NoSchedule"
}
]
}
}
}See the examples directory for complete working examples:
- Simple Example: Basic Kubernetes cluster setup with a single node pool
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This module is licensed under the MIT License. See the LICENSE file for details.
For support and questions, please open an issue in the GitHub repository or contact the Thalassa Cloud team.