Skip to content

Commit ec6e8de

Browse files
reduce duplicated info
1 parent 4493ba7 commit ec6e8de

File tree

2 files changed

+10
-56
lines changed

2 files changed

+10
-56
lines changed

content/operate/kubernetes/networking/_index.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,14 @@ For Active-Active databases, configure automatic ingress creation:
3535

3636
## External routing using Redis Enterprise for Kubernetes
3737

38-
Every time a RedisEnterpriseDatabase (REDB), Redis Enterprise Active-Active database (REAADB), or Redis Enterprise cluster (REC) is created, the Redis Enterprise operator automatically creates a [service](https://kubernetes.io/docs/concepts/services-networking/service/) to allow requests to be routed to that resource.
39-
40-
Redis Enterprise supports three [types of services](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) for accessing databases: `ClusterIP`, `headless`, or `LoadBalancer`.
41-
42-
By default, the operator creates a `ClusterIP` type service, which exposes a cluster-internal IP and that can only be accessed from within the K8s cluster. For requests to be routed from outside the K8s cluster, you need an [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) (or [route](https://docs.openshift.com/container-platform/4.12/networking/routes/route-configuration.html) if you are using OpenShift). See [kubernetes.io](https://kubernetes.io/docs/) for more details on [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) and [Ingress controllers](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/).
38+
The Redis Enterprise operator automatically creates Kubernetes services for database access. For external access from outside the cluster, you need to configure additional routing methods:
4339

4440
- To use NGINX or HAProxy Ingress controllers, see [Ingress routing]({{< relref "/operate/kubernetes/networking/ingress" >}}).
4541
- To use OpenShift routes, see [OpenShift routes]({{< relref "/operate/kubernetes/networking/routes" >}}).
4642
- To use Istio as an Ingress controller, see [Istio Ingress routing]({{< relref "/operate/kubernetes/networking/istio-ingress" >}})
4743

44+
For comprehensive information about service types, in-cluster access, and connectivity patterns, see [Database connectivity]({{< relref "/operate/kubernetes/networking/database-connectivity" >}}).
45+
4846
## `ingressOrRouteSpec` for Active-Active databases
4947

5048
Versions 6.4.2 or later of Redis Enterprise for Kubernetes include a feature for ingress configuration. The `ingressOrRouteSpec` field is available in the RedisEnterpriseCluster spec to automatically create an Ingress (or route) for the API service and databases (REAADB) on that REC. See [REC external routing]({{< relref "/operate/kubernetes/networking/ingressorroutespec" >}}) for more details.

content/operate/kubernetes/re-databases/db-controller.md

Lines changed: 7 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -108,57 +108,13 @@ kubectl delete redb mydb
108108

109109
## Connect to a database
110110

111-
After the database controller creates a database, the services for accessing the database are created in the same namespace. By default there are two services, one 'ClusterIP' service and one 'headless' service.
112-
Connection information for the database is stored in a Kubernetes [secret](https://kubernetes.io/docs/concepts/configuration/secret/) maintained by the database controller. This secret contains:
111+
After the database controller creates a database, services for accessing the database are automatically created in the same namespace. Connection information is stored in a Kubernetes [secret](https://kubernetes.io/docs/concepts/configuration/secret/) maintained by the database controller.
113112

114-
- The database port (`port`)
115-
- A comma separated list of service names (`service_names`)
116-
- The database password for authenticating (`password`)
113+
For comprehensive information about connecting to your database, including:
117114

118-
The name of that secret is stored in the database custom resource.
115+
- Service types and access patterns
116+
- Retrieving connection information from secrets
117+
- In-cluster and external access methods
118+
- Connection examples and troubleshooting
119119

120-
{{<note>}}
121-
Use these steps to connect to your database from within your K8s cluster. To access your database from outside the K8s cluster, set up the [Ingress]({{< relref "/operate/kubernetes/networking/ingress" >}}) controller or use OpenShift routes.
122-
{{</note>}}
123-
124-
1. Retrieve the secret name.
125-
126-
```sh
127-
kubectl get redb mydb -o jsonpath="{.spec.databaseSecretName}"
128-
```
129-
130-
The database secret name usually takes the form of `redb-<database_name>`, so in our example it will be `redb-mydb`.
131-
132-
1. Retrieve and decode the password.
133-
134-
```sh
135-
kubectl get secret redb-mydb -o jsonpath="{.data.password}" | base64 --decode
136-
```
137-
138-
1. Retrieve and decode the port number.
139-
140-
```sh
141-
kubectl get secret redb-mydb -o jsonpath="{.data.port}" | base64 --decode
142-
```
143-
144-
1. Retrieve and decode the service_names.
145-
146-
```sh
147-
kubectl get secret redb-mydb -o jsonpath="{.data.service_names}" | base64 --decode
148-
```
149-
150-
You'll need to pick just one service listed here to use for connecting.
151-
152-
1. From a pod within your cluster, use `redis-cli` to connect to your database.
153-
154-
```sh
155-
redis-cli -h <service_name> -p <port>
156-
```
157-
158-
1. Enter the password you retrieved from the secret.
159-
160-
```sh
161-
auth <password>
162-
```
163-
164-
You are now connected to your database!
120+
See [Database connectivity]({{< relref "/operate/kubernetes/networking/database-connectivity" >}}).

0 commit comments

Comments
 (0)