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

Volcengine Kubernetes Engine

Copy page
Download PDF
Creating workloads
Creating Deployments
Copy page
Download PDF
Creating Deployments
A Deployment in Kubernetes is a workload that never preserves data or maintains state during running. You can create a Deployment in a cluster by using an image. This topic describes how to create a Deployment.​
Prerequisites​
A container image has been created. You can directly use an image from a third-party repository or upload an image to the Container Registry (CR) service. To upload an image to CR, see Pushing and pulling images.​
Creating Deployments in the console​
  1. Go to the Deployment page.​
  1. Log in to the VKE console.​
  1. In the left navigation bar, click Cluster.​
  1. On the Cluster page, click the name of the cluster for which you need to create a Deployment.​
  1. In the left navigation bar of the cluster management page, click Workload > Deployment.​
  1. On the Deployment page, click Create Deployment.​
  1. Configure the Deployment. For parameter details, see Workload configurations.​
  1. Click Confirm in the lower-right corner of the page.​
Use the kubectl​
tip​
Before you start, make sure that the following conditions are met:​
  1. Create the YAML file of the workload. The code of the sample file deployment-demo.yaml is as follows:​
  • ​
    apiVersion: apps/v1​
    kind: Deployment​
    metadata:​
    name: deployment-demo # The Deployment name.​
    namespace: default # The namespace where the Deployment resides.​
    spec: ​
    replicas: 2 # The number of Deployment replicas.​
    selector: ​
    matchLabels: ​
    app: nginx​
    template: ​
    metadata: ​
    labels: ​
    app: nginx​
    spec:​
    containers:​
    - name: nginx # The container name.​
    image: doc-cn-beijing.cr.volces.com/vke/nginx-demo:v1.0 # The container image address and tag.​
    ports:​
    - containerPort: 80 # The exposed port number of the container.​
    resources:​
    requests: # The container CPU and memory requests.​
    cpu: "500m" ​
    memory: "1024Mi"​
    limits: # The resource quotas, such as the CPU limit, memory limit, and number of RDMA cards.​
    cpu: "1" ​
    memory: "2Gi"​
    vke.volcengine.com/rdma: 2​
    ​
  1. Run the following command to create the workload.​
  • ​
    kubectl apply -f deployment-demo.yaml​
    ​
Operation result​
After you create the Deployment, you can view the status of the workload on the Workload > Deployment page. You can click the button in the Actions column to manage the created Deployment. For more operations, see Managing workloads.​
Last updated: 2026.08.19 17:39:48