Skip to content

Commit 4d2aba5

Browse files
copy edit
1 parent ec6e8de commit 4d2aba5

File tree

1 file changed

+22
-42
lines changed

1 file changed

+22
-42
lines changed

content/operate/kubernetes/security/configuration-secrets.md

Lines changed: 22 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -9,88 +9,68 @@ title: Store configuration in Kubernetes Secrets
99
weight: 96
1010
---
1111

12-
When using Redis Enterprise for Kubernetes, you can store certain configuration items in Kubernetes Secrets. This approach has the advantage that updates to these Secrets, once configured, are read immediately by the operator and propagated to the Redis Enterprise Cluster (REC).
12+
You can store Redis Enterprise configuration items in Kubernetes Secrets for automatic updates and secure management. When you update these Secrets, the operator immediately reads the changes and propagates them to the Redis Enterprise Cluster (REC).
1313

1414
## License configuration
1515

16-
Redis Enterprise clusters require a valid license to operate. You can apply licenses using Kubernetes Secrets or by embedding them directly in the cluster specification. This section covers how to determine your cluster's FQDN for licensing purposes and demonstrates both methods for license configuration.
16+
Redis Enterprise clusters require a valid license. You can apply licenses using Kubernetes Secrets (recommended) or embed them directly in the cluster specification.
1717

1818
### Determine your cluster FQDN
1919

20-
For licensing purposes, you need to know your Redis Enterprise cluster's fully qualified domain name (FQDN). In Kubernetes, the REC's FQDN is the fully qualified name of the REC API service and follows this format:
20+
To configure licensing, you need your Redis Enterprise cluster's fully qualified domain name (FQDN). Use this format: `<REC-name>.<namespace>.svc.cluster.local`
2121

22-
```
23-
<REC name>.<namespace>.svc.cluster.local
24-
```
25-
26-
For example, if a REC is named `my-rec` and is deployed in the namespace `my-ns`, the FQDN will be `my-rec.my-ns.svc.cluster.local`.
27-
28-
### Method 1: Using a Kubernetes Secret (Recommended)
22+
For example: `my-rec.my-ns.svc.cluster.local`
2923

30-
You can set the license in the REC through the `licenseSecretName` YAML property.
24+
### Use a Kubernetes Secret (recommended)
3125

32-
1. Add your raw license to a text file (for example, `license.txt`).
33-
34-
2. Execute the following command to create the Secret (in this example called `rec-license`) with a key called `license`:
26+
1. Create a secret from your license file:
3527

3628
```sh
3729
kubectl -n <namespace> create secret generic rec-license --from-file=license=./license.txt
3830
```
3931

40-
3. Edit the REC definition and add the property `licenseSecretName: rec-license`. This will be immediately read by the Operator.
41-
42-
```sh
43-
kubectl edit rec <rec-name>
44-
```
45-
46-
Add the following to the spec:
32+
2. Add the secret reference to your REC specification:
4733

4834
```yaml
4935
spec:
5036
licenseSecretName: rec-license
5137
```
5238

53-
### Method 2: Direct license in REC specification
39+
### Embed license directly in REC specification
5440

55-
Alternatively, you can specify the license key string directly in the REC YAML:
41+
Alternatively, you can embed the license directly in the REC YAML:
5642

5743
```yaml
5844
spec:
5945
nodes: 3
6046
license: |
6147
----- LICENSE START -----
6248
eai14c/y6XNVykffDQSPUsHKcmpgOFUlmyTBDUEZEz+GLbXAgQFOmxcdbR9J
63-
...remaining license key content...
64-
----- LICENSE END -----
49+
...remaining license key content...
50+
----- LICENSE END -----
6551
```
6652

6753
{{<note>}}
68-
Pay attention to the indentation and spaces in the file and make sure the pipe symbol (`|`) is included after `license:`.
54+
You must include the pipe symbol (`|`) after `license:` and maintain proper indentation.
6955
{{</note>}}
7056

7157
## TLS certificate configuration
7258

73-
TLS certificates are essential for securing communication between clients and Redis Enterprise databases, as well as between internal cluster components. This section explains how to store client certificates for mutual TLS authentication and how to configure certificates for different Redis Enterprise services using Kubernetes Secrets.
59+
You can store TLS certificates in Kubernetes Secrets to secure communication between clients and Redis Enterprise databases.
7460

7561
### Client certificates for mTLS
7662

77-
Here's how to set a client certificate for mutual TLS (mTLS).
78-
79-
1. Create a Secret called `client-cert-secret` with a property named `cert` using the following command:
63+
1. Create a secret with your client certificate:
8064

8165
```sh
8266
kubectl -n <namespace> create secret generic client-cert-secret --from-file=cert=<path-to-cert>
8367
```
8468

85-
2. Add this secret to the relevant Redis Enterprise Database (REDB) using the `clientAuthenticationCertificates` property as documented in [Add client certificates]({{< relref "/operate/kubernetes/security/add-client-certificates" >}}).
86-
87-
{{<note>}}
88-
At the time of writing (November 14, 2023), the public documentation describes creating the secret directly in YAML. This approach has the disadvantage that it requires the user to ensure the certificate is correctly encoded to base64. This can be done using a command like `cat my-cert.pem | openssl base64`. Then paste the output into the YAML source file.
89-
{{</note>}}
69+
2. Add the secret to your REDB using the `clientAuthenticationCertificates` property. See [Add client certificates]({{< relref "/operate/kubernetes/security/add-client-certificates" >}}) for details.
9070

91-
### Certificates for different services
71+
### Service certificates
9272

93-
The notes above were valid for a client certificate. If you want to create a secret for proxy, API, or other services, they expect different keys:
73+
To configure certificates for proxy, API, or other services, create secrets with certificate and key files:
9474

9575
```sh
9676
kubectl create secret generic <secret-name> \
@@ -101,11 +81,11 @@ kubectl create secret generic <secret-name> \
10181

10282
## Best practices
10383

104-
- Store sensitive configuration items like licenses and certificates in Secrets rather than directly in YAML files
105-
- Use the `--from-file` option when creating secrets to avoid manual base64 encoding
106-
- Ensure secrets are created in the same namespace as your REC or REDB resources
107-
- Use descriptive names for your secrets to make them easy to identify and manage
108-
- Regularly rotate certificates and update the corresponding secrets
84+
- Store sensitive configuration in Secrets rather than directly in YAML files
85+
- Use `--from-file` to avoid manual base64 encoding
86+
- Create secrets in the same namespace as your REC or REDB resources
87+
- Use descriptive secret names for easy identification
88+
- Regularly rotate certificates and update secrets
10989

11090
## See also
11191

0 commit comments

Comments
 (0)