You need to enable JavaScript to run this app.
Volcengine Kubernetes Engine

Volcengine Kubernetes Engine

Copy page
Download PDF
GPU-accelerated computing instance
Create a GPU-accelerated instance by specifying a VCI specification.
Copy page
Download PDF
Create a GPU-accelerated instance by specifying a VCI specification.
You can create VCIs by specifying VCI specifications. This topic mainly describes how to specify VCI specifications to create GPU-accelerated instances.​
Usage limits​
  • When you create a GPU Accelerated instance, different configurations match different VCI instance specifications. For the detailed specification matching logic, see Instance specification normalization.​
Prerequisites​
  • A VPC and its subnet have been created. For details, see Creating VPCs.​
Creating instances by using Kubernetes​
When you create a pod or a workload, including a Deployment, StatefulSet, Job, and CronJob, specify VCI specifications by adding an annotation.​
The following table describes the annotation.​
​
Annotation key​
Annotation sample value​
Description​
Required​
vci.vke.volcengine.com/preferred-instance-types​
vci.g1v.8xlarge​
The instance specification of the GPU-accelerated type.​
The instance specifications include the GPU model, number of GPUs, number of CPUs, and amount of memory. You can specify the vCPU, memory, and GPU quantity for each container by defining the request and limit for the container. For detailed specifications, see GPU-accelerated.​
tip​
  • Billing is performed based on the specified instance specification. For billing descriptions, see Product billing.​
  • You can specify multiple instance families (annotation values). Separate multiple instance families with commas (,), and determine the priority by the order in which they are entered. If the higher-priority instance family has no available resources, the lower-priority instance family will be used to create instances.​
Required for this scenario​
vci.vke.volcengine.com/gpu-driver-version​
tesla-470.129.06​
Specify the driver version of the GPU-accelerated instance. The annotation value is in the following format: tesla-{NVIDIA driver version}.​
The available {NVIDIA driver version} varies depending on the GPU accelerated specifications specified in preferred-instance-family. For details, see Supported GPU driver versions.​
tip​
If you do not specify this annotation, the system automatically specifies the default NVIDIA driver version that corresponds to the GPU-accelerated instance family that you selected.​
Optional​
​
The following sample code shows how to create a Deployment.​
​
apiVersion: apps/v1​
kind: Deployment​
metadata:​
name: nginx-deployment​
spec:​
replicas: 2​
selector:​
matchLabels:​
app: nginx​
template:​
metadata:​
annotations:​
vke.volcengine.com/burst-to-vci: enforce # Force the use of VCI.​
vci.vke.volcengine.com/preferred-instance-types: vci.g1v.8xlarge # Specify the instance GPU specification.​
vci.vke.volcengine.com/gpu-driver-version: tesla-470.129.06 # Specify the instance GPU driver.​
labels:​
app: nginx​
spec:​
containers:​
- image: doc-cn-beijing.cr.volces.com/vke/nginx-demo:v1.0 # The address and version of the container image. Replace the value with your actual information. If you need to use a public image, make sure that the cluster can access the public network.​
imagePullPolicy: Always​
name: nginx​
resources:​
requests: # Specify the vCPU, memory, and GPU for containers.​
cpu: "500m" ​
memory: "1024Mi"​
nvidia.com/gpu: 1 # Both limit and request can be configured, but the values must be identical.​
limits:​
cpu: "1" ​
memory: "2048Mi"​
nvidia.com/gpu: 1 # Specify GPU count (as in native Kubernetes).​
​
tip​
The GPU settings under Pod.spec.container[].resources must align with native Kubernetes capabilities and limitations.​
  • Use <vendor>.com/gpu to specify GPU resources.​
  • The limits option is required.​
  • Both limits and requests can be configured, but their values must be identical.​
  • If the requests option is left empty, Kubernetes will use the limits value as the requests value by default.​
  • GPU cannot be shared and overcommitted.​
  • The number of GPUs must be an integer.​
Using the console​
  1. Install the nvidia-device-plugin add-on in the VCI cluster. For details, see Installing add-ons.​
  1. Specify the following parameters when you create a workload.​
  1. Basic information: Select Volcengine Container Instance for the Computing power type parameter.​
  1. Container configuration: Configure GPU resources in the ResourceQuota section.​
  • Specify the parameter in the red box in the following figure. Set the GPU resource type parameter to Nvidia. Specify other parameters based on your business requirements.​
tip​
The mGPU resource type is not supported in VCI scenarios.​
  1. Advanced settings: Configure the instance specifications in the VCI specification settings section. You can use the default instance family or specify a custom instance family.​
  • When you specify instance families, you can select multiple instance families of the same instance type. The priority is determined by the order in which they are selected (For parameter descriptions, see Specific specifications). If the higher-priority specification family has no available resources, the lower-priority specification family will be used to create instances.​
  • ​​​
Last updated: 2026.09.03 15:56:09