This topic guides you through migrating EIPs from Terway to ack-extend-network-controller.
Prerequisites
-
You have an ACK managed cluster or an ACK dedicated cluster that uses Terway as the network plug-in. For more information, see Create an ACK managed cluster and Create an ACK dedicated cluster (no longer available).
Impact
The migration process is non-disruptive and does not affect your EIP information or workloads.
-
If your cluster uses the EIP feature in Terway, use this guide to migrate EIP management to ack-extend-network-controller.
-
If your cluster does not use the EIP feature in Terway, you do not need to perform this migration.
Migration overview
When you enable the EIP migration feature in Terway, Terway creates a PodEIP resource for each EIP that is associated with a pod in your cluster. A PodEIP is a resource object that manages EIP information for a pod. After the migration, ack-extend-network-controller takes over EIP management from Terway.
To learn how to enable the EIP feature in Terway, see Automatic EIP assignment use cases.
Procedure
-
Ensure that the ack-extend-network-controller component is not installed in your cluster. If it is already installed, uninstall it.
Log on to the ACK console. In the left navigation pane, click Clusters.
On the Clusters page, click the name of your cluster. In the left navigation pane, click .
-
On the Helm page, check if a component with the Release Name ack-extend-network-controller exists. If it does, click Delete in the Actions column for that component to uninstall it.
-
Upgrade the Terway network plug-in to v1.6.0 or later.
For upgrade instructions, see Manage components.
-
Modify the Terway ConfigMap to enable the EIP migration feature.
ImportantWhen you enable the EIP migration feature in Terway, it creates a PodEIP resource for each EIP associated with a pod. After you enable this feature, Terway no longer manages the EIPs.
-
Run the following command to edit the Terway ConfigMap:
kubectl edit cm eni-config -n kube-system -
Modify the configuration in eni_conf.
Parameter
Value
Description
enable_eip_pool
"true"
If this parameter is not configured or is set to
"false", theeipfeature is not enabled and no migration is required.enable_eip_migrate
true
Set to
trueto enable the migration feature.The following is a configuration example. Do not modify other parameters.
# The preceding content is omitted. eni_conf: | { "version": "1", "enable_eip_pool": "true", "enable_eip_migrate": true, "vswitch_selection_policy": "ordered" } # The following content is omitted.
-
After you modify the configuration file, run the following command to restart the Terway pods:
kubectl delete pod -n kube-system -l app=terway-eniipAfter the Terway pods restart, the plug-in automatically migrates the EIPs in the cluster to ack-extend-network-controller.
-
-
Check the migration status in the Terway log. The output
eip migrate finishedindicates that the EIP migration is complete.-
Run the following command to get the names of the Terway pods:
kubectl get pods -n kube-system | grep terwayThe output returns the names of one or more Terway pods.
-
Run the following command to view the logs of a Terway pod:
kubectl logs -n kube-system <pod_name> # Replace <pod_name> with the name of your Terway pod.The output
eip migrate finishedindicates that the EIP migration is complete.Ds:[sg-2ze360hfgjtsemo2wyyj] InstanceID:i-2zed 5 VSwitchSelectionPolic I1013 03:44:40.082505 daemon.go:1596] subSys=network-service eip migrate finished
-
-
Verify that the migration created the PodEIP custom resources (CRs) in the cluster.
Run the following command to query a migrated CR. The CR has the same name and namespace as its corresponding pod.
kubectl get podeip -n {namespace} {name} # Replace {namespace} and {name} with the namespace and name of the pod associated with an EIP. -
Install ack-extend-network-controller from the Marketplace and enable the EIP feature. For more information, see Install ack-extend-network-controller from the Marketplace.
-
Run the following command to check if the status of the PodEIP resource is updated:
kubectl get podeip -n {namespace} {name} -o yaml # Replace {namespace} and {name} with the namespace and name of the pod associated with an EIP.-
If the
statusfield is not empty, it indicates that the EIP function is running correctly. -
If the
statusfield is empty, check the configuration and logs of the ack-extend-network-controller component.
Example output:
The following table describes the parameters.
Parameter
Description
spec.allocationType.type
-
Static: Specifies the static allocation method. The pod uses the specified EIP ID. -
Auto: The EIP is automatically created by Terway.
spec.allocationType.releaseStrategy
-
Follow: Indicates that the EIP is released when the Pod is deleted. This means that for a stateless workload, the association between the EIP and the Pod does not need to be maintained. -
TTL: Specifies the duration after which the EIP is released. This allows you to maintain the association between the EIP and the pod for stateful workloads.
-
-
To disable the EIP feature in Terway, follow these steps:
-
Set the
enable_eip_migrateparameter tofalse, or delete the parameter. -
Set the value of the
enable_eip_poolparameter to"false"or delete the parameter. -
Restart the Terway pods.
-