|
| 1 | +--- |
| 2 | +title: Provision a Hybrid Gateway |
| 3 | +description: "Provision a Hybrid Gateway in {{site.konnect_short_name}} using the Gateway API CRDs." |
| 4 | +content_type: how_to |
| 5 | +permalink: /operator/konnect/crd/gateway/hybrid |
| 6 | +breadcrumbs: |
| 7 | + - /operator/ |
| 8 | + - index: operator |
| 9 | + group: Konnect |
| 10 | + - index: operator |
| 11 | + group: Konnect |
| 12 | + section: "Konnect CRDs: Hybrid Gateway" |
| 13 | + |
| 14 | + |
| 15 | +products: |
| 16 | + - operator |
| 17 | + |
| 18 | +works_on: |
| 19 | + - konnect |
| 20 | + |
| 21 | +entities: [] |
| 22 | +search_aliases: |
| 23 | + - kgo gateway |
| 24 | + - kgo hybrid gateway |
| 25 | + - konnect hybrid gateway |
| 26 | + |
| 27 | +tldr: |
| 28 | + q: How do I configure a Hybrid Gateway in {{site.konnect_short_name}}? |
| 29 | + a: Fill Konnect related fields in `GatewayConfiguration` for `GatewayClass` that will be used for Hybrid Gateways. |
| 30 | + |
| 31 | +prereqs: |
| 32 | + operator: |
| 33 | + konnect: |
| 34 | + auth: true |
| 35 | + |
| 36 | +--- |
| 37 | + |
| 38 | +## Create a `GatewayClass` for a Hybrid Gateway |
| 39 | + |
| 40 | +Use the `GatewayConfiguration` resource to configure a `GatewayClass` for Hybrid Gateways. `GatewayConfiguration` is for Hybrid Gateways when field `spec.konnect.authRef` is set. |
| 41 | + |
| 42 | +<!-- vale off --> |
| 43 | +{% konnect_crd %} |
| 44 | +kind: GatewayConfiguration |
| 45 | +apiVersion: gateway-operator.konghq.com/v2beta1 |
| 46 | +metadata: |
| 47 | + name: hybrid-configuration |
| 48 | + namespace: kong |
| 49 | +spec: |
| 50 | + konnect: |
| 51 | + authRef: |
| 52 | + name: konnect-api-auth |
| 53 | + dataPlaneOptions: |
| 54 | + deployment: |
| 55 | + podTemplateSpec: |
| 56 | + spec: |
| 57 | + containers: |
| 58 | + - name: proxy |
| 59 | + image: kong/kong-gateway:3.12 |
| 60 | +{% endkonnect_crd %} |
| 61 | +<!-- vale on --> |
| 62 | + |
| 63 | +Next configure respective `GatewayClass` to use the above `GatewayConfiguration`. |
| 64 | + |
| 65 | +<!-- vale off --> |
| 66 | +{% konnect_crd %} |
| 67 | +kind: GatewayClass |
| 68 | +apiVersion: gateway.networking.k8s.io/v1 |
| 69 | +metadata: |
| 70 | + name: hybrid-class |
| 71 | +spec: |
| 72 | + controllerName: konghq.com/gateway-operator |
| 73 | + parametersRef: |
| 74 | + group: gateway-operator.konghq.com |
| 75 | + kind: GatewayConfiguration |
| 76 | + name: hybrid-configuration |
| 77 | + namespace: kong |
| 78 | +{% endkonnect_crd %} |
| 79 | +<!-- vale on --> |
| 80 | + |
| 81 | +## Create a `Gateway` Resource |
| 82 | + |
| 83 | +Now create a `Gateway` resource that references the `GatewayClass` you just created. |
| 84 | + |
| 85 | +<!-- vale off --> |
| 86 | +{% konnect_crd %} |
| 87 | +kind: Gateway |
| 88 | +apiVersion: gateway.networking.k8s.io/v1 |
| 89 | +metadata: |
| 90 | + name: hybrid-gateway |
| 91 | + namespace: kong |
| 92 | +spec: |
| 93 | + gatewayClassName: hybrid-class |
| 94 | + listeners: |
| 95 | + - name: http |
| 96 | + protocol: HTTP |
| 97 | + port: 80 |
| 98 | +{% endkonnect_crd %} |
| 99 | +<!-- vale on --> |
| 100 | + |
| 101 | +## Validation |
| 102 | + |
| 103 | +{% validation kubernetes-resource %} |
| 104 | +kind: Gateway |
| 105 | +name: hybrid-gateway |
| 106 | +{% endvalidation %} |
| 107 | + |
| 108 | +The respective `DataPlane` and `KonnectGatewayControlPlane` are created automatically by the Gateway Operator. |
0 commit comments