This section describes how to edit the auto-assignment nodes for a Pod IP Pool to automatically match suitable nodes for the Pod IP Pool.

When creating a Pod IP Pool, its IP addresses are by default assignable to pods on all nodes. You can set a node selector to restrict that only pods on nodes meeting specific conditions can use the IP addresses from this IP pool.

Prerequisites

  • You need to join a cluster and have the Cluster Network Resource Management permission in the cluster. For more information, see Cluster Members and Cluster Roles.

  • The KubeSphere Network extension needs to be installed and enabled on the KubeSphere platform.

Steps

  1. Log in to the KubeSphere web console with a user who has Cluster Network Resource Management permissions and enter your cluster.

  2. Click Network > Pod IP Pools in the left navigation pane.

  3. Click more on the right side of the Pod IP Pool you want to operate on, then select Edit YAML from the dropdown list.

  4. Under the spec.nodeSelector parameter, enter expressions to filter nodes that meet the conditions through custom expressions. For more information on expressions, please refer to Node Selector.

Note
  • The CIDR of the Pod IP Pool must not overlap with the node CIDR or the service CIDR.

  • When modifying related fields, you must be aware of the impact after the operation. Please proceed with caution.