{
  "id": "ingressorroutespec",
  "title": "Establish external routing on the RedisEnterpriseCluster",
  "url": "https://redis.io/docs/latest/operate/kubernetes/7.8.4/networking/ingressorroutespec/",
  "summary": "",
  "content": "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## Install Ingress controller\n\nRedis Enterprise for Kubernetes supports the Ingress controllers below:\n* [HAProxy](https://haproxy-ingress.github.io/)\n* [NGINX](https://kubernetes.github.io/ingress-nginx/)\n* [Istio](https://istio.io/latest/docs/setup/getting-started/)\n\nOpenShift users can use [routes]() instead of an Ingress.\n\nInstall your chosen Ingress controller, making sure `ssl-passthrough` is enabled. `ssl-passthrough` is turned off by default for NGINX but enabled by default for HAProxy.\n\n## Configure DNS\n\n1. Choose the hostname (FQDN) you will use to access your database according to the recommended naming conventions below, replacing `\u003cplaceholders\u003e` with your own values.\n\n     REC API hostname: `api-\u003crec-name\u003e-\u003crec-namespace\u003e.\u003csubdomain\u003e`\n     REAADB hostname: `-db-\u003crec-name\u003e-\u003crec-namespace\u003e.\u003csubdomain\u003e`\n     \n     We recommend using a wildcard (`*`) in place of the database name, followed by the hostname suffix.\n\n1. Retrieve the `EXTERNAL-IP` of your Ingress controller's `LoadBalancer` service.\n\n     ``` sh\n     $ kubectl get svc \u003chaproxy-ingress | ingress-ngnix-controller\u003e \\\n                         -n \u003cingress-ctrl-namespace\u003e\n     ```\n\n     Below is example output for an HAProxy ingress controller running on a K8s cluster hosted by AWS.  \n\n     ``` sh\n     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\n     ```\n\n1. Create DNS records to resolve your chosen REC API hostname and database hostname to the `EXTERNAL-IP` found in the previous step.\n\n## Edit the REC spec\n\nEdit the RedisEnterpriseCluster (REC) spec to add the `ingressOrRouteSpec` field, replacing `\u003cplaceholders\u003e` below with your own values.\n\n### NGINX or HAproxy ingress controllers\n\n* 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```sh\nkubectl patch rec  \u003crec-name\u003e --type merge --patch \"{\\\"spec\\\": \\\n    {\\\"ingressOrRouteSpec\\\": \\\n      {\\\"apiFqdnUrl\\\": \\\"api-\u003crec-name\u003e-\u003crec-namespace\u003e.example.com\\\", \\\n      \\\"dbFqdnSuffix\\\": \\\"-db-\u003crec-name\u003e-\u003crec-namespace\u003e.example.com\\\", \\\n      \\\"ingressAnnotations\\\": \\\n       {\\\"\u003ckubernetes | github\u003e.io/ingress.class\\\": \\\n       \\\"\u003cingress-controller\u003e\\\", \\\n       \\\"\u003cingress-controller-annotation\u003e/ssl-passthrough\\\": \\ \\\"true\\\"}, \\\n      \\\"method\\\": \\\"ingress\\\"}}}\"\n```\n\n### OpenShift routes\n\n* Define the REC API hostname (`apiFqdnUrl`) and database hostname suffix (`dbFqdnSuffix`) you chose when configuring DNS.\n* Set `method` to `openShiftRoute`.\n\n```sh\nkubectl patch rec \u003crec-name\u003e --type merge --patch \"{\\\"spec\\\": \\\n     {\\\"ingressOrRouteSpec\\\": \\\n     {\\\"apiFqdnUrl\\\": \\\"api-\u003crec-name\u003e-\u003crec-namespace\u003e.example.com\\\" \\ \n     \\\"dbFqdnSuffix\\\": \\\"-db-\u003crec-name\u003e-\u003crec-namespace\u003e.example.com\\\", \\\n     \\\"method\\\": \\\"openShiftRoute\\\"}}}\"\n```\n\nOpenShift routes do not require any `ingressAnnotations` in the `ingressOrRouteSpec`.\n",
  "tags": ["docs","operate","kubernetes"],
  "last_updated": "2026-04-08T12:21:52-07:00"
}

