Cloud

NGINX Gateway Fabric 2.8: IP Access Rules and Health Checks

NGINX Gateway Fabric 2.8 adds IP allow and deny lists, passive health checks and open-source sticky sessions.

6 November 2026  ·  5 min read  ·  Anand

NGINX Gateway Fabric 2.8: IP Access Rules and Health Checks

NGINX Gateway Fabric runs the Kubernetes Gateway API with NGINX as its data plane. Version 2.8.0 came out on October 16, 2026. It fills several gaps that used to send teams back to NGINX snippets or to a separate ingress controller: you can now allow or block client IPs, run passive health checks, and use cookie-based session persistence on NGINX Open Source, which used to need NGINX Plus. It also has two upgrade changes that can break an existing install, so read the upgrade notes before you change the chart version.

What is new at a glance

Feature Where it lives Notes
IP allow and deny lists New AccessPolicy resource Attaches to a Gateway, HTTPRoute or GRPCRoute
Passive health checks UpstreamSettingsPolicy field healthCheck.passive Maps to NGINX max_fails and fail_timeout
Cookie session persistence Gateway API sessionPersistence Now works on NGINX Open Source
Prometheus ServiceMonitors Helm chart and NginxProxy Metrics never go out on the public Service
Access logs to file or syslog NginxProxy spec.logging.accessLog Only works if a log format is also set
Safer rolling upgrades Control plane Rejects data plane pods whose image version does not match

Allow and block client IPs with AccessPolicy

Until now, limiting a route to an office network or blocking an abusive range usually meant writing raw NGINX allow and deny lines in a snippet. AccessPolicy does the same job as a typed Kubernetes resource. You choose an action, Allow or Deny, and list up to 64 rules with IP addresses or CIDR ranges. Blocked clients get 403 Forbidden. This example lets only one office range reach the coffee route:

apiVersion: gateway.nginx.org/v1alpha1
kind: AccessPolicy
metadata:
  name: coffee-allowlist
spec:
  targetRefs:
  - group: gateway.networking.k8s.io
    kind: HTTPRoute
    name: coffee
  action: Allow
  rules:
  - name: office-network
    source:
      type: IPAddress
      ipAddress:
        address: 192.0.2.0/24

Know how it behaves before you rely on it:

  • An Allow policy is a strict allow list. Any client that matches none of its rules is rejected.
  • A policy on the Gateway applies to every route attached to it. Deny rules from the Gateway and from the route both apply.
  • If both the Gateway and a route have Allow rules, the route can only narrow what the Gateway allows. It cannot widen it.
  • If a cloud load balancer or CDN sits in front of the Gateway, set rewriteClientIP on the NginxProxy resource. Otherwise NGINX sees the proxy’s address, and your rules match the wrong client.

Passive health checks and sticky sessions

Passive health checks watch real traffic instead of sending probes. In 2.8, UpstreamSettingsPolicy gets a healthCheck.passive block. maxFails is the number of failed attempts within failTimeout that takes a backend out of rotation, and failTimeout is also how long it stays out. Setting maxFails to 0 turns failure counting off.

apiVersion: gateway.nginx.org/v1alpha1
kind: UpstreamSettingsPolicy
metadata:
  name: example-passive-hc
spec:
  targetRefs:
  - group: core
    kind: Service
    name: coffee
  healthCheck:
    passive:
      maxFails: 3
      failTimeout: 5s

Active health checks, which probe a path on a schedule, are still NGINX Plus only. A policy that sets healthCheck.active is rejected on NGINX Open Source.

The Gateway API sessionPersistence field on HTTPRoute and GRPCRoute rules now becomes the sticky cookie directive, which NGINX Open Source has had since 1.29.6. There are two catches. sessionPersistence is an experimental Gateway API feature, so you have to enable experimental features. And the HTTPRoute form of the API is already deprecated: a future release is expected to move it to the Backend resource. If you only need client-IP affinity, ip_hash on UpstreamSettingsPolicy is still there.

Upgrade notes that can break things

  • htpasswd Secrets are gone. The nginx.org/htpasswd Secret type, deprecated since 2.5, has been removed. Basic auth now reads only Opaque Secrets that keep the credentials under the auth key. Convert any Secret that an AuthenticationFilter references before you upgrade.
  • loadBalancerClass is no longer set by default. If you want NGINX Gateway Fabric to manage it, set it in the NginxProxy under spec.kubernetes.service, or in Helm at nginx.service.loadBalancerClass. Kubernetes will not change this field on an existing Service. To move a 2.7 Service to a different load balancer, you have to delete it and let it be recreated, and it comes back with a new ClusterIP and new NodePorts.
  • Optional Secret label filtering. The new control plane flag --watch-secret-label-selector makes the control plane watch and cache only labelled Secrets. Before you turn it on, label every Secret your Gateways use, including TLS certificates, the agent TLS Secret and image pull Secrets. If you miss one, data plane provisioning fails. The Helm chart does not support this flag yet.
  • Endpoint picker TLS. If you use the Gateway API Inference Extension, skipVerify now defaults to false.

Version 2.8.0 needs Kubernetes 1.32 or later, supports Gateway API 1.6.3 and ships NGINX Open Source 1.31.7. It also fixes CVE-2026-91184 (configuration injection in AuthenticationFilter) and CVE-2026-96615 (NGINX Agent connection spoofing), plus several NGINX CVEs fixed since 2.7.0. That is a good reason not to put the upgrade off for long.

A safe upgrade checklist

  1. Confirm the cluster runs Kubernetes 1.32 or newer: kubectl version.
  2. Look for htpasswd Secrets with kubectl get secrets -A --field-selector type=nginx.org/htpasswd, and convert any that are still referenced.
  3. Check whether your Gateway Services depend on loadBalancerClass. If they do, set it explicitly.
  4. Update the Gateway API and NGINX Gateway Fabric CRDs to the versions in the 2.8.0 upgrade documentation before you upgrade the chart.
  5. Upgrade staging first with the 2.8.0 chart from oci://ghcr.io/nginx/charts/nginx-gateway-fabric, then check the status conditions on your Gateways and routes.
  6. Try an AccessPolicy on one non-critical route before you put one on a whole Gateway. Then test from an outside address and confirm you get a 403 where you expect one.

How TechProvidence can help

TechProvidence plans and runs Kubernetes ingress and gateway migrations: moving from ingress controllers to the Gateway API, testing upgrades in staging, and setting up health checks, access rules and monitoring so changes reach production without surprises. If you would like a second pair of hands on your cluster, contact us.

Source: NGINX Community Blog

Running into something similar?

We look after Linux servers, control panels and virtualization for businesses every day. If an update, vulnerability or outage here affects you, we can help.