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

Volcengine Kubernetes Engine

Copy page
Download PDF
General purpose instance
Creating general-purpose instances by specifying VCI specifications
Copy page
Download PDF
Creating general-purpose instances by specifying VCI specifications
You can create VCIs by specifying VCI specifications. This topic mainly describes how to specify VCI specifications to create general-purpose instances.​
Limits​
  • After you specify VCI specifications, if you do not specify container specifications (spec.resource), a pod is created based on the specified specifications. If you specify both VCI and container specifications, the Pod specification is calculated as described in 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.u1.4c-8gi​
The instance specifications of the general-purpose type.​
The instance specifications include the quantity of CPUs and memory. You can specify the vCPU and memory quantity for each container by defining the request and limit for the container. For detailed specifications, see General-purpose.​
tip​
  • Billing is performed based on the specified instance specification. For billing descriptions, see Product billing.​
  • You can specify multiple specifications (annotation values). Separate multiple specifications with commas (,), and determine the priority by the order in which they are entered. If the higher-priority specification has no available resources, the lower-priority specification will be used to create instances.​
Required for this scenario​
​
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.u1.4c-8gi # Specify general-purpose instance specifications.​
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: "2" ​
memory: "4096Mi"​
limits:​
cpu: "4" ​
memory: "8192Mi"​
​
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