This document helps to migrate from the gateway-operator.konghq.com to the konnect.konghq.com KonnectExtension.
-
Label the certificate
Secret:kubectl label secret -n kong konnect-client-tls konghq.com/konnect-dp-cert=trueCopied! -
Install new kubernetes-configuration CRDs:
kustomize build https://github.com/kong/kubernetes-configuration/crd/gateway-operator | kubectl apply --server-side -f -Copied!To verify version compatibility with kubernetes-configuration CRDs, please consult the version compatibility table.
Note: In case CRDs were installed via
helmyou might need to force conflicts:kustomize build https://github.com/kong/kubernetes-configuration/crd/gateway-operator | kubectl apply --server-side --force-conflicts -f -Copied! -
Upgrade to new controller version (e.g. set the
image.taginvalues.yamltov1.5.0) -
Create:
-
KonnectAPIAuthConfigurationwith your Konnect API token (create one here), for example:echo ' kind: KonnectAPIAuthConfiguration apiVersion: konnect.konghq.com/v1alpha1 metadata: name: konnect-api-auth namespace: kong spec: type: token token: kpat_XXXXXXXXX serverURL: us.api.konghq.com' | kubectl apply -f -Copied! -
New
KonnectExtensionusing thekonnect.konghq.comAPI group and reference the Konnect CP by KonnectID.For example, the following
KonnectExtensionfrom 1.4 (using thegateway-operator.konghq.comAPI group):kind: KonnectExtension apiVersion: gateway-operator.konghq.com/v1alpha1 metadata: name: example-konnect-config namespace: kong spec: controlPlaneRef: type: konnectID konnectID: <CP_ID> controlPlaneRegion: <REGION> # This will be inferred in 1.5+ using the Konnect API serverHostname: <HOSTNAME> # This will be inferred in 1.5+ using the Konnect API konnectControlPlaneAPIAuthConfiguration: clusterCertificateSecretRef: name: konnect-client-tlsCopied!Would translate into following
KonnectExtensionin 1.5 (using thekonnect.konghq.comAPI group):kind: KonnectExtension apiVersion: konnect.konghq.com/v1alpha1 metadata: name: example-konnect-config namespace: kong spec: konnect: controlPlane: ref: type: konnectID konnectID: a6554c4c-79a6-4db7-b7a4-201c0cf746ba # The Konnect controlPlane ID configuration: authRef: name: konnect-api-auth # Reference to the KonnectAPIAuthConfiguration object clientAuth: certificateSecret: provisioning: Manual secretRef: name: konnect-client-tlsCopied!
-
-
Ensure that your
DataPlane,ControlPlaneandGatewayConfigurationobjects use the new extension: by verifying theextensionsfield in the spec:spec: extensions: - kind: KonnectExtension name: my-konnect-config group: konnect.konghq.com # Ensure that group matches this value.Copied! -
Remove the finalizer from the old extension:
kubectl patch konnectextensions.gateway-operator.konghq.com example-konnect-config -n kong -p '{"metadata":{"finalizers":null}}' --type=mergeCopied! -
Delete the old
gateway-operator.konghq.comKonnectExtension.