The module creates a Managed Kubernetes Service cluster in OVH.
Supported Kubernetes versions are 1.33 and newer.

Multi-availability zones feature is available only for cluster scope (control plane components), but not for node pools. It's necessary to specify a single AZ for node pool creation.

NOTE: Multi-AZ control plane distribution is available only in EU-WEST-PAR region.

NOTE: This module is meant to be used with an already created VPC.

Log in to Corewide IaC registry

Once you have a Corewide Solutions Portal account, this one-time action will use your browser session to retrieve credentials:

 shellterraform login solutions.corewide.com
Provision instructions

Initialize mandatory providers:

Copy and paste into your Terraform configuration and insert the variables:

 hclmodule "tf_ovh_k8s" {
  source  = "solutions.corewide.com/ovh/tf-ovh-k8s/ovh"
  version = "~> 1.0.0"

  # specify module inputs here or try one of the examples below
  ...
}

Initialize the setup:

 shellterraform init
Define update strategy

Corewide DevOps team strictly follows Semantic Versioning Specification to provide our clients with products that have predictable upgrades between versions. We recommend pinning patch versions of our modules using pessimistic constraint operator (~>) to prevent breaking changes during upgrades.

To get new features during the upgrades (without breaking compatibility), use ~> 1.0 and run terraform init -upgrade

For the safest setup, use strict pinning with version = "1.0.0"

OVH Kubernetes Cluster

OVH Kubernetes Cluster management
Module
65% off
€820
€290
TOTAL €290
BUY
v1.0.0 released 9 months ago

The module creates a Managed Kubernetes Service cluster in OVH.
Supported Kubernetes versions are 1.33 and newer.

Multi-availability zones feature is available only for cluster scope (control plane components), but not for node pools. It's necessary to specify a single AZ for node pool creation.

NOTE: Multi-AZ control plane distribution is available only in EU-WEST-PAR region.

NOTE: This module is meant to be used with an already created VPC.

A basic Kubernetes cluster with one default foo node pool:

 hclmodule "k8s" {
  source  = "solutions.corewide.com/ovh/tf-ovh-k8s/ovh"
  version = "~> 1.0"

  name_prefix  = "foo"
  region       = "DE1"
  service_name = "b3a231dc80e94578b8a9a946b84921d2"

  vpc = {
    private_network_id = "744d4b9d-3733-43ae-afc6-b0718257fc25"
    subnet_id          = "18758aa7-9af5-4a51-b117-9bcf3ea6e2dp"
  }

  node_pools = [
    {
      name = "foo"
    },
  ]
}

A custom Kubernetes cluster with a default maintenance and an additional foo node pools, located in a multi-AZ region, a custom cluster version, and an update policy set:

 hcldata "ovh_cloud_project_region" "current" {
  name         = "EU-WEST-PAR"
  service_name = "b3a231dc80e94578b8a9a946b84921d2"
}

module "k8s" {
  source  = "solutions.corewide.com/ovh/tf-ovh-k8s/ovh"
  version = "~> 1.0"

  name_prefix     = "foo"
  cluster_version = "1.33"
  update_policy   = "ALWAYS_UPDATE"
  region          = "EU-WEST-PAR"
  service_name    = "b3a231dc80e94578b8a9a946b84921d2"

  vpc = {
    private_network_id = "744d4b9d-3733-43ae-afc6-b0718257fc25"
    subnet_id          = "18758aa7-9af5-4a51-b117-9bcf3ea6e2dp"
  }

  node_pools = [
    {
      name               = "foo"
      availability_zones = [tolist(data.ovh_cloud_project_region.current.availability_zones)[0]]
    },
  ]
}
Variable Description Type Default Required Sensitive
name_prefix Name prefix for all resources of the module string yes no
region Region to deploy resources to string yes no
service_name OVHCloud service name (project ID) string yes no
vpc Object of VPC parameters used to place the cluster and node pools into object yes no
cluster_version Prefix of the major version of Kubernetes used for the cluster string 1.33 no no
default_node_pool Configuration of the maintenance node pool, that is created unconditionally object {} no no
default_node_pool.max_size Maximum number of nodes in the pool number 1 no no
default_node_pool.min_size Minimum number of nodes in the pool number 1 no no
default_node_pool.monthly_billed Whether the nodes must be billed monthly bool false no no
default_node_pool.node_size Instance type to use for node creation string b3-8 no no
node_pools List of parameters to create extra node pools list(object) [] no no
node_pools[*].availability_zones List of AZs to associate the pool - mandatory for multi-zone cluster. Only one zone is supported at the moment list(string) [] no no
node_pools[*].max_size Maximum number of nodes in the pool number 1 no no
node_pools[*].min_size Minimum number of nodes in the pool number 1 no no
node_pools[*].monthly_billed Whether the nodes must be billed monthly bool false no no
node_pools[*].name Name of the node pool string yes no
node_pools[*].node_size Instance type to use for node creation string b3-8 no no
update_policy Cluster update policy, possible values are: ALWAYS_UPDATE, MINIMAL_DOWNTIME, NEVER_UPDATE string MINIMAL_DOWNTIME no no
vpc.private_network_id Private network ID to use by Kubernetes nodes string yes no
vpc.subnet_id Subnet ID to use for the nodes, this subnet must belong to a private_network_id variable string yes no
Output Description Type Sensitive
cluster Contains attributes of Kubernetes cluster resource resource yes
kubeconfig Contains Kubernetes cluster kubeconfig parameters attribute no
node_pools Contains attributes of all node pools resource no
Dependency Version Kind
terraform >= 1.3 CLI
ovh/ovh ~> 2.7 provider

Not sure where to start?
Let's find your perfect match.