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

Volcengine Kubernetes Engine

Copy page
Download PDF
Creating workloads
Creating Jobs
Copy page
Download PDF
Creating Jobs
A Job refers to a one-off task that runs after deployment and stops upon successful execution. It corresponds to the Job in Kubernetes. You can create a Job in a cluster by using an image.​
Prerequisites​
A container image has been created. You can directly use an image from a third-party container registry, or upload an image to the Container Registry (CR) service. To upload an image to CR, see Pushing and pulling images.​
Use the console​
  1. Log in to the VKE console.​
  1. In the left navigation bar, click Cluster.​
  1. Click Workload > Job in the left navigation bar. On the page that appears, click Create Job.​
  1. Configure the Job based on the on-screen prompts. For parameter details, see Workload configurations.​
  1. Click Confirm in the lower-right corner of the page.​
Use kubectl​
tip​
Before you start creating a Job by using kubectl, make sure that the following conditions are met:​
  1. Create the YAML file of the workload. The code of the job-demo.yaml sample file is as follows:​
  • ​
    apiVersion: batch/v1​
    kind: Job​
    metadata:​
    name: job-demo # The Job name.​
    namespace: default # The namespace to which the Job belongs.​
    spec:​
    template:​
    spec:​
    containers:​
    - name: pi # The container name.​
    image: perl # The container image.​
    command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] # The command executed in the container.​
    resources:​
    requests: # Specify CPU and memory requests for the container.​
    cpu: "500m" ​
    memory: "1024Mi"​
    limits: # Specify resource quotas, such as the CPU limit, memory limit, and number of RDMA cards.​
    cpu: "1" ​
    memory: "2Gi"​
    vke.volcengine.com/rdma: 2​
    restartPolicy: Never # The restart policy when the Job fails in the container. Valid values: Never and OnFailure.​
    backoffLimit: 4 # The number of retries after the Job fails in the container.​
    ​
  1. Run the following command to create the workload.​
  • ​
    kubectl apply -f job-demo.yaml​
    ​
Operation result​
After the Job is created, you can view the status of the workload on the Workload > Job page. You can click the button in the Actions column to manage the created Job. For more operations, see Managing workloads.​
​
Last updated: 2026.07.24 14:51:37