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

Volcengine Kubernetes Engine

Copy page
Download PDF
Creating workloads
Creating DaemonSets
Copy page
Download PDF
Creating DaemonSets
A DaemonSet ensures that exactly one pod runs on each eligible node in a cluster. DaemonSets are suitable for system-level applications, such as log collection and resource monitoring. DaemonSets can effectively ensure the availability of basic services in clusters.​
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.​
Creating DaemonSets on the console​
  1. Log in to the VKE console.​
  1. In the left navigation bar, click Cluster.​
  1. Click Workload > DaemonSet. On the page that appears, click Create DaemonSet, and then configure the DaemonSet.​
  1. Configure DaemonSet information. For parameter details, see Workload configurations.​
  1. Click Confirm in the lower-right corner of the page.​
Creating DaemonSets by using kubectl​
tip​
Before you start creating a DaemonSet by using kubectl, make sure that the following conditions are met:​
  1. Create the YAML file of the workload. The code of the sample file daemonset-demo.yaml is as follows:​
  • ​
    apiVersion: apps/v1​
    kind: DaemonSet​
    metadata:​
    name: daemonset-demo # The name of the DaemonSet.​
    namespace: default # The namespace of the DaemonSet.​
    spec:​
    selector:​
    matchLabels:​
    app: demo​
    template:​
    metadata:​
    labels:​
    app: demo​
    spec:​
    containers:​
    - name: nginx # The name of the container.​
    image: doc-cn-beijing.cr.volces.com/vke/nginx-demo:v1.0 # The container image address and tag.​
    ports:​
    - containerPort: 80 # The exposed port 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 daemonset-demo.yaml​
    ​
Results​
After you create the DaemonSet, you can view the status of the workload on the Workload > DaemonSet page. You can click the button in the Actions column to manage the created DaemonSet. For more operations, see Managing workloads.​
​
Last updated: 2026.08.19 17:40:21