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
title: Control Plane Authentication using custom certs
2
+
title: Control Plane Authentication Using Custom Certificates
3
3
weight: -70
4
4
---
5
5
6
-
Envoy Gateway establishes a secure TLS connection for control plane communication between Envoy Gateway pods and the Envoy Proxy fleet. The TLS Certificates used here are self signed and generated using a job that runs before envoy gateway is created, and these certs and mounted on to the envoy gateway and envoy proxy pods.
6
+
Envoy Gateway establishes secure TLS connections for control plane communication between the Envoy Gateway deployment and the Envoy Proxy fleet. By default, the Helm chart generates the required certificates before Envoy Gateway starts.
7
7
8
-
This task will walk you through configuring custom certs for control plane auth.
8
+
This guide shows how to create and manage these certificates with cert-manager before installing Envoy Gateway.
9
9
10
10
## Before you begin
11
11
12
-
We use Cert-Manager to manage the certificates. You can install it by following the [official guide](https://cert-manager.io/docs/installation/kubernetes/).
12
+
Install [cert-manager](https://cert-manager.io/docs/installation/kubectl/) and [Helm](https://helm.sh/docs/intro/install/) before continuing.
13
13
14
-
## Configure custom certs for control plane
14
+
The examples below use the default Kubernetes cluster domain, `cluster.local`. If your cluster uses a different domain, update both the `kubernetesClusterDomain` Helm value and the controller certificate DNS names.
15
15
16
-
1. First you need to set up the CA issuer, in this task, we use the `selfsigned-issuer` as an example.
16
+
## Configure custom certificates for the control plane
17
17
18
-
*You should not use the self-signed issuer in production, you should use a real CA issuer.*
18
+
1. Create the namespace where Envoy Gateway and the certificate resources will be installed.
19
+
20
+
```shell
21
+
kubectl create namespace envoy-gateway-system
22
+
```
23
+
24
+
2. Set up the CA issuer. This example uses a self-signed issuer to create the root CA.
25
+
26
+
**Warning:** Do not use the self-signed issuer in production. Use an issuer backed by a trusted certificate authority.
19
27
20
28
```shell
21
29
cat <<EOF | kubectl apply -f -
@@ -59,10 +67,24 @@ We use Cert-Manager to manage the certificates. You can install it by following
59
67
EOF
60
68
```
61
69
62
-
2. Create a cert forenvoy gateway controller, the cert will be storedin secret `envoy-gatewy`.
70
+
3. Wait for the CA certificate and CA issuer to become ready.
71
+
72
+
```shell
73
+
kubectl wait --for=condition=Ready \
74
+
certificate/envoy-gateway-ca \
75
+
--namespace envoy-gateway-system \
76
+
--timeout=5m
77
+
78
+
kubectl wait --for=condition=Ready \
79
+
issuer/eg-issuer \
80
+
--namespace envoy-gateway-system \
81
+
--timeout=5m
82
+
```
83
+
84
+
4. Create the certificate forthe Envoy Gateway controller. cert-manager stores itin the `envoy-gateway` Secret.
63
85
64
86
```shell
65
-
cat<<EOF | kubectl apply -f -
87
+
cat<<EOF | kubectl apply -f -
66
88
apiVersion: cert-manager.io/v1
67
89
kind: Certificate
68
90
metadata:
@@ -89,10 +111,10 @@ We use Cert-Manager to manage the certificates. You can install it by following
89
111
EOF
90
112
```
91
113
92
-
3. Create a certforenvoy proxy, the cert will be storedinsecret`envoy`.
114
+
5. Create the certificateforEnvoy Proxy. cert-manager stores itinthe`envoy` Secret.
93
115
94
116
```shell
95
-
cat<<EOF | kubectl apply -f -
117
+
cat<<EOF | kubectl apply -f -
96
118
apiVersion: cert-manager.io/v1
97
119
kind: Certificate
98
120
metadata:
@@ -116,10 +138,10 @@ We use Cert-Manager to manage the certificates. You can install it by following
116
138
EOF
117
139
```
118
140
119
-
4. Create a certforrate limit, the cert will be storedinsecret`envoy-rate-limit`.
141
+
6. Create the certificateforthe rate-limit service. cert-manager stores itinthe`envoy-rate-limit` Secret.
120
142
121
143
```shell
122
-
cat<<EOF | kubectl apply -f -
144
+
cat<<EOF | kubectl apply -f -
123
145
apiVersion: cert-manager.io/v1
124
146
kind: Certificate
125
147
metadata:
@@ -143,4 +165,72 @@ We use Cert-Manager to manage the certificates. You can install it by following
143
165
EOF
144
166
```
145
167
146
-
5. Now you can follow the helm chart [installation guide](../install-helm) to install envoy gateway with custom certs.
168
+
7. Wait for the certificates to become ready.
169
+
170
+
```shell
171
+
kubectl wait --for=condition=Ready \
172
+
certificate/envoy-gateway \
173
+
certificate/envoy \
174
+
certificate/envoy-rate-limit \
175
+
--namespace envoy-gateway-system \
176
+
--timeout=5m
177
+
```
178
+
179
+
Verify the certificate resources and the expected TLS Secrets.
8. Create a Helm values file that specifies the Kubernetes cluster domain used in the controller certificate DNS names.
194
+
195
+
```shell
196
+
cat > custom-cert-values.yaml <<'EOF'
197
+
# Keep this value aligned with the cluster domain used in the
198
+
# envoy-gateway Certificate DNS names.
199
+
kubernetesClusterDomain: cluster.local
200
+
EOF
201
+
```
202
+
203
+
The certificate Secret names are fixed, so no certificate-specific Helm override is required. The chart uses the pre-created Secrets named `envoy-gateway`, `envoy`, and `envoy-rate-limit`.
204
+
205
+
Keep the certgen job enabled. It leaves existing certificate Secrets unchanged and creates any additional Secrets required by Envoy Gateway.
206
+
207
+
9. Install Envoy Gateway using the custom values file.
0 commit comments