GPU nodes

Prev Next

Available in VPC

You can use the GPU node as a worker node of Ncloud Kubernetes Service.

Caution
  • Support for the Multi-Instance GPU (MIG) feature on GPU servers provided by NAVER Cloud Platform varies depending on the hypervisor type. For more information, see the guide for each GPU node type.
  • GPU nodes can only be used in the KR region.
  • Clusters exclusively made up of GPU nodes have usage restrictions.
  • As any default object in Ncloud Kubernetes Service requires general nodes, you need to set up both general and GPU node pools.
Note

Choose how to use GPU resources

To use GPUs in pods after adding GPU nodes, choose 1 of the following 2 methods:

Method Driver Installed components Documentation
NVIDIA device plugin Uses the driver installed in the server image device plugin GPU nodes
NVIDIA GPU Operator Driver in the server image or driver installed by GPU Operator Driver, Container Toolkit, device plugin, and monitoring components Using NVIDIA GPU Operator

If your node pools use different GPU models or you need to specify the driver version directly in Kubernetes, use GPU Operator.

Caution

Do not install both methods in the same cluster. Because GPU Operator also installs Device Plugin, both configurations would register the same GPUs twice.

Deploy the NVIDIA GPU device plugin

If you don't use GPU Operator, you can register GPU resources by deploying only the NVIDIA device plugin. You can't use GPU resources in the Kubernetes cluster before deploying the GPU plugin.
In order to place the NVIDIA device plugin after the GPU node switches to Running in the cluster, execute the following command:

1. Install Helm

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 \
   && chmod 700 get_helm.sh \
   && ./get_helm.sh

2. Add NVIDIA device plugin Helm repository

helm repo add nvdp https://nvidia.github.io/k8s-device-plugin \
   && helm repo update

3. Deploy NVIDIA device plugin

Now, deploy the NVIDIA device plugin in the kube-system namespace using the following command:

helm install --generate-name nvdp/nvidia-device-plugin -n kube-system
Note

The HELM Chart is provided by NVIDIA. If you encounter any issues, check the official NVIDIA website to see if it has changed.

For a quick start, you can directly deploy a simple Daemonset to activate your GPU resources.

$ kubectl create -f https://raw.githubusercontent.com/NVIDIA/k8s-device-plugin/v0.17.0/deployments/static/nvidia-device-plugin.yml

4. Check GPU usage

You can check the GPU resource availability by viewing the details of the node using the following command:

$ kubectl describe [node-name]

...
Capacity:
  cpu:                4
  ephemeral-storage:  51,341,792Ki
  hugepages-1Gi:      0
  hugepages-2Mi:      0
  memory:             20,474,628Ki
  nvidia.com/gpu:     1
  pods:               110
Allocatable:
  cpu:                3920m
  ephemeral-storage:  47,316,595,429
  hugepages-1Gi:      0
  hugepages-2Mi:      0
  memory:             17,425,156Ki
  nvidia.com/gpu:     1
  pods:               110
...

Use device plugin

Kubernetes uses device plugins to let pods access special hardware features such as GPUs. For more information on how to use the plugin, see the official website.