Deploy a Data Plane
To attach a Kong Gateway Operator data plane to Konnect the data plane needs to know which endpoint to connect to, and how to authenticate the requests.
To get the endpoint and the authentication details of the data plane:
- Log in to Konnect.
- Navigate to Gateway Manager, choose the control plane, and click New DataPlane Node.
- In the Create a Data Plane Node page select Kubernetes as the Platform.
- Click Generate Certificate in step 3.
- Save the contents of Cluster Certificate in a file named
tls.crt
. Save the contents of Cluster Key in a file namedtls.key
. -
Create a namespace named
kong
in the Kubernetes cluster:kubectl create namespace kong
-
Create a Kubernetes secret containing the cluster certificate:
kubectl create secret tls konnect-client-tls -n kong --cert=./tls.crt --key=./tls.key
- Extract the following values from the Configuration parameters step 4:
-
CP_ID
: Find the value ofcluster_server_name
. The first segment of that value is the control plane ID for your cluster. For example, if the value ofcluster_server_name
is36fc5d01be.us.cp0.konghq.com
, then the control plane ID of the cluster is36fc5d01be
-
REGION
: Find the value in the bottom left corner of the screen. -
HOSTNAME
: The server you are connected to (e.g.konghq.tech
,konghq.com
).
-
-
Now, create a
KonnectExtension
resource. In the following manifest, replace the placeholders forCP_ID
,REGION
, andHOSTNAME
with the values you just noted, and deploy it withkubectl apply
:echo ' kind: KonnectExtension apiVersion: gateway-operator.konghq.com/v1alpha1 metadata: name: example-konnect-config namespace: kong spec: controlPlaneRef: type: konnectID konnectID: <CP_ID> controlPlaneRegion: <REGION> serverHostname: <HOSTNAME> konnectControlPlaneAPIAuthConfiguration: clusterCertificateSecretRef: name: konnect-client-tls ' | kubectl apply -f -
The result should look like this:
konnectextension.gateway-operator.konghq.com/example-konnect-config created
-
Deploy your data plane that references such a
KonnectExtension
withkubectl apply
:echo ' apiVersion: gateway-operator.konghq.com/v1beta1 kind: DataPlane metadata: name: dataplane-example namespace: kong spec: extensions: - kind: KonnectExtension name: example-konnect-config group: gateway-operator.konghq.com deployment: podTemplateSpec: spec: containers: - name: proxy image: kong/kong-gateway:3.8.1.0 env: - name: KONG_LOG_LEVEL value: debug ' | kubectl apply -f -
The result should look like this:
dataplane.gateway-operator.konghq.com/dataplane-example created