Linux Kernel Compatibility Notice
For nodes running Linux kernel versions earlier than 4.11 (e.g., CentOS 7), additional configuration is required prior to gateway installation. There are two scenarios depending on whether you need to listen on ports below 1024:
- Scenario 1: Kernel versions earlier than 4.11 only — The gateway listens on ports 1024 or above. You need to set
sysctls: []to remove the defaultnet.ipv4.ip_unprivileged_port_startsysctl, which is not available on kernels earlier than 4.11. - Scenario 2: Kernel versions earlier than 4.11 + privileged ports — The gateway needs to listen on ports below 1024. In addition to the
sysctls: []change from Scenario 1, you must also add theNET_BIND_SERVICEcapability to allow binding to privileged ports.
Skip this section if your kernel version is 4.11 or later.
TOC
Istio GatewayPrerequisitesProcedureScenario 1: Kernel versions earlier than 4.11 only (ports ≥ 1024)Scenario 2: Kernel versions earlier than 4.11 + privileged ports (ports < 1024)Apply the injection templateKubernetes Gateway APIPrerequisitesProcedureScenario 1: Kernel versions earlier than 4.11 only (ports ≥ 1024)Scenario 2: Kernel versions earlier than 4.11 + privileged ports (ports < 1024)Apply the ConfigMapIstio Gateway
Prerequisites
- Install
jqlocally to process JSON in these steps.
Procedure
Scenario 1: Kernel versions earlier than 4.11 only (ports ≥ 1024)
-
Create a YAML file named
gateway-injection-template.txtthat contains the default injection template for gateways.Click to expand
- Remove
sysctlsbecausenet.ipv4.ip_unprivileged_port_startis not available on Linux kernels earlier than 4.11.
- Remove
Scenario 2: Kernel versions earlier than 4.11 + privileged ports (ports < 1024)
If your gateway needs to listen on ports below 1024, you must also add the NET_BIND_SERVICE capability in addition to the sysctls: [] change. Modify the securityContext section of the istio-proxy container in gateway-injection-template.txt:
If the gateway still cannot listen on ports below 1024 after adding the NET_BIND_SERVICE capability, consider the following alternatives:
- Use ports 1024 or above (recommended) — Reconfigure your gateway listeners to use ports ≥ 1024 to avoid privilege issues entirely.
- Run the gateway as root — Set
runAsUser: 0,runAsGroup: 0, andrunAsNonRoot: falsein the container'ssecurityContext. This grants full privileges to the gateway process. Evaluate the security implications carefully before using this approach.
Apply the injection template
-
Patch the default
gatewayinjection template forIstioresource: -
Wait for the control plane to return the
Readystatus condition by running the following command:
Kubernetes Gateway API
Prerequisites
- Alauda Container Platform 4.2.0 or later, or upgrade Gateway API CRDs to the latest version.
Procedure
Scenario 1: Kernel versions earlier than 4.11 only (ports ≥ 1024)
-
Create a ConfigMap named
asm-kube-gateway-optionsin the same namespace where you plan to deploy your Gateway:- Remove
sysctlsbecausenet.ipv4.ip_unprivileged_port_startis not available on Linux kernels earlier than 4.11.
- Remove
Scenario 2: Kernel versions earlier than 4.11 + privileged ports (ports < 1024)
If your gateway needs to listen on ports below 1024, add the NET_BIND_SERVICE capability in the ConfigMap. Modify the data.deployment field to include container-level security context:
If the gateway still cannot listen on ports below 1024 after adding the NET_BIND_SERVICE capability, consider the following alternatives:
- Use ports 1024 or above (recommended) — Reconfigure your gateway listeners to use ports ≥ 1024 to avoid privilege issues entirely.
- Run the gateway as root — Set
runAsUser: 0,runAsGroup: 0, andrunAsNonRoot: falsein the container'ssecurityContext. This grants full privileges to the gateway process. Evaluate the security implications carefully before using this approach.
Apply the ConfigMap
-
Reference the ConfigMap in your Gateway resource by adding the
infrastructure.parametersReffield:This configuration ensures that the gateway deployment uses the custom security context settings defined in the ConfigMap.