Container Service for Kubernetes (ACK) uses the cloud controller manager (CCM) to add route entries to the route table of the virtual private cloud (VPC) where the cluster is deployed. This enables network connectivity between pods in the cluster. You can update the cloud-config file to configure multiple route tables for the VPC where an ACK cluster is deployed. This topic describes how to configure multiple route tables for the VPC where an ACK cluster is deployed.
Prerequisites
- An ACK cluster is created.
- Create an ACK managed cluster. For more information, see Create an ACK managed cluster.
Note Only ACK managed clusters that run Kubernetes 1.18 or later versions support this feature. If the Kubernetes version of your ACK managed cluster is earlier than 1.18, Submit a ticket.
- Create an ACK dedicated cluster. For more information, see Create an ACK dedicated cluster.
- Create an ACK managed cluster. For more information, see Create an ACK managed cluster.
- The Flannel network plug-in is used in the ACK cluster.
- The CCM version is later than v1.9.3.86-g4454991-aliyun. For more information about how to check the CCM version, see Manage system components.
Background information
If multiple route tables are configured for a VPC, you can associate Elastic Compute Service (ECS) instances with different route tables. Earlier versions of the CCM allow you to configure only one route table for each VPC. Therefore, you must update the CCM to the latest version in the ACK console. For more information about how to update the CCM version, see Manage system components.
Configure multiple route tables for the VPC where the ACK managed cluster is deployed
You can configure multiple route tables for the VPC where the ACK managed cluster is deployed in the ACK console.
Configure multiple route tables for the VPC where the ACK dedicated cluster is deployed
You can configure multiple route tables for the VPC where the ACK dedicated cluster is deployed in the ACK console or by using kubectl.
Use kubectl
To use a kubectl client to configure multiple route tables for the VPC, make sure that the kubectl client is connected to the ACK dedicated cluster. For more information, see Connect to ACK clusters by using kubectl.