Terway EIP is deprecated and no longer maintained. Use the ack-extend-network-controller add-on for EIP. This topic guides you through migrating EIPs from Terway to ack-extend-network-controller without service disruption.
Prerequisites
-
An ACK managed cluster or ACK dedicated cluster with Terway as the network plugin is available. See Create an ACK managed cluster and Create an ACK dedicated cluster (no longer available).
Impact
Migration is non-disruptive and does not affect EIP information or workloads.
-
If your cluster uses Terway EIPs, follow this guide to migrate to ack-extend-network-controller.
-
If your cluster does not use Terway EIPs, skip this migration.
Migration overview
When you enable EIP migration in Terway, Terway creates a PodEIP resource for each EIP associated with a pod. A PodEIP manages EIP information for a pod. After migration, ack-extend-network-controller takes over EIP management.
To enable the EIP feature in Terway, see Automatic EIP assignment use cases.
Procedure
-
Verify that ack-extend-network-controller is not installed in your cluster. If it is, 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, find the Release Name ack-extend-network-controller. If it exists, click Delete in the Actions column to uninstall it.
-
Upgrade the Terway network plugin to v1.6.0 or later.
See Manage components.
-
Modify the Terway ConfigMap to enable EIP migration.
ImportantWhen you enable EIP migration, Terway creates a PodEIP resource for each EIP associated with a pod and stops managing EIPs.
-
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 not configured or set to
"false", theeipfeature is not enabled and no migration is required.enable_eip_migrate
true
Set to
trueto enable migration.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 modifying the configuration, restart the Terway pods:
kubectl delete pod -n kube-system -l app=terway-eniipAfter the pods restart, Terway automatically migrates cluster EIPs to ack-extend-network-controller.
-
-
Check migration status in the Terway logs. The output
eip migrate finishedindicates success.-
Get the Terway pod names:
kubectl get pods -n kube-system | grep terwayThe output lists the Terway pod names.
-
View the logs of a Terway pod:
kubectl logs -n kube-system <pod_name> # Replace <pod_name> with the name of your Terway pod.eip migrate finishedin the output confirms the 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 PodEIP custom resources (CRs) were created in the cluster.
Query a migrated CR. Each CR shares the name and namespace of 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. See Install ack-extend-network-controller from the Marketplace.
-
Check whether the PodEIP resource status 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.-
A non-empty
statusfield indicates the EIP function is running correctly. -
An empty
statusfield indicates a problem. Check ack-extend-network-controller configuration and logs.
Example output:
Parameters:
Parameter
Description
spec.allocationType.type
-
Static: The pod uses a specified EIP ID. -
Auto: Terway automatically creates the EIP.
spec.allocationType.releaseStrategy
-
Follow: The EIP is released when the pod is deleted. For stateless workloads, EIP-pod association is not maintained. -
TTL: The EIP is released after a specified duration. Use this to maintain EIP-pod association for stateful workloads.
-
-
To disable the EIP feature in Terway:
-
Set
enable_eip_migratetofalse, or delete it. -
Set
enable_eip_poolto"false"or delete it. -
Restart the Terway pods.
-