Use the KonnectGatewayControlPlane resource to define the Konnect control plane that your CRDs will target. This enables your cluster to send configuration to Konnect.
Apply the following configuration to define a Control Plane named gateway-control-plane:
To create a new control plane managed with Kubernetes, use the following command:
echo '
kind: KonnectGatewayControlPlane
apiVersion: konnect.konghq.com/v1alpha2
metadata:
name: gateway-control-plane
namespace: kong
spec:
createControlPlaneRequest:
name: gateway-control-plane
konnect:
authRef:
name: konnect-api-auth
' | kubectl apply -f -
To use a control plane previously created in Konnect, export the control plane ID:
export KONNECT_CONTROL_PLANE_ID="YOUR KONNECT CONTROL PLANE ID"
Run the following command:
echo '
kind: KonnectGatewayControlPlane
apiVersion: konnect.konghq.com/v1alpha2
metadata:
name: gateway-control-plane
spec:
createControlPlaneRequest:
name: gateway-control-plane
konnect:
authRef:
name: konnect-api-auth
source: Mirror
mirror:
konnect:
id: "'$KONNECT_CONTROL_PLANE_ID'"
' | kubectl apply -f -
This resource links your cluster to a specific control plane instance in Konnect using the credentials provided in konnect-api-auth.
Make sure that the KonnectGatewayControlPlane resource is in the same namespace as the KonnectAPIAuthConfiguration resource.