First, let’s create a GatewayConfiguration resource to specify our Hybrid Gateway parameters. Set spec.konnect.authRef.name to the name of the KonnectAPIAuthConfiguration resource we created in the prerequisites and specify your data plane configuration.
New control plane
To create a new control plane managed with Kubernetes, use the following command:
echo '
kind: GatewayConfiguration
apiVersion: gateway-operator.konghq.com/v2beta1
metadata:
name: kong-configuration
namespace: kong
spec:
konnect:
authRef:
name: konnect-api-auth
dataPlaneOptions:
deployment:
podTemplateSpec:
spec:
containers:
- name: proxy
image: kong/kong-gateway:3.14' | kubectl apply -f -
Existing Konnect control plane
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: GatewayConfiguration
apiVersion: gateway-operator.konghq.com/v2beta1
metadata:
name: kong-configuration
namespace: kong
spec:
konnect:
authRef:
name: konnect-api-auth
source: Mirror
mirror:
konnect:
id: "'$KONNECT_CONTROL_PLANE_ID'"
dataPlaneOptions:
deployment:
podTemplateSpec:
spec:
containers:
- name: proxy
image: kong/kong-gateway:3.14' | kubectl apply -f -