CCE Virtual Kubelet Component
When you need to quickly create a large number of Pods in a short time, the scale-up speed of BCC nodes may not meet the requirements, while reserving additional BCC nodes will result in resource waste. You can install the CCE Virtual Kubelet component, which creates CCE virtual nodes to quickly schedule Pods to run on Baidu Container Instance (BCI) via CCE virtual nodes, without the need to purchase and manage BCC nodes.
This document introduces how to schedule Pods to run on BCI in K8S Cluster CCE (CCE standard managed clusters and CCE standard independent clusters).
Component introduction
The CCE Virtual Kubelet component is based on the community open-source project Virtual Kubelet, enabling seamless integration between Kubernetes and Baidu Container Instance (BCI). Kubernetes clusters can easily gain significant elastic capabilities without being limited by the node computing capacity of the cluster. You can flexibly create BCI Pods on demand without planning cluster capacity by yourself.
CCE Virtual Kubelet runs application Pods as Serverless containers (BCI), providing capabilities such as elasticity, capacity planning-free, on-demand usage and on-demand billing. In scenarios such as Job tasks, CI/CD, Spark big data computing and online application elasticity, it can significantly improve the elastic efficiency of application deployment and reduce the computing cost of applications.

Applicable scenarios
Running Pods on BCI is suitable for handling traffic surge and can also reduce computing costs. Typical scenarios include:
- Online services with significant traffic fluctuations: For example, services like online education or e-commerce often have noticeable traffic peaks and valleys. Using BCI Pods enables quicker responses to traffic surges while reducing computing costs.
-
Non-continuously running computing tasks: Running computing tasks with BCI Pods eliminates the need to retain fixed nodes. You only need to pay for computing resources during task execution, reducing computing costs. For example:
- Data computing: Spark big data computing
- CI/CD Pipeline
- Job tasks: This includes scheduled tasks and AI-related tasks.
Component function

Instructions for use
Prerequisites
- A CCE standard managed cluster or CCE standard independent cluster has been created, and the cluster version is 1.18.9/1.20.8/1.22.5/1.24.4/1.26.9/1.28.8 If you need to create a new cluster, refer to Create Cluster.
- The elastic container instance service has been activated, and it is confirmed that the region where the cluster is located is in the list of regions supported by BCI. Sign in to the Elastic Container Instance Console to activate the corresponding service and view the currently supported regions and availability zones.
Step I: Deploy the CCE Virtual Kubelet component
In the K8S Cluster CCE, deploy the CCE Virtual Kubelet component via the Component Management page. Follow the steps below based on the two cluster types:

Note: If you have installed cce-virtual-kubelet via a Helm template, installation via Component Management is not supported temporarily. If you want to install it via the component center, you can submit a ticket to contact us for assistance.
Step II: Schedule Pods to run on BCI
Start Pods on virtual nodes
Compared with regular pods, you need to add the following nodeSelector and tolerations fields to the Pod Spec to schedule the Pod to a virtual node.
Pod Spec example:
1spec:
2 nodeSelector:
3 type: "virtual-kubelet"
4 tolerations:
5 - key: "virtual-kubelet.io/provider"
6 operator: "Equal"
7 value: "baidu"
8 effect: "NoSchedule"
Pods scheduled to virtual nodes will be launched in BCI Pod format. For more introductions to BCI Pod configuration items, please refer to Configure BCI Pod.
Relevant operations
To use some advanced features of virtual nodes, you may need to upgrade the CCE Virtual Kubelet component or modify the CCE virtual node configuration later. When you no longer need to use virtual nodes, you can uninstall the CCE Virtual Kubelet component.
Upgrade the CCE Virtual Kubelet component
The upgrade takes about 1 minute. During the upgrade, new Pods cannot be created, but existing Pods are not affected. The upgrade steps are as follows:
- Log in to the Container Service Management Console and choose Clusters from the navigation menu on the left.
- In the Cluster List, click the name of your target cluster. Then, from the left navigation menu, go to Operations and Management > Component Management.
- In the core component section of the Component Management page, select the CCE Virtual Kubelet component, click Upgrade, and follow the on-screen instructions to complete the process.
Note: If the component is installed using a Helm template, upgrading via the component center is not supported temporarily; you can upgrade via the Helm template center. If you want to upgrade via the component center, you can Submit a Ticket to contact us for processing.
Modify CCE virtual node configuration
For operations on modifying the CCE virtual node configuration, please refer to Configure bci-profile.
Uninstall the CCE Virtual Kubelet component
- Log in to the Container Service Management Console and choose Clusters from the navigation menu on the left.
- In the Cluster List, click the name of your target cluster. Then, from the left navigation menu, go to Operations and Management > Component Management.
- In the core component area of the component management page, select the CCE Virtual Kubelet component, then click Uninstall and follow the prompts on the page to complete the operation. If there are still BCI Pods running on your virtual node, it will prompt that it cannot be uninstalled.
Version records

