Upgrade the provider to v0.17 and move tenant traffic from NGINX Gateway Fabric (NGF) to Envoy Gateway.
Envoy Gateway is the default gateway from provider v0.17. You install Envoy Gateway next to NGF, upgrade the provider and its operators, then upgrade the akash-gateway chart: that last upgrade migrates every tenant route to Envoy, switches the Gateway over and stops NGF, on its own. NGF and Envoy can’t run side by side, so NGF is removed at the end.
Time: About 30 minutes of preparation with no traffic impact. Tenant traffic and the provider ports are down for a few seconds during the akash-gateway upgrade.
Before you begin
- The provider runs on Gateway API with NGF and the akash-gateway chart. If it still uses ingress-nginx, complete the Gateway API migration first: provider v0.17 has no ingress-nginx support, and its charts refuse to install in Ingress mode (
gatewayApi.enabled: false). kubectland Helm 4 on the control plane node.- Your complete
provider.yamlin/root/provider, as in Provider installation. crictlon the nodes that serve tenant traffic (installed with Kubespray).
No firewall change: Envoy serves the same host ports as NGF (80, 443, 8443, 8444).
Order matters:
- Envoy Gateway is installed first: the akash-gateway chart creates Envoy resources, and the switch needs Envoy’s controller running.
- The provider and hostname operator are upgraded next: the migration needs the v0.17 hostname operator.
- akash-gateway is upgraded last, and that upgrade does the migration.
STEP 1: Install the Gateway API and Envoy Gateway CRDs
Install the Envoy Gateway CRDs and Gateway API v1.6.1 (experimental channel, which includes TCPRoute), the version Envoy Gateway v1.9.4 is built against. Apply them server-side: some CRDs are too large for client-side apply. --force-conflicts lets server-side apply take over the Gateway API CRDs that NGF installed.
helm template eg-crds oci://docker.io/envoyproxy/gateway-crds-helm --version v1.9.4 \ --set crds.gatewayAPI.enabled=true \ --set crds.gatewayAPI.channel=experimental \ --set crds.envoyGateway.enabled=true \ | kubectl apply --server-side --force-conflicts -f -If NGF installed Gateway API v1.7.0, this replaces it with v1.6.1; NGF keeps working on v1.6.1. Check the version and that NGF still programs the Gateway:
kubectl get crd gateways.gateway.networking.k8s.io \ -o jsonpath='{.metadata.annotations.gateway\.networking\.k8s\.io/bundle-version}{"\n"}'kubectl -n akash-gateway get gateway akash-gatewayExpected output: v1.6.1, and the Gateway with class nginx and PROGRAMMED True.
STEP 2: Install the Envoy Gateway controller
Install the controller in GatewayNamespace mode, so Envoy runs in the Gateway’s namespace (akash-gateway). Tenant network policies only allow traffic from that namespace.
helm install eg oci://docker.io/envoyproxy/gateway-helm --version v1.9.4 \ -n envoy-gateway-system --create-namespace --skip-crds \ --set config.envoyGateway.provider.kubernetes.deploy.type=GatewayNamespacekubectl -n envoy-gateway-system get podsThe envoy-gateway pod is Running. Nothing uses Envoy yet.
STEP 3: Prepare
Update Helm Repo
helm repo update akashhelm search repo akash | grep -E "provider|operator|akash-gateway"Expected output:
akash/akash-gateway 1.3.0akash/akash-hostname-operator 20.0.0 0.17.0akash/akash-inventory-operator 20.0.0 0.17.0akash/akash-ip-operator 20.0.0 0.17.0akash/provider 20.0.0 0.17.0Back Up
cd /root/providerfor i in $(helm list -n akash-services -q | grep -vw akash-node); do helm -n akash-services get values $i > ${i}.pre-v0.17.0.values; donehelm -n akash-gateway get values akash-gateway > akash-gateway.pre-v0.17.0.valueshelm -n nginx-gateway get values ngf > ngf.pre-v0.17.0.valueskubectl get httproutes,snippetsfilters -A -l akash.network=true -o yaml > routes.pre-v0.17.0.yamlPre-Pull the Envoy Image
On every node that serves tenant traffic, to shorten the outage:
crictl pull docker.io/envoyproxy/envoy:distroless-v1.39.6STEP 4: Upgrade the operators and the provider
Use --reset-then-reuse-values, not --reuse-values. --reuse-values also keeps the previous chart’s defaults, so gatewayApi.gatewayProvider would stay nginx instead of the new auto, and after the switch the hostname operator would keep writing NGF routes. The akash-gateway upgrade in STEP 5 checks this and stops if the operator is still set to nginx.
kubectl apply -f https://raw.githubusercontent.com/akash-network/provider/v0.17.0/pkg/apis/akash.network/crd.yaml
helm -n akash-services upgrade akash-hostname-operator akash/akash-hostname-operator \ --version 20.0.0 --reset-then-reuse-valueshelm -n akash-services upgrade inventory-operator akash/akash-inventory-operator \ --version 20.0.0 --reset-then-reuse-valuesWith IP leasing (MetalLB):
helm -n akash-services upgrade akash-ip-operator akash/akash-ip-operator \ --version 20.0.0 --reset-then-reuse-valueshelm -n akash-services upgrade akash-provider akash/provider \ --version 20.0.0 --reset-then-reuse-valuesCheck the images and the detected gateway:
kubectl -n akash-services get pods -o custom-columns='NAME:.metadata.name,IMAGE:.spec.containers[*].image'kubectl -n akash-services get configmap operator-hostname -o jsonpath='{.data.gateway-provider}{"\n"}'kubectl -n akash-services logs deploy/operator-hostname | grep gateway_implementationThe images reference 0.17.0, the operator’s gateway provider is auto, and its log shows "gateway_implementation":"nginx": everything still runs on NGF.
Optionally, review the route changes the migration will make. This writes nothing:
kubectl -n akash-services exec akash-provider-0 -c provider -- \ provider-services migrate gateway --to envoy --dry-runSTEP 5: Upgrade akash-gateway (migrates to Envoy)
This upgrade moves the Gateway to Envoy. It runs two short jobs around the switch:
- Before the switch (
akash-gateway-gateway-migration-routes): checks that Envoy Gateway is installed and that the hostname operator is v0.17 with gateway providerauto, stops the hostname operator, and migrates every tenant route to Envoy (provider-services migrate gateway --to envoy). NGF keeps serving. If anything fails, the operator is started again and the upgrade stops before the Gateway changes. - The switch: the Gateway’s class becomes
envoy. - After the switch (
akash-gateway-gateway-migration-switch): waits until Envoy has created its proxies, stops the NGF controller and removes NGF’s proxies, which frees the host ports, waits until Envoy serves the Gateway, then starts the hostname operator, which detects Envoy. Tenant traffic is down from the moment NGF’s proxies are removed until Envoy’s start, a few seconds.
cd /root/providerhelm upgrade akash-gateway akash/akash-gateway \ -n akash-gateway \ --version 1.3.0 \ -f provider.yaml \ --timeout 15mTo follow the jobs from a second terminal:
kubectl -n akash-gateway logs -f job/akash-gateway-gateway-migration-routeskubectl -n akash-gateway logs -f job/akash-gateway-gateway-migration-switchExpected output of the second job:
waiting for Envoy to create its proxiesstopped NGINX Gateway Fabric controller nginx-gateway/ngf-nginx-gateway-fabricdeleted NGINX Gateway Fabric proxies daemonsets/akash-gateway-nginxwaiting for Envoy to program the GatewayGateway programmed by Envoyhostname operator scaled to 1STEP 6: Verify
Gateway and operator:
kubectl -n akash-gateway get gateway akash-gatewaykubectl -n akash-gateway get daemonset,pods -o widekubectl -n akash-services logs deploy/operator-hostname | grep gateway_implementationThe Gateway uses class envoy with PROGRAMMED True, the akash-gateway DaemonSet has a Ready pod on every node, and the operator log shows "gateway_implementation":"envoy".
Routes: every tenant route is accepted by Envoy Gateway.
kubectl get httproutes -A -l akash.network=true \ -o jsonpath='{range .items[*]}{.metadata.namespace}/{.metadata.name}{"\t"}{range .status.parents[?(@.controllerName=="gateway.envoyproxy.io/gatewayclass-controller")].conditions[?(@.type=="Accepted")]}{.status}{end}{"\n"}{end}'Every line ends in True.
Policies: deployments’ http_options become BackendTrafficPolicies, which must be accepted.
kubectl get backendtrafficpolicies -A \ -o jsonpath='{range .items[*]}{.metadata.namespace}/{.metadata.name}{"\t"}{.status.ancestors[0].conditions[?(@.type=="Accepted")].status}{"\n"}{end}'Traffic: a few deployment hostnames answer on 80 and 443, including one custom domain. The provider answers on 8443:
curl -sk https://provider.<your-domain>:8443/status | jq .Watch for deployment errors for an hour after the upgrade.
STEP 7: Remove NGF
NGF and Envoy can’t run side by side: while NGF’s controller runs, it recreates its proxies, which take the host ports back. The upgrade stopped it; once the provider has run cleanly on Envoy (and you no longer need to roll back), uninstall it:
helm uninstall ngf -n nginx-gatewaykubectl get crd -o name | grep gateway.nginx.org | xargs kubectl deletekubectl delete namespace nginx-gatewayThe akash-gateway chart only creates its NGF settings while the Gateway is on NGF, so nothing else refers to NGF. Later akash-gateway upgrades need no extra flags.
Rolling back to NGF
Possible until NGF is uninstalled in STEP 7. The tenant routes are migrated after the switch, and NGF’s controller has to run again while Envoy’s stops:
cd /root/providerkubectl -n akash-services scale deployment operator-hostname --replicas=0kubectl -n nginx-gateway scale deployment ngf-nginx-gateway-fabric --replicas=1kubectl -n nginx-gateway rollout status deployment ngf-nginx-gateway-fabric
helm upgrade akash-gateway akash/akash-gateway \ -n akash-gateway \ --version 1.3.0 \ -f provider.yaml \ --set gateway.gatewayClassName=nginx \ --set gateway.confirmClassChange=true
# once NGF has created its proxies (akash-gateway-nginx), free the ports for themkubectl -n akash-gateway get daemonset akash-gateway-nginxkubectl -n envoy-gateway-system scale deployment envoy-gateway --replicas=0kubectl -n akash-gateway delete daemonset akash-gatewaykubectl -n akash-gateway rollout status daemonset akash-gateway-nginx
kubectl -n akash-services exec akash-provider-0 -c provider -- \ provider-services migrate gateway --to nginxkubectl -n akash-services scale deployment operator-hostname --replicas=1The hostname operator log then shows "gateway_implementation":"nginx". Keep --set gateway.gatewayClassName=nginx on later akash-gateway upgrades until you move to Envoy again; that upgrade (STEP 5 without the flag) starts Envoy’s controller again on its own.
What changes for deployments
Requests reach deployments as they did through NGF:
X-Real-IP,X-Forwarded-HostandX-Forwarded-Portare set by the gateway; values a client sends are replaced.- The client’s address is appended to
X-Forwarded-For. - Header names with underscores are dropped.
- Encoded slashes (
%2F) and repeated slashes are passed through unchanged.
Differences:
- Envoy resolves dot segments:
/a/../breaches the deployment as/b. - SDL
http_optionsare applied as Envoy settings:read_timeoutandsend_timeoutshare one idle timeout per request, set to the larger of the two.next_timeoutis not applied.- Retries apply to idempotent requests only (for example
GET,HEAD,PUT,DELETE); aPOSTis not retried. next_triesis capped at 10.- The
timeoutandinvalid_headerretry cases are ignored. max_body_sizeand the proxy buffer options are not applied.
Troubleshooting
The akash-gateway upgrade fails with pre-upgrade hooks failed
The first job found a problem before changing anything. NGF still serves the Gateway and the hostname operator was started again. Read the reason:
kubectl -n akash-gateway logs job/akash-gateway-gateway-migration-routesno Envoy Gateway controller found: do STEP 2.hostname operator ... runs ...0.16...orgateway provider is "nginx": redo STEP 4 with--reset-then-reuse-values.route migration failed: the job lists the routes that failed or that Envoy can’t serve. Fix them (or close the leases) and run the upgrade again.
The akash-gateway upgrade fails with post-upgrade hooks failed
The Gateway is already on Envoy, but Envoy didn’t serve it in time. The hostname operator was started again.
kubectl -n akash-gateway logs job/akash-gateway-gateway-migration-switchkubectl -n akash-gateway get daemonset,pods -o widekubectl -n akash-gateway describe pod -l gateway.envoyproxy.io/owning-gateway-name=akash-gateway | grep -A5 EventsEnvoy pods Pending with didn't have free ports mean something else still holds the host ports, usually NGF’s proxies: check that ngf-nginx-gateway-fabric is scaled to 0 and delete the akash-gateway-nginx DaemonSet. Once Envoy’s pods are Ready, the Gateway reports PROGRAMMED True.
The akash-gateway upgrade fails with no matches for kind "EnvoyProxy"
The Envoy Gateway CRDs are missing: run STEP 1. Nothing was changed.
The akash-gateway upgrade fails with “would switch it to … and move all tenant traffic at once”
The chart switches the Gateway on its own only from NGF to Envoy. Any other change of class, such as a rollback, needs --set gateway.confirmClassChange=true and the manual steps in Rolling back to NGF.
The hostname operator restarts with failed to resolve gateway provider
The operator reads the Gateway at startup and stops if the Gateway doesn’t exist or its class is neither Envoy Gateway nor NGF.
kubectl -n akash-gateway get gateway akash-gatewaykubectl get gatewayclassRelated resources
- Provider installation (new providers install Envoy Gateway from the start)
- Gateway API migration (ingress-nginx to NGF, before this upgrade)
- akash-gateway chart
- Envoy Gateway documentation