All Products
Search
Document Center

Update Virtual Kubelet

Last Updated: May 19, 2022

Virtual Kubelet is an open source Kubernetes Kubelet implementation. Virtual nodes are implemented by using Virtual Kubelet. Virtual nodes allow Elastic Container Instance to serve as pods in a serverless Kubernetes (ASK) or Container Service for Kubernetes (ACK) cluster. To use Elastic Container Instance features, you must keep Virtual Kubelet up-to-date. This topic describes how to update Virtual Kubelet.

Background information

Different types of Kubernetes clusters require different operations to update Virtual Kubelet.

  • For ASK clusters, the system automatically updates Virtual Kubelet.

  • For ACK clusters, the update method of Virtual Kubelet varies based on the edition of the clusters. For managed ACK clusters, the system automatically updates Virtual Kubelet. For dedicated ACK clusters, you must manually update Virtual Kubelet.

You can use one of the following methods to manually update Virtual Kubelet:

  • You can update ack-virtual-node in the ACK console.

  • You can run the kubectl edit command to modify the YAML configuration file of Virtual Kubelet to update the tags of Virtual Kubelet images to the latest version. For more information about the versions of Virtual Kubelet, see ack-virtual-node.

Update ack-virtual-node in the ACK console

  1. Log on to the ACK console.

  2. In the left-side navigation pane, click Clusters.

  3. On the Clusters page, click the name of the cluster for which you want to update ack-virtual-node.

  4. In the left-side navigation pane of the details page, choose Operations > Add-ons.

  5. Find ack-virtual-node and click Upgrade.

Run the kubectl edit command to modify the configuration file of Virtual Kubelet

  1. Use kubectl to connect to your Kubernetes cluster.

  2. Run the following command to modify the YAML configuration file of Virtual Kubelet.

    kubectl edit deployment -n kube-system virtual-node-controller

    Example YAML configuration file:

    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: virtual-node-controller
      namespace: kube-system
      labels:
        app: virtual-node-controller
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: virtual-node-controller
      template:
        metadata:
          labels:
            app: virtual-node-controller
        spec:
          containers:
          - name: virtual-node-controller
            image: registry.cn-beijing.aliyuncs.com/acs/virtual-nodes-eci:v2.******-aliyun  #Change the tag of the image to the latest version.
      env:  
            - name: WEBHOOK
              value: "true"