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

Volcengine Kubernetes Engine

Copy page
Download PDF
General purpose instance
Creating an instance by specifying an instance family (vCPU and memory).
Copy page
Download PDF
Creating an instance by specifying an instance family (vCPU and memory).
VCI allows you to specify instance families and subnets by using a specific annotation and create general-purpose instances by specifying the container vCPU and memory.​
Limits​
  • You can configure custom specifications for each container, but the specifications need to meet the vCPU and memory constraints of a VCI when they are aggregated at the instance level.​
Prerequisites​
  • A VPC and its subnet have been created. For details, see Creating VPCs.​
Creating instances by using Kubernetes​
You can directly define the request and limit for the corresponding container to specify its vCPU and memory. You can specify instance families by adding an annotation when creating VCIs. The following table describes the annotation used for specifying instance families.​
​
Annotation key​
Annotation sample value​
Description​
Required​
vci.vke.volcengine.com/preferred-instance-family​
vci.u1​
The instance specifications of the general-purpose type.​
tip​
  • If you do not specify this annotation, the default instance family vci.u1 specified by VCI is used.​
  • Billing is performed based on the matched instance specification. For billing descriptions, see Product billing.​
  • You can specify multiple general-purpose 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.​
Optional​
​
The following sample code shows how to create a Deployment.​
tip​
For more information about annotations, see Pod annotation descriptions.​
​
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.​
vke.volcengine.com/preferred-subnet-ids: subnet-3tispp1nai**** # Specify the ID of a subnet. You can specify multiple subnets within the same availability zone. To do so, separate them with commas (,).​
vci.vke.volcengine.com/preferred-instance-family: vci.u1 # Specify the instance family of VCI.​
labels:​
app: nginx​
spec:​
containers:​
- name: nginx​
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.​
ports:​
- containerPort: 80​
resources:​
requests: # Specify the container vCPU and memory.​
cpu: "500m" ​
memory: "1024Mi"​
limits:​
cpu: "1" ​
memory: "2048Mi"​
​
Creating instances by using the console​
Specify the following parameters when you create a workload in a VCI cluster.​
  1. Basic information: Select Volcengine Container Instance for the Computing power type parameter.​
  1. Container configuration: Specify the requests and limits of CPU and memory in the ResourceQuota section based on your business requirements.​
  1. Advanced configurations: Configure the instance specifications in the VCI specification settings section. You can use the default instance family or specify a custom instance family.​
  • When specifying instance families, you can select multiple families under the same instance type. Their priority is determined by the order in which they are selected. For details, see Specific specifications. If resources are unavailable in a higher-priority family, VCI uses a lower-priority family to create the instance.​
  • ​​​
Last updated: 2026.09.03 15:56:09