In Terway network mode, Terway manages the elastic network interfaces (ENIs) on nodes, which requires no operations from you. However, if you want to manage some ENIs yourself in specific scenarios, you must configure a filter for ENIs in Terway to prevent conflicts. After you configure the filter, Terway manages only the ENIs that match the specified tag filter conditions.
Table of contents
Prerequisites
An ACK managed cluster that uses the Terway network plug-in is available. For more information, see Create an ACK managed cluster.
Ensure that the ENIs have the required tags. Otherwise, these ENIs are excluded from management by Terway.
The operations described in this topic are high-risk. Perform them only after you fully understand and test them.
Limits
Terway must be V1.5.5 or later. For more information about how to upgrade a component, see Manage components.
Procedure
Modify the Terway configuration file.
kubectl edit cm -n kube-system eni-configAdd the following content to the
eni_confconfiguration."eni_tag_filter": { "creator": "terway" }"eni_tag_filter"specifies the tag filter for ENIs.{"creator": "terway"}is an example of a filter condition, which matches only the ENIs created by Terway.Example:
eni_conf: | { "eni_tag_filter": { "creator": "terway" }, "ip_stack": "ipv4", "vswitch_selection_policy": "ordered" }ImportantEnsure that the ENIs have the required tags. Otherwise, Terway will not manage these ENIs.
For more information about how to modify ENI tags, see Categorize and manage ENIs.
For more information about how to set tags for ENIs when Terway creates them, see Customize Terway configuration parameters.
Restart Terway to apply the configuration.
kubectl delete pod -nkube-system -l app=terway-eniipExpected output:
pod "terway-eniip-XXX" deletedVerify that the configuration has taken effect.
Check the status of terway-eniip.
kubectl get pods -n kube-system -l app=terway-eniipExpected output:
NAME READY STATUS RESTARTS AGE terway-eniip-XXX 2/2 Running 0 19hView the Terway configuration information.
kubectl logs -nkube-system terway-eniip-XXX Or kubectl logs -nkube-system terway-eniip-XXX -c terway-initIf the output contains content similar to the following, the Terway configuration has taken effect.
# ENITagFilter is the network interface tag filter. creator:terway matches only the network interfaces that are created by Terway. ENITagFilter:map[creator:terway]
Add a new node or re-add an existing node to the cluster.