{
  "schema_version": 2,
  "id": "operate/kubernetes/networking/ingressorroutespec",
  "title": "Establish external routing on the RedisEnterpriseCluster",
  "url": "https://redis.io/docs/latest/operate/kubernetes/networking/ingressorroutespec/",
  "summary": "",
  "tags": [
    "docs",
    "operate",
    "kubernetes"
  ],
  "last_updated": "2026-09-28T16:14:52+01:00",
  "page_type": "content",
  "content_hash": "94af732b2e5f422fc964d3f7914b9584c675891a3c457297d5879af3c6248540",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "An Ingress is an API resource that provides a standardized and flexible way to manage external access to services running within a Kubernetes cluster.\n\n> [!WARNING]\n> The community [Ingress-NGINX controller](https://github.com/kubernetes/ingress-nginx) (`kubernetes/ingress-nginx`) is retired. Best-effort maintenance ended in March 2026 and the project no longer ships releases, bug fixes, or security updates. If you are not already using it, use HAProxy or Istio."
    },
    {
      "id": "install-ingress-controller",
      "title": "Install Ingress controller",
      "role": "setup",
      "text": "Redis Enterprise for Kubernetes supports the Ingress controllers below:\n* [HAProxy](https://haproxy-ingress.github.io/)\n* [Istio](https://istio.io/latest/docs/setup/getting-started/)\n* [Ingress-NGINX](https://kubernetes.github.io/ingress-nginx/) (retired; existing deployments only)\n\nOpenShift users can use [routes](https://redis.io/docs/latest/operate/kubernetes/networking/routes) instead of an Ingress.\n\nInstall your chosen Ingress controller, making sure `ssl-passthrough` is enabled. It is on by default for HAProxy and off by default for Ingress-NGINX. For Ingress-NGINX, start the controller with the `--enable-ssl-passthrough` flag."
    },
    {
      "id": "configure-dns",
      "title": "Configure DNS",
      "role": "configuration",
      "text": "1. Choose the API hostname and database hostname suffix you will use, replacing `<placeholders>` with your own values. The recommended formats are:\n\n     * REC API hostname (`apiFqdnUrl`): `api-<rec-name>-<rec-namespace>.<subdomain>`\n     * Database hostname suffix (`dbFqdnSuffix`): `.db-<rec-name>-<rec-namespace>.<subdomain>`\n\n     The operator appends each database name to `dbFqdnSuffix` to build the per-database hostname. For example, a database named `mydb` with the suffix above resolves to `mydb.db-<rec-name>-<rec-namespace>.<subdomain>`. For the wildcard DNS record, replace the database name with `*`, which resolves to `*.db-<rec-name>-<rec-namespace>.<subdomain>`.\n\n1. Retrieve the `EXTERNAL-IP` of your Ingress controller's `LoadBalancer` service.\n\n     [code example]\n\n     Below is example output for an HAProxy ingress controller running on a K8s cluster hosted by AWS.  \n\n     [code example]\n\n1. Create DNS records to resolve your chosen REC API hostname and database hostname to the `EXTERNAL-IP` found in the previous step."
    },
    {
      "id": "edit-the-rec-spec",
      "title": "Edit the REC spec",
      "role": "content",
      "text": "Edit the RedisEnterpriseCluster (REC) spec to add the `ingressOrRouteSpec` field, replacing `<placeholders>` below with your own values."
    },
    {
      "id": "nginx-or-haproxy-ingress-controllers",
      "title": "NGINX or HAproxy ingress controllers",
      "role": "content",
      "text": "* Define the REC API hostname (`apiFqdnUrl`) and database hostname suffix (`dbFqdnSuffix`) you chose when configuring DNS.\n* Set `method` to `ingress`.\n* Set `ssl-passthrough` to \"true\".\n* Add any additional annotations required for your ingress controller. See [NGINX docs](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/) or [HAproxy docs](https://haproxy-ingress.github.io/docs/configuration/keys/) for more information.\n\n[code example]\n\nSet `<ingress-controller>` to `haproxy` or `nginx`. The operator validates that `ingressAnnotations` includes `kubernetes.io/ingress.class` and is the only annotation key it requires; add any other controller-specific annotations alongside it."
    },
    {
      "id": "openshift-routes",
      "title": "OpenShift routes",
      "role": "content",
      "text": "* Define the REC API hostname (`apiFqdnUrl`) and database hostname suffix (`dbFqdnSuffix`) you chose when configuring DNS.\n* Set `method` to `openShiftRoute`.\n\n[code example]\n\nOpenShift routes do not require any `ingressAnnotations` in the `ingressOrRouteSpec`."
    }
  ],
  "examples": [
    {
      "id": "configure-dns-ex0",
      "language": " sh",
      "code": "$ kubectl get svc <haproxy-ingress | ingress-ngnix-controller> \\\n                         -n <ingress-ctrl-namespace>",
      "section_id": "configure-dns"
    },
    {
      "id": "configure-dns-ex1",
      "language": " sh",
      "code": "NAME              TYPE           CLUSTER-IP    EXTERNAL-IP                                                              PORT(S)                      AGE   \n     haproxy-ingress   LoadBalancer   10.43.62.53   a56e24df8c6173b79a63d5da54fd9cff-676486416.us-east-1.elb.amazonaws.com   80:30610/TCP,443:31597/TCP   21m",
      "section_id": "configure-dns"
    },
    {
      "id": "nginx-or-haproxy-ingress-controllers-ex0",
      "language": "sh",
      "code": "kubectl patch rec <rec-name> --type merge --patch \"{\\\"spec\\\": \\\n    {\\\"ingressOrRouteSpec\\\": \\\n      {\\\"apiFqdnUrl\\\": \\\"api-<rec-name>-<rec-namespace>.example.com\\\", \\\n      \\\"dbFqdnSuffix\\\": \\\".db-<rec-name>-<rec-namespace>.example.com\\\", \\\n      \\\"ingressAnnotations\\\": \\\n       {\\\"kubernetes.io/ingress.class\\\": \\\"<ingress-controller>\\\", \\\n       \\\"<ingress-controller-annotation>/ssl-passthrough\\\": \\\"true\\\"}, \\\n      \\\"method\\\": \\\"ingress\\\"}}}\"",
      "section_id": "nginx-or-haproxy-ingress-controllers"
    },
    {
      "id": "openshift-routes-ex0",
      "language": "sh",
      "code": "kubectl patch rec <rec-name> --type merge --patch \"{\\\"spec\\\": \\\n     {\\\"ingressOrRouteSpec\\\": \\\n     {\\\"apiFqdnUrl\\\": \\\"api-<rec-name>-<rec-namespace>.example.com\\\" \\ \n     \\\"dbFqdnSuffix\\\": \\\".db-<rec-name>-<rec-namespace>.example.com\\\", \\\n     \\\"method\\\": \\\"openShiftRoute\\\"}}}\"",
      "section_id": "openshift-routes"
    }
  ]
}
