For the complete documentation index, see llms.txt. This page is also available as Markdown.

Use Multi-Instance GPU (MIG)

This guide walks you through configuring Multi-Instance GPU (MIG) on VKS to partition an NVIDIA H100 GPU into multiple isolated MIG instances — each with dedicated VRAM and Streaming Multiprocessors, ensuring complete workload isolation.

MIG architecture on VKS — GPU 0 partitioned into 2 MIG instances, GPU 1 remains full GPU
MIG architecture on VKS: GPU Operator manages both MIG GPU (2x 3g.40gb) and non-MIG GPU (full 80 GB) on the same node

Prerequisites

  • A running VKS Cluster with a node group using an NVIDIA H100 GPU (or Ampere/Hopper or newer — MIG requires Ampere architecture or later).

  • kubectl and helm installed on your local machine.

  • yq version ≥ 4 installed for safe YAML merging (see Step 2).

  • kubectl connected to the cluster. Verify with kubectl get nodes.


Step 1: Install GPU Operator with mixed MIG Strategy

MIG on VKS requires the NVIDIA GPU Operator. VKS nodes do not include a pre-installed NVIDIA driver, so driver.enabled=true is mandatory.

The mixed strategy allows a node to run some GPUs in MIG mode and others as full (non-MIG) GPUs simultaneously — for example, GPU 0 partitioned into MIG instances while GPU 1 remains a full GPU.

Step 1.1: Add the NVIDIA Helm repo and install GPU Operator

Step 1.2: Verify pod status

Wait 5–10 minutes for the GPU Operator to deploy the driver container to the node, then run:

All pods must be Running or Completed:

Pod
Expected status

gpu-feature-discovery

Running

nvidia-container-toolkit

Running

nvidia-cuda-validator

Completed

nvidia-dcgm-exporter

Running

nvidia-device-plugin-daemonset

Running

nvidia-driver-daemonset

Running

nvidia-mig-manager

Running

nvidia-operator-validator

Running

GPU Operator pods running
All GPU Operator pods in Running/Completed state

Step 2: Create a Custom MIG ConfigMap

GPU Operator overwrites default-mig-parted-config on every reconcile. You must create a new ConfigMap with a different name and point migManager.config.name to it.

Step 2.1: Install yq if not already available

Step 2.2: Export the default ConfigMap

Step 2.3: Merge the new profile using yq

In this example:

  • GPU 0 is enabled for MIG with profile 3g.40gb — split into 2 instances, each with 40 GB VRAM and 60 Streaming Multiprocessors.

  • GPU 1 remains non-MIG (full 80 GB).

Step 2.4: Verify the YAML structure before applying

Step 2.5: Create the ConfigMap and upgrade GPU Operator

The Helm value migManager.config.default only accepts "all-disabled" or "". To reference a custom ConfigMap, use migManager.config.name.


Step 3: Apply MIG Config to the Node

Label the node with nvidia.com/mig.config to activate the MIG profile:

Follow MIG Manager logs to confirm the config is applied:

Expected output:

MIG Manager log confirming config applied successfully
MIG Manager confirms config applied successfully with state "success"

Step 4: Verify Node Resources

Check that the node exposes the correct MIG resources:

Expected result (2x MIG 3g.40gb + 1 full GPU):

Verify node labels set by MIG Manager:

Label
Example value
Meaning

nvidia.com/mig-3g.40gb.count

2

Number of MIG instances

nvidia.com/mig-3g.40gb.memory

40448 MiB

VRAM per instance

nvidia.com/mig-3g.40gb.multiprocessors

60

Streaming Multiprocessors per instance

nvidia.com/mig.config.state

success

Config apply status

nvidia.com/mig.strategy

mixed

Active MIG strategy

Node resources after applying MIG config
Node exposes 2 MIG instances (mig-3g.40gb: 2) and 1 full GPU (gpu: 1)

Step 5: Deploy a Workload Using MIG Instances

Declare nvidia.com/mig-3g.40gb in resources.limits — the Kubernetes scheduler automatically assigns an available MIG instance to the Pod with no additional configuration.

Deploy 2 pods simultaneously to verify isolation:

Each Pod receives a different MIG UUID — confirming complete isolation:

2 pods receive different MIG UUIDs
Each Pod is assigned a distinct MIG UUID — complete isolation between workloads

(Optional) Step 6: Clean Up


Result

After completing these steps, your VKS node exposes both MIG instances and a full GPU simultaneously:

Resource
K8s Resource Name
Capacity

GPU 0 — MIG (2x 3g.40gb)

nvidia.com/mig-3g.40gb

2

GPU 1 — non-MIG (full 80 GB)

nvidia.com/gpu

1

Each 3g.40gb MIG instance provides: 40 GB VRAM · 60 SM · full isolation.

I want to...
Go to

Monitor GPU resources

Autoscale GPU Nodegroup

Compare GPU sharing modes

Last updated