The DataPlane
, in order to be configured in Konnect, needs a client certificate. This certificate can be manually created and managed by the user, or automatically provisioned by Kong Gateway Operator.
In order to manually create and set up a certificate to be used for Konnect DataPlane
s, you can perform type the following commands:
-
Generate a new certificate and key:
openssl req -new -x509 -nodes -newkey rsa:2048 -subj "/CN=kongdp/C=US" -keyout ./tls.key -out ./tls.crt
-
Create a Kubernetes secret that contains the previously created certificate:
kubectl create secret tls konnect-client-tls --cert=./tls.crt --key=./tls.key
-
Label the secret to tell Kong Gateway Operator to reconcile it:
kubectl label secret konnect-client-tls konghq.com/konnect-dp-cert=true
Once the secret containing your certificate has been created in the cluster, you can set up your KonnectExtension
as follows:
spec:
clientAuth:
certificateSecret:
provisioning: Manual
secretRef:
name: konnect-client-tls # The name of the secret containing your certificate
Alternatively, you can leave the certificate provisioning and management to Kong Gateway Operator, which will take care of creating a new certificate, write it into a Kubernetes Secret
and manage the Secret
’s lifecycle on behalf of you. To do so, you can configure a KonnectExtension
as follows:
spec:
clientAuth:
certificateSecret:
provisioning: Automatic
or you can just leave the spec.clientAuth
field empty, and the automatic provisioning will be used as the default value.