You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -61,16 +61,16 @@ following command line to set the source database username to `myUserName`:
61
61
redis-di set-secret SOURCE_DB_USERNAME myUserName
62
62
```
63
63
64
-
### Set secrets for K8s/Helm deployment
65
-
66
-
Use the provided `scripts/rdi-secret.sh`shell script to set the specified secrets. The general pattern to use it is:
64
+
### Set secrets for K8s/Helm deployment using provided rdi-secret.sh script
65
+
66
+
To use the `rdi-secret.sh` script, begin by extracting the archive that contains the Helm chart. Once extracted, navigate to the resulting directory and verify that a `scripts` folder is present. Ensure that the `rdi-secret.sh` script is located inside the scripts folder before proceeding. The general pattern to use it is:
The script lets you retrieve a specific secret or list all the secrets that have been set:
72
72
```bash
73
-
#Set specific secret
73
+
#Get specific secret
74
74
scripts/rdi-secret.sh set<SECRET-KEY>
75
75
76
76
# List all secrets
@@ -123,14 +123,14 @@ scripts/rdi-secret.sh get SOURCE_DB_KEY_PASSWORD
123
123
The corresponding command lines for target secrets are:
124
124
125
125
```bash
126
-
# Without target TLS
126
+
# Without source TLS
127
127
scripts/rdi-secret.sh set TARGET_DB_USERNAME yourUsername
128
128
scripts/rdi-secret.sh set TARGET_DB_PASSWORD yourPassword
129
129
# Verify that the secrets are created/updated
130
130
scripts/rdi-secret.sh get TARGET_DB_USERNAME
131
131
scripts/rdi-secret.sh get TARGET_DB_PASSWORD
132
132
133
-
# With target TLS
133
+
# With source TLS
134
134
scripts/rdi-secret.sh set TARGET_DB_USERNAME yourUsername
135
135
scripts/rdi-secret.sh set TARGET_DB_PASSWORD yourPassword
136
136
scripts/rdi-secret.sh set TARGET_DB_CACERT /path/to/myca.crt
@@ -139,7 +139,7 @@ scripts/rdi-secret.sh get TARGET_DB_USERNAME
139
139
scripts/rdi-secret.sh get TARGET_DB_PASSWORD
140
140
scripts/rdi-secret.sh get TARGET_DB_CACERT
141
141
142
-
# With target mTLS
142
+
# With source mTLS
143
143
scripts/rdi-secret.sh set TARGET_DB_USERNAME yourUsername
144
144
scripts/rdi-secret.sh set TARGET_DB_PASSWORD yourPassword
145
145
scripts/rdi-secret.sh set TARGET_DB_CACERT /path/to/myca.crt
@@ -155,6 +155,117 @@ scripts/rdi-secret.sh get TARGET_DB_KEY
155
155
scripts/rdi-secret.sh get TARGET_DB_KEY_PASSWORD
156
156
```
157
157
158
+
### Set secrets for K8s/Helm deployment using Kubectl command
159
+
160
+
In some scenarios, you may prefer to use [`kubectl create secret generic`](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_secret_generic/)
161
+
to set secrets for a K8s/Helm deployment. The general pattern of the commands is:
162
+
163
+
```bash
164
+
kubectl create secret generic <DB> \
165
+
--namespace=rdi \
166
+
--from-literal=<SECRET-NAME>=<SECRET-VALUE>
167
+
```
168
+
169
+
Where `<DB>` is either `source-db` for source secrets or `target-db` for target secrets.
170
+
171
+
If you use TLS or mTLS for either the source or target databases, you also need to create the `source-db-ssl` and/or `target-db-ssl` K8s secrets that contain the certificates used to establish secure connections. The general pattern of the commands is:
172
+
173
+
```bash
174
+
kubectl create secret generic <DB>-ssl \
175
+
--namespace=rdi \
176
+
--from-file=<FILE-NAME>=<FILE-PATH>
177
+
```
178
+
179
+
When you create these secrets, ensure that all certificates and keys are in `PEM` format. The only exception to this is that for PostgreSQL, the private key in the `source-db-ssl` secret (the `client.key` file) must be in `DER` format. If you have a key in `PEM` format, you must convert it to `DER` before creating the `source-db-ssl` secret using the command:
This command assumes that the private key is not encrypted. See the [`openssl` documentation](https://docs.openssl.org/master/) to learn how to convert an encrypted private key.
186
+
187
+
The specific command lines for source secrets are as follows:
Note that the certificate paths contained in the secrets `SOURCE_DB_CACERT`, `SOURCE_DB_CERT`, and `SOURCE_DB_KEY` (for the source database) and `TARGET_DB_CACERT`, `TARGET_DB_CERT`, and `TARGET_DB_KEY` (for the target database) are internal to RDI, so you *must* use the values shown in the example above. You should only change the certificate paths when you create the `source-db-ssl` and `target-db-ssl` secrets.
268
+
158
269
## Deploy a pipeline
159
270
160
271
When you have created your configuration, including the [jobs]({{< relref "/integrate/redis-data-integration/data-pipelines/data-pipelines#job-files" >}}), they are
0 commit comments