Skip to content

exoscale_sks_cluster (Resource)

Manage Exoscale Scalable Kubernetes Service (SKS) Clusters.

Corresponding data source: exoscale_sks_cluster.

Example Usage

resource "exoscale_sks_cluster" "my_sks_cluster" {
  zone = "ch-gva-2"
  name = "my-sks-cluster"
}

output "my_sks_cluster_endpoint" {
  value = exoscale_sks_cluster.my_sks_cluster.endpoint
}

Next step is to attach exoscale_sks_nodepool(s) to the cluster.

Please refer to the examples directory for complete configuration examples.

Schema

Required

  • name (String) The SKS cluster name.
  • zone (String) ❗ The Exoscale Zone name.

Optional

  • audit (Block List) Parameters for Kubernetes Audit configuration (may only be enabled at creation time) (see below for nested schema)
  • auto_upgrade (Boolean) Enable automatic upgrading of the control plane version.
  • cni (String) The CNI plugin that is to be used. Available options are “calico” or “cilium”. Defaults to “calico”. Setting empty string will result in a cluster with no CNI.
  • create_default_security_group (Boolean) ❗ Creates an ad-hoc security group based on the choice of the selected CNI (may only be set at creation time).
  • description (String) A free-form text describing the cluster.
  • enable_karpenter (Boolean) Indicates whether to deploy Karpenter for cluster autoscaling.
  • enable_kube_proxy (Boolean) ❗ Indicates whether to deploy the Kubernetes network proxy. (may only be set at creation time)
  • exoscale_ccm (Boolean) Deploy the Exoscale Cloud Controller Manager in the control plane (boolean; default: true; may only be set at creation time).
  • exoscale_csi (Boolean) Deploy the Exoscale Container Storage Interface on worker nodes (boolean; default: false; requires the CCM to be enabled).
  • feature_gates (Set of String) Feature gates options for the cluster.
  • karpenter_feature_gates (Set of String) A list of Karpenter controller feature gates to enable for the Karpenter controller binary.
  • labels (Map of String) A map of key/value labels.
  • metrics_server (Boolean) Deploy the Kubernetes Metrics Server in the control plane (boolean; default: true; may only be set at creation time).
  • oidc (Block List) An OpenID Connect configuration to provide to the Kubernetes API server (may only be set at creation time). Structure is documented below. (see below for nested schema)
  • service_level (String) The service level of the control plane (pro or starter; default: pro; may only be set at creation time).
  • timeouts (Block, Optional) (see below for nested schema)
  • version (String) The version of the control plane (default: latest version available from the API; see exo compute sks versions for reference; may only be set at creation time).

Read-Only

  • aggregation_ca (String, Sensitive) The CA certificate (in PEM format) for TLS communications between the control plane and the aggregation layer (e.g. metrics-server).
  • control_plane_ca (String, Sensitive) The CA certificate (in PEM format) for TLS communications between control plane components.
  • created_at (String) The cluster creation date.
  • default_security_group_id (String) The ID of the cluster’s ad-hoc default security group (when create_default_security_group was set at creation time).
  • endpoint (String) The cluster API endpoint.
  • id (String) The SKS cluster ID.
  • kubelet_ca (String, Sensitive) The CA certificate (in PEM format) for TLS communications between kubelets and the control plane.
  • nodepools (Set of String) The list of exoscale_sks_nodepool (IDs) attached to the cluster.
  • state (String) The cluster state.

Nested Schema for audit

Optional:

  • bearer_token (String, Sensitive) The optional bearer token to include in the request header
  • enabled (Boolean) Whether to run the APIServer with the configured Kubernetes Audit
  • endpoint (String) The Endpoint URL for the Webserver responsible of processing Audit events
  • initial_backoff (String) The Initial Backoff to wait before sending data to the remote server (default 10s)

Nested Schema for oidc

Required:

  • client_id (String) The OpenID client ID.
  • issuer_url (String) The OpenID provider URL.

Optional:

  • groups_claim (String) An OpenID JWT claim to use as the user’s group.
  • groups_prefix (String) An OpenID prefix prepended to group claims.
  • required_claim (Map of String) A map of key/value pairs that describes a required claim in the OpenID Token.
  • username_claim (String) An OpenID JWT claim to use as the user name.
  • username_prefix (String) An OpenID prefix prepended to username claims.

Nested Schema for timeouts

Optional:

  • create (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours).
  • delete (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
  • read (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
  • update (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours).

-> The symbol ❗ in an attribute indicates that modifying it, will force the creation of a new resource.

Import

An existing SKS cluster may be imported by <ID>@<zone>:

terraform import \
  exoscale_sks_cluster.my_sks_cluster \
  f81d4fae-7dec-11d0-a765-00a0c91e6bf6@ch-gva-2

~> NOTE: Importing an exoscale_sks_cluster resource does not import related exoscale_sks_nodepool resources.

Last updated on