Skip to content
9 changes: 6 additions & 3 deletions content/operate/kubernetes/networking/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ Versions 6.4.2 or later of Redis Enterprise for Kubernetes include a feature for

This feature only supports automatic Ingress creation for Active-Active databases created and managed with the RedisEnterpriseActiveActiveDatabase (REAADB) custom resource. Use with the standard Redis Enterprise database (REDB) is not currently supported.

## OSS Cluster API limitations
## OSS Cluster API support

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's actually so heartwarming - instead of limitations, we are explaining the new capabilities.


When using [OSS Cluster API]({{< relref "/operate/rs/databases/configure/oss-cluster-api" >}}), clients must specify the IP addresses of Redis instances to perform operations. Since Pod IP addresses are internal to the Kubernetes cluster and not publicly accessible, **OSS Cluster API can only be used by clients running on pods within the same Kubernetes cluster as the Redis Enterprise pods.** Using OSS Cluster API from outside the Kubernetes cluster is not tested and currently not supported.
[OSS Cluster API]({{< relref "/operate/kubernetes/networking/cluster-aware-clients" >}}) is supported for both internal and external clients:

For applications that need to access Redis databases from outside the Kubernetes cluster, use standard Redis Enterprise connectivity methods with the external routing options described above (Ingress controllers, load balancers, or OpenShift routes). These methods do not support OSS Cluster API but provide reliable external access to your Redis databases.
- **Internal clients** running on pods within the same Kubernetes cluster can connect directly to Redis Enterprise pods using pod IPs.
- **External clients** outside the Kubernetes cluster can connect through LoadBalancer services when `enableExternalAccess: true` is configured in the database specification. This creates a separate LoadBalancer service for each Redis Enterprise pod. Note that LoadBalancers are resources that can significantly increase operational costs.

See [Enable cluster-aware clients (OSS Cluster API)]({{< relref "/operate/kubernetes/networking/cluster-aware-clients" >}}) for configuration details.

## REC domain name

Expand Down
91 changes: 91 additions & 0 deletions content/operate/kubernetes/networking/cluster-aware-clients.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
Title: Enable cluster-aware clients (OSS Cluster API)
alwaysopen: false
categories:
- docs
- operate
- kubernetes
description: Improve performance with cluster-aware clients by enabling the OSS Cluster API for your Redis Enterprise for Kubernetes database.
linkTitle: Cluster-aware clients
weight: 99
---

The OSS Cluster API improves performance by allowing cluster-aware Redis clients to discover database topology and route requests directly. This feature supports cluster-aware clients running on the same Kubernetes cluster (internal) and cluster-aware clients outside the Kubernetes cluster (external).

{{< note >}}
Enabling external access for OSS Cluster API creates a separate LoadBalancer service for each Redis Enterprise pod in addition to the LoadBalancer service for the cluster endpoint. LoadBalancers are resources that can significantly increase operational costs; plan your infrastructure budget accordingly.
{{< /note >}}

## Prerequisites

- RedisEnterpriseCluster (REC) running version 8.0.10-tbd or later.
- Proxy policy is set to `all-master-shards` or `all-nodes`.
- Modules used by the database (if any) are bundled modules.
- The database is not an Active-Active database.

## Limitations

- OSS Cluster databases with external access must be created and managed using the RedisEnterpriseDatabase (REDB) custom resource. You cannot create or configure these databases using the Redis Enterprise REST API directly.

## Enable OSS Cluster API

To enable cluster-aware clients, edit the REC and REDB custom resources with the following fields.

### Edit REC (RedisEnterpriseCluster) {#edit-rec}

1. Edit the RedisEnterpriseCluster (REC) custom resource to add the `ossClusterSettings` section to the `spec` section.

Set `externalAccessType` to `LoadBalancer` and add any `serviceAnnotations` as required by your service provider.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that in most cases you don't need any service annotations. So maybe change "as required" to "if required" or something like that?


```yaml
ossClusterSettings:
externalAccessType: LoadBalancer
loadBalancer:
serviceAnnotations:
```

2. If you are using internal clients (within the Kubernetes cluster), you can specify their IP ranges in the `podCIDRs` field to improve performance. Clients from these ranges are routed directly to the Redis Enterprise pods, without going through the load balancer.

