Skip to content

Commit db68b95

Browse files
docs: add a sample for DP Konnect cert-manager (#2549)
Signed-off-by: Jintao Zhang <[email protected]>
1 parent 00922cd commit db68b95

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# This example shows how to use KonnectExtension + cert-manager to provision a Konnect Data Plane client
2+
# certificate and configure Konnect endpoints automatically (no manual KONG_CLUSTER_* envs).
3+
# Prerequisites:
4+
# - cert-manager installed in the cluster (https://cert-manager.io/docs/installation/)
5+
# - A KonnectGatewayControlPlane already created in the cluster (see other samples)
6+
# - Replace the <YOUR_KONNECT_CP_RESOURCE_NAME> placeholder below with your KonnectGatewayControlPlane name
7+
#
8+
# 1) Ensure there is an Issuer/ClusterIssuer available (example below is commented out
9+
# to keep this sample applyable without cert-manager CRDs pre-installed).
10+
# For production, replace with an issuer backed by a CA trusted by Konnect.
11+
#
12+
# apiVersion: cert-manager.io/v1
13+
# kind: ClusterIssuer
14+
# metadata:
15+
# name: konnect-dp-selfsigned
16+
# spec:
17+
# selfSigned: {}
18+
#
19+
# 2) Create a KonnectExtension that references your Konnect control plane. The operator will populate
20+
# the Konnect endpoints and inject required envs into the DataPlane.
21+
---
22+
apiVersion: konnect.konghq.com/v1alpha2
23+
kind: KonnectExtension
24+
metadata:
25+
name: my-konnect-config
26+
spec:
27+
konnect:
28+
controlPlane:
29+
ref:
30+
# Defaults to type: konnectNamespacedRef
31+
konnectNamespacedRef:
32+
name: <YOUR_KONNECT_CP_RESOURCE_NAME>
33+
# Optional: apply labels to this DataPlane in Konnect (replaces KONG_CLUSTER_DP_LABELS)
34+
dataPlane:
35+
labels:
36+
type: "k8s"
37+
---
38+
# 3) Create a DataPlane that references the cert-manager issuer and the KonnectExtension. The operator will:
39+
# - create a cert-manager Certificate owned by this DataPlane
40+
# - mount the issued Secret into the proxy container
41+
# - set KONG_CLUSTER_CERT and KONG_CLUSTER_CERT_KEY automatically
42+
# - set Konnect-related envs (role, endpoints, konnect mode, telemetry, etc.) from KonnectExtension
43+
apiVersion: gateway-operator.konghq.com/v1beta1
44+
kind: DataPlane
45+
metadata:
46+
name: konnect-cert-manager-example
47+
spec:
48+
extensions:
49+
- kind: KonnectExtension
50+
name: my-konnect-config
51+
group: konnect.konghq.com
52+
network:
53+
konnectCertificate:
54+
issuer:
55+
# Namespace omitted -> use ClusterIssuer with this name
56+
name: konnect-dp-selfsigned
57+
deployment:
58+
replicas: 3
59+
podTemplateSpec:
60+
spec:
61+
containers:
62+
- name: proxy
63+
# renovate: datasource=docker versioning=docker
64+
image: kong:3.9
65+
readinessProbe:
66+
initialDelaySeconds: 1
67+
periodSeconds: 1

0 commit comments

Comments
 (0)