OpenMCF logoOpenMCF

Loading...

Scaleway Kapsule Pool

Deploys an additional node pool into an existing Scaleway Kapsule Kubernetes cluster. This is a standalone resource that creates a single scaleway_k8s_pool and supports autoscaling, autohealing, Kubernetes labels, taints, and custom upgrade policies.

What Gets Created

When you deploy a ScalewayKapsulePool resource, OpenMCF provisions:

  • Kapsule Node Pool — a kubernetes.Pool resource providing a group of identically configured worker nodes (same instance type, root volume, container runtime) in the referenced Kapsule cluster. Kubernetes labels and taints are applied via Scaleway's Cloud Controller Manager tag convention.

Prerequisites

  • Scaleway credentials configured via environment variables or OpenMCF provider config
  • An existing Kapsule cluster — the pool attaches to a cluster referenced by clusterId. Can be created via a ScalewayKapsuleCluster resource.
  • A valid instance type eligible for Kapsule (instances with insufficient memory such as DEV1-S, PLAY2-PICO, STARDUST are not eligible)

Quick Start

Create a file kapsule-pool.yaml:

apiVersion: scaleway.openmcf.org/v1
kind: ScalewayKapsulePool
metadata:
  name: my-pool
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: dev.ScalewayKapsulePool.my-pool
spec:
  region: fr-par
  clusterId:
    valueFrom:
      kind: ScalewayKapsuleCluster
      name: my-cluster
      fieldPath: status.outputs.cluster_id
  nodeType: DEV1-M
  size: 2

Deploy:

openmcf apply -f kapsule-pool.yaml

This creates a two-node pool of DEV1-M instances in the fr-par region, attached to the my-cluster Kapsule cluster.

Configuration Reference

Required Fields

FieldTypeDescriptionValidation
regionstringScaleway region where the pool will be created. Must match the parent cluster's region. Cannot be changed after creation.Required
clusterIdStringValueOrRefReference to the Kapsule cluster. Can be a literal cluster ID or a valueFrom reference to a ScalewayKapsuleCluster resource's output. Cannot be changed after creation.Required
nodeTypestringInstance type for worker nodes (e.g., "DEV1-M", "GP1-XS", "PRO2-S"). Cannot be changed after creation.Required
sizeintNumber of nodes in the pool. When autoscaling is enabled, this is the initial size.Required, minimum 1

Optional Fields

FieldTypeDefaultDescription
autoScaleboolfalseEnables the cluster autoscaler for this pool. Requires minSize and maxSize.
minSizeint—Minimum node count when autoscaling is enabled. The autoscaler will not scale below this number.
maxSizeint—Maximum node count when autoscaling is enabled. Controls cost ceiling.
autohealingboolfalseWhen true, Scaleway automatically detects and replaces unhealthy nodes. Recommended for production.
containerRuntimestring"containerd"Container runtime for pool nodes. Cannot be changed after creation.
rootVolumeTypestring—Root volume storage type. Depends on instance type and availability zone. Cannot be changed after creation.
rootVolumeSizeInGbint—Root volume size in GB. If omitted, uses the instance type default. Cannot be changed after creation.
publicIpDisabledboolfalseWhen true, nodes have only private IPs. Requires a Public Gateway or NAT for external access. Cannot be changed after creation.
zonestring—Zone within the region for node placement (e.g., "fr-par-1"). If omitted, Scaleway chooses automatically. Cannot be changed after creation.
placementGroupIdstring—Placement group UUID for anti-affinity scheduling. Spreads nodes across different hypervisors. Cannot be changed after creation.
kubernetesLabelsmap<string, string>{}Key-value pairs applied as Kubernetes node labels via the Scaleway CCM tag convention. Used for nodeSelector and affinity-based scheduling.
taintsScalewayKapsulePoolTaint[][]Kubernetes taints applied to all nodes. Each taint has key (required), value, and effect (required). Effect must be "NoSchedule", "PreferNoSchedule", or "NoExecute".
upgradePolicy.maxSurgeint0Maximum extra nodes created during a rolling upgrade. Higher values speed up upgrades but increase cost temporarily.
upgradePolicy.maxUnavailableint1Maximum nodes unavailable simultaneously during a rolling upgrade.
kubeletArgsmap<string, string>{}Custom kubelet arguments for pool nodes. Use with caution — incorrect values can prevent nodes from joining the cluster.

