Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K8s: DOC-4696 fix #1110

Merged
merged 2 commits into from
Feb 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions content/operate/kubernetes/re-databases/replica-redb.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ weight: 42
---

You can configure a replica of a database by creating an item in
the `replicaSources` section of the [Redis Enterprise database specification](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/redis_enterprise_database_api.md#redisenterprisedatabasespec). The value of
`replicaSourceType` must be 'SECRET'; `replicaSourceName`
must be the name of a secret that contains the replica source url.
the [`replicaSources`](/operate/kubernetes/reference/redis_enterprise_database_api#specreplicasources) section of the RedisEnterpriseDatabase (REDB) custom resource.

A secret must be created using a `stringData` section containing the replica source URI as follows:
A secret must be created with the `stringData` section containing the replica source URI as follows:

Create a secret with the replica source URI listed in the `stringData` field as follows:

```yaml
apiVersion: v1
kind: Secret
metadata:
name: my-replica-source
stringData:
uri: replica-source-uri-goes-here
uri: <replica-source-uri-goes-here>
```

The replica source URL can be retrieved by going to "UI > database > configuration > Press the button Get Replica of source URL"
Expand Down Expand Up @@ -80,7 +80,7 @@ You will need `kubectl`, `curl`, and `jq` installed for this procedure.
```js
JQ='.[] | select(.name=="'
JQ+="${SOURCE_DB}"
JQ+='") | ("redis://admin:" + .authentication_admin_pass + "@"+.endpoints[0].dns_name+":"+(.endpoints[0].port|tostring))'
JQ+='") | ("redis://admin:" + .authentication_admin_pass + "@"+.name+":"+(.endpoints[0].port|tostring))'
URI=`curl -sf -k -u "$CLUSTER_USER:$CLUSTER_PASSWORD" "https://localhost:9443/v1/bdbs?fields=uid,name,endpoints,authentication_admin_pass" | jq "$JQ" | sed 's/"//g'`
```

Expand Down