All Products
Search
Document Center

Container Service for Kubernetes:Schedule pods based on idle vSwitch IP addresses

Last Updated:Dec 12, 2023

The scheduler of open source Kubernetes cannot detect whether the vSwitches used by the nodes in a Kubernetes cluster have idle IP addresses. When multiple clusters or nodes use the same vSwitch, a pod may fail to launch after it is scheduled to a node if the vSwitch of the node does not have idle IP addresses. In this case, the pod controller recreates the pod, and then the scheduler reschedules the pod to the same node. This process is repeated multiple times within a short period of time, causing service deployment issues and generating a large number of alerts. kube-scheduler provided by Container Service for Kubernetes can detect whether the vSwitch used by a node has sufficient idle IP addresses. If the vSwitch does not have sufficient idle IP addresses, kube-scheduler stops scheduling pods to the node. This topic describes the prerequisites for scheduling pods based on idle vSwitch IP addresses and how to enable this feature.

Prerequisites

  • An ACK Pro cluster is created. The network plug-in of the ACK cluster is Terway and the Terway version is 1.5.7 or later. For more information, see Create an ACK managed cluster.

  • Version requirements for kube-scheduler:

    Kubernetes version

    kube-scheduler version

    1.22

    1.22.15-5.4 and later

    1.24

    v1.24.6-5.4 and later

    1.26

    v1.26.3-5.4 and later

How to enable the scheduler to schedule pods based on idle vSwitch IP addresses

This feature is automatically enabled when the requirements in the Prerequisites section are met.