Skip to content

Commit f4db8fa

Browse files
K8s: Zeppelin maint 1 - INE cert changes (#2424)
* INE cert changes * 8.0.2-6 RNs * fix InterNode to Internode * remove incorrect prereq
1 parent 6edf92f commit f4db8fa

File tree

11 files changed

+452
-9
lines changed

11 files changed

+452
-9
lines changed

content/operate/kubernetes/7.22/reference/api/redis_enterprise_cluster_api.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,20 @@ RS Cluster Certificates. Used to modify the certificates used by the cluster. Se
756756
Secret name to use for cluster's CM (Cluster Manager) certificate. If left blank, a cluster-provided certificate will be used.<br/>
757757
</td>
758758
<td>false</td>
759+
</tr><tr>
760+
<td>cpInternodeEncryptionCertificateSecretName</td>
761+
<td>string</td>
762+
<td>
763+
Secret name to use for control plane internode encryption certificate. If left blank, a cluster-provided certificate will be used.<br/>
764+
</td>
765+
<td>false</td>
766+
</tr><tr>
767+
<td>dpInternodeEncryptionCertificateSecretName</td>
768+
<td>string</td>
769+
<td>
770+
Secret name to use for data plane internode encryption certificate. If left blank, a cluster-provided certificate will be used.<br/>
771+
</td>
772+
<td>false</td>
759773
</tr><tr>
760774
<td>ldapClientCertificateSecretName</td>
761775
<td>string</td>

content/operate/kubernetes/7.22/security/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Configure TLS certificates and encryption for secure communications:
2727

2828
- [Manage REC certificates]({{< relref "/operate/kubernetes/7.22/security/manage-rec-certificates" >}}) - Configure cluster certificates for TLS encryption
2929
- [Add client certificates]({{< relref "/operate/kubernetes/7.22/security/add-client-certificates" >}}) - Set up client certificate authentication for databases
30-
- [Internode encryption]({{< relref "/operate/kubernetes/7.22/security/internode-encryption" >}}) - Enable encryption between cluster nodes
30+
- [Internode encryption]({{< relref "/operate/kubernetes/7.22/security/internode-encryption" >}}) - Enable encryption between cluster nodes and configure custom certificates
3131

3232
## Resource management
3333

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,26 @@ kubectl create secret generic <secret-name> \
8080
--from-literal=name=<proxy | api | cm | syncer | metrics_exporter>
8181
```
8282

83+
### Internode encryption certificates
84+
85+
You can provide custom certificates for control plane and data plane internode encryption. Create separate secrets for each encryption type:
86+
87+
```sh
88+
kubectl create secret generic cp-internode-cert \
89+
--from-file=certificate=</path/to/cp-certificate.pem> \
90+
--from-file=key=</path/to/cp-key.pem> \
91+
--from-literal=name=cp_internode_encryption
92+
```
93+
94+
```sh
95+
kubectl create secret generic dp-internode-cert \
96+
--from-file=certificate=</path/to/dp-certificate.pem> \
97+
--from-file=key=</path/to/dp-key.pem> \
98+
--from-literal=name=dp_internode_encryption
99+
```
100+
101+
Reference these secrets in your REC specification under `spec.certificates`. See [Internode encryption]({{< relref "/operate/kubernetes/7.22/security/internode-encryption" >}}) for complete configuration details.
102+
83103
## Best practices
84104

85105
- Store sensitive configuration in Secrets rather than directly in YAML files.

content/operate/kubernetes/7.22/security/internode-encryption.md

Lines changed: 107 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ categories:
44
- docs
55
- operate
66
- kubernetes
7-
description: Enable encryption for communication between REC nodes in your K8s cluster.
7+
description: Enable encryption for communication between REC nodes and configure custom certificates.
88
linkTitle: Internode encryption
99
weight: 99
1010
url: '/operate/kubernetes/7.22/security/internode-encryption/'
1111
---
1212

1313
Internode encryption provides added security by encrypting communication between nodes in your Redis Enterprise cluster (REC).
1414

15+
## Enable internode encryption
16+
1517
Enable internode encryption in the `spec` section of your REC custom resource file.
1618

1719
```yaml
@@ -24,8 +26,111 @@ This change will apply to all databases created in the REC. You can override the
2426
Edit your Redis Enterprise database (REDB) custom resource file to disable internode encryption for only that database.
2527
2628
```yaml
27-
spec:
29+
spec:
2830
dataInternodeEncryption: false
2931
```
3032
3133
To learn more about internode encryption, see [Internode encryption for Redis Enterprise Software]({{< relref "/operate/rs/security/encryption/internode-encryption.md" >}}).
34+
35+
## Use custom certificates for internode encryption
36+
37+
By default, Redis Enterprise uses self-signed certificates for internode encryption. You can provide your own certificates for both control plane and data plane internode encryption by storing them in Kubernetes secrets and referencing them in your REC specification.
38+
39+
### Prerequisites
40+
41+
- Certificates must be in PEM format
42+
- You must create the Kubernetes secrets before referencing them in the REC spec
43+
- Certificates should include the full certificate chain if using a certificate authority
44+
45+
### Create secrets for internode encryption certificates
46+
47+
Create Kubernetes secrets to store your internode encryption certificates. You need separate secrets for control plane and data plane encryption.
48+
49+
1. Create a secret for control plane internode encryption:
50+
51+
```sh
52+
kubectl create secret generic cp-internode-cert \
53+
--from-file=certificate=</path/to/cp-certificate.pem> \
54+
--from-file=key=</path/to/cp-key.pem> \
55+
--from-literal=name=cp_internode_encryption
56+
```
57+
58+
2. Create a secret for data plane internode encryption:
59+
60+
```sh
61+
kubectl create secret generic dp-internode-cert \
62+
--from-file=certificate=</path/to/dp-certificate.pem> \
63+
--from-file=key=</path/to/dp-key.pem> \
64+
--from-literal=name=dp_internode_encryption
65+
```
66+
67+
### Configure certificates in REC spec
68+
69+
Add the certificate secret names to the `certificates` section of your REC specification:
70+
71+
```yaml
72+
spec:
73+
dataInternodeEncryption: true
74+
certificates:
75+
cpInternodeEncryptionCertificateSecretName: cp-internode-cert
76+
dpInternodeEncryptionCertificateSecretName: dp-internode-cert
77+
```
78+
79+
You can configure one or both certificate types. If you don't specify a certificate secret name, the cluster uses a self-signed certificate for that encryption type.
80+
81+
Apply the updated REC specification:
82+
83+
```sh
84+
kubectl apply -f <rec-file>.yaml
85+
```
86+
87+
### Certificate rotation
88+
89+
You can rotate internode encryption certificates using either of these methods:
90+
91+
#### Method 1: Update the existing secret
92+
93+
Edit the certificate data in the existing Kubernetes secret. The operator automatically detects the change and applies the new certificate.
94+
95+
```sh
96+
kubectl create secret generic cp-internode-cert \
97+
--from-file=certificate=</path/to/new-cp-certificate.pem> \
98+
--from-file=key=</path/to/new-cp-key.pem> \
99+
--from-literal=name=cp_internode_encryption \
100+
--dry-run=client -o yaml | kubectl apply -f -
101+
```
102+
103+
#### Method 2: Create a new secret and update the REC spec
104+
105+
1. Create a new secret with the updated certificate:
106+
107+
```sh
108+
kubectl create secret generic cp-internode-cert-new \
109+
--from-file=certificate=</path/to/new-cp-certificate.pem> \
110+
--from-file=key=</path/to/new-cp-key.pem> \
111+
--from-literal=name=cp_internode_encryption
112+
```
113+
114+
2. Update the REC specification to reference the new secret:
115+
116+
```yaml
117+
spec:
118+
certificates:
119+
cpInternodeEncryptionCertificateSecretName: cp-internode-cert-new
120+
```
121+
122+
3. Apply the updated REC specification:
123+
124+
```sh
125+
kubectl apply -f <rec-file>.yaml
126+
```
127+
128+
### Certificate lifecycle
129+
130+
When you remove a certificate secret reference from the REC specification, the operator does not delete the certificate from the Redis Enterprise cluster. The cluster continues to use the previously configured certificate until you explicitly replace it or the cluster reverts to using a self-signed certificate.
131+
132+
## More info
133+
134+
- [Manage REC certificates]({{< relref "/operate/kubernetes/7.22/security/manage-rec-certificates" >}}) - General certificate management for Redis Enterprise clusters
135+
- [Configuration secrets]({{< relref "/operate/kubernetes/7.22/security/configuration-secrets" >}}) - Best practices for storing configuration in Kubernetes secrets
136+
- [Internode encryption for Redis Enterprise Software]({{< relref "/operate/rs/security/encryption/internode-encryption.md" >}}) - Detailed information about how internode encryption works

content/operate/kubernetes/7.22/security/manage-rec-certificates.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ Create the [secret](https://kubernetes.io/docs/tasks/configmap-secret/managing-s
2424
kubectl create secret generic <secret-name> \
2525
--from-file=certificate=</PATH/TO/certificate.pem> \
2626
--from-file=key=</PATH/TO/key.pem> \
27-
--from-literal=name=<proxy | api | cm | syncer | metrics_exporter>
27+
--from-literal=name=<proxy | api | cm | syncer | metrics_exporter | cp_internode_encryption | dp_internode_encryption>
2828
```
2929

30+
{{<note>}}For internode encryption certificates, see [Internode encryption]({{< relref "/operate/kubernetes/7.22/security/internode-encryption" >}}) for detailed configuration instructions.{{</note>}}
31+
3032
## Update certificates in the REC custom resource
3133

3234
Edit the Redis Enterprise cluster (REC) custom resource to add a `certificates` subsection under the `spec` section. You are only required to add the fields for the certificates you are installing.
@@ -39,6 +41,8 @@ spec:
3941
syncerCertificateSecretName: <syncercert-secret-name>
4042
metricsExporterCertificateSecretName: <metricscert-secret-name>
4143
proxyCertificateSecretName: <proxycert-secret-name>
44+
cpInternodeEncryptionCertificateSecretName: <cpine-secret-name>
45+
dpInternodeEncryptionCertificateSecretName: <dpine-secret-name>
4246
```
4347
4448
### Update certificates through the API

content/operate/kubernetes/reference/api/redis_enterprise_cluster_api.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,9 +755,22 @@ RS Cluster Certificates. Used to modify the certificates used by the cluster. Se
755755
</td>
756756
<td>false</td>
757757
</tr><tr>
758-
<td>ldapClientCertificateSecretName</td>
758+
<td>cpInternodeEncryptionCertificateSecretName</td>
759+
<td>string</td>
760+
<td>
761+
Secret name to use for control plane internode encryption certificate. If left blank, a cluster-provided certificate will be used.<br/>
762+
</td>
763+
<td>false</td>
764+
</tr><tr>
765+
<td>dpInternodeEncryptionCertificateSecretName</td>
759766
<td>string</td>
760767
<td>
768+
Secret name to use for data plane internode encryption certificate. If left blank, a cluster-provided certificate will be used.<br/>
769+
</td>
770+
<td>false</td>
771+
</tr><tr>
772+
<td>ldapClientCertificateSecretName</td>
773+
<td>string</td>
761774
Secret name to use for cluster's LDAP client certificate. If left blank, LDAP client certificate authentication will be disabled.<br/>
762775
</td>
763776
<td>false</td>

0 commit comments

Comments
 (0)