Examples

Development Pool

A minimal additional pool for development workloads:

apiVersion: scaleway.openmcf.org/v1
kind: ScalewayKapsulePool
metadata:
  name: dev-workers
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: dev.ScalewayKapsulePool.dev-workers
spec:
  region: fr-par
  clusterId:
    valueFrom:
      kind: ScalewayKapsuleCluster
      name: dev-cluster
      fieldPath: status.outputs.cluster_id
  nodeType: DEV1-M
  size: 2
  autohealing: true
  containerRuntime: containerd

Production Pool with Autoscaling and Labels

A production pool with autoscaling, private nodes, Kubernetes labels for workload scheduling, and a safe upgrade policy:

apiVersion: scaleway.openmcf.org/v1
kind: ScalewayKapsulePool
metadata:
  name: app-pool
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: prod.ScalewayKapsulePool.app-pool
spec:
  region: fr-par
  clusterId:
    valueFrom:
      kind: ScalewayKapsuleCluster
      name: prod-cluster
      fieldPath: status.outputs.cluster_id
  nodeType: PRO2-M
  size: 3
  autoScale: true
  minSize: 3
  maxSize: 10
  autohealing: true
  publicIpDisabled: true
  containerRuntime: containerd
  rootVolumeSizeInGb: 100
  kubernetesLabels:
    workload: application
    tier: frontend
  upgradePolicy:
    maxSurge: 1
    maxUnavailable: 0

GPU Pool with Taints and Zone Pinning

A dedicated pool for GPU workloads using taints to prevent non-GPU pods from being scheduled, pinned to a specific zone:

apiVersion: scaleway.openmcf.org/v1
kind: ScalewayKapsulePool
metadata:
  name: gpu-pool
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: prod.ScalewayKapsulePool.gpu-pool
spec:
  region: fr-par
  zone: fr-par-2
  clusterId:
    valueFrom:
      kind: ScalewayKapsuleCluster
      name: prod-cluster
      fieldPath: status.outputs.cluster_id
  nodeType: GP1-S
  size: 2
  autoScale: true
  minSize: 1
  maxSize: 4
  autohealing: true
  publicIpDisabled: true
  containerRuntime: containerd
  kubernetesLabels:
    accelerator: gpu
    team: ml
  taints:
    - key: nvidia.com/gpu
      value: "true"
      effect: NoSchedule
  kubeletArgs:
    maxPods: "150"
  upgradePolicy:
    maxSurge: 1
    maxUnavailable: 1

Stack Outputs

After deployment, the following outputs are available in status.outputs:

OutputTypeDescription
pool_idstringRegional ID of the created node pool (e.g., fr-par/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
pool_versionstringActual Kubernetes version running on pool nodes. May differ from the cluster version during rolling upgrades.
current_sizeintActual number of nodes currently in the pool. When autoscaling is enabled, this may differ from the size field in the spec.

Related Components

  • ScalewayKapsuleCluster — provides the Kapsule cluster that this pool attaches to
  • ScalewayPrivateNetwork — provides the Private Network used by the parent cluster
  • ScalewayPublicGateway — required when publicIpDisabled is true to give nodes outbound internet access

Next article

Scaleway Load Balancer

Scaleway Load Balancer Deploys a managed Scaleway Load Balancer that bundles a Flexible IP, the LB appliance, backend server pools, frontend listeners, and optional TLS certificates into a single declarative resource. The Load Balancer distributes incoming Layer 4/7 traffic across backend servers based on configurable forwarding rules, health checks, and load-balancing algorithms. What Gets Created When you deploy a ScalewayLoadBalancer resource, OpenMCF provisions: Flexible IP — a dedicated...
Read next article
Presets
2 ready-to-deploy configurationsView presets →