The following is an example `podCIDRs` field using example values; replace with your own unique CIDRs.

```yaml
podCIDRs:
- "192.0.2.0/24"
- "198.51.100.0/24"
- "203.0.113.0/24"
```

### Edit REDB (RedisEnterpriseDatabase) {#edit-redb}

3. Edit the REDB custom resource to add the following fields and values to the `spec` section.

Set `enableExternalAccess: true` to allow external clients to connect. This provisions a LoadBalancer service for each Redis Enterprise pod running a node, which increases infrastructure costs.

```yaml
ossCluster: true

ossClusterSettings:
enableExternalAccess: true
```

## Connect clients

Use the `kubectl get svc` command to view the services created by the OSS Cluster API. It should look similar to this example:

```sh
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
admission ClusterIP 10.0.1.10 <none> 443/TCP 3h28m
oss-cluster ClusterIP 10.0.1.20 <none> 11712/TCP 3h6m
oss-cluster-headless ClusterIP None <none> 11712/TCP 3h6m
oss-cluster-load-balancer LoadBalancer 10.0.1.30 203.0.113.10 11712:30245/TCP 3h6m
rec ClusterIP 10.0.1.40 <none> 9443/TCP,8001/TCP 3h27m
rec-cluster LoadBalancer 10.0.1.50 203.0.113.20 11712:32559/TCP 3h6m
rec-1-lb LoadBalancer 10.0.1.60 203.0.113.30 11712:31976/TCP 3h6m
rec-2-lb LoadBalancer 10.0.1.70 203.0.113.40 11712:31972/TCP 3h6m
rec-oss ClusterIP None <none> 8070/TCP 3h27m
rec-ui ClusterIP 10.0.1.80 <none> 8443/TCP 3h27m
```

To connect an external client (outside the Kubernetes cluster), use the `EXTERNAL-IP` address for the `oss-cluster-load-balancer` service.

To connect an internal client (listed in the `podCIDRs` field), use the `CLUSTER-IP` address for the `oss-cluster` service.
7 changes: 3 additions & 4 deletions content/operate/rs/clusters/optimize/oss-cluster-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,19 @@ categories:
- operate
- rs
- rc
- kubernetes
description: Use the Redis OSS Cluster API to improve performance and keep applications current with cluster topology changes.
linktitle: "Redis OSS Cluster API"
weight: $weight
---
{{< embed-md "oss-cluster-api-intro.md" >}}

{{< warning >}}
Kubernetes limitation: OSS Cluster API can only be used by clients running within the same Kubernetes cluster as the Redis Enterprise pods. External clients cannot use OSS Cluster API due to pod IP address accessibility limitations.
{{< /warning >}}

You can use the Redis OSS Cluster API along with other Redis Enterprise Software high availability
to get high performance with low latency
and let applications stay current with cluster topology changes, including add node, remove node, and node failover.

For more about working with the OSS Cluster API in Redis Enterprise Software, see [Enable OSS Cluster API]({{< relref "/operate/rs/databases/configure/oss-cluster-api" >}}).

To learn how to enable OSS Cluster API in Redis Cloud, see [Clustering Redis databases]({{< relref "/operate/rc/databases/configuration/clustering#cluster-api" >}}).

To enable OSS Cluster API in Kubernetes, see [Enable cluster-aware clients (OSS Cluster API)]({{< relref "/operate/kubernetes/networking/cluster-aware-clients" >}}).
6 changes: 3 additions & 3 deletions content/operate/rs/databases/configure/oss-cluster-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ In addition, the database must _not_:

The OSS Cluster API setting applies to individual databases instead of the entire cluster.

{{< warning >}}
Kubernetes limitation: OSS Cluster API can only be used by clients running within the same Kubernetes cluster as the Redis Enterprise pods. External clients cannot use OSS Cluster API due to pod IP address accessibility limitations.
{{< /warning >}}
{{< note >}}
For Kubernetes deployments, see [Enable cluster-aware clients (OSS Cluster API)]({{< relref "/operate/kubernetes/networking/cluster-aware-clients" >}}).
{{< /note >}}

## Enable OSS Cluster API support

Expand Down