Skip to content

Commit 8a6c47c

Browse files
committed
Add Gateway API operator installation docs
Signed-off-by: kahirokunn <okinakahiro@gmail.com>
1 parent 06110c8 commit 8a6c47c

3 files changed

Lines changed: 146 additions & 1 deletion

File tree

docs/versioned/.nav.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ nav:
252252
- Configuring Knative Eventing CRDs: install/operator/configuring-eventing-cr.md
253253
- Installing plugins:
254254
- Install Istio for Knative: install/installing-istio.md
255-
# TODO: docs for kourier, contour, gateway-api
256255
- Install Kafka for Knative: install/eventing/kafka-install.md
257256
- Install RabbitMQ for Knative: install/eventing/rabbitmq-install.md
258257
# N.B. this duplicates an "eventing" topic above, cross-referenced here.

docs/versioned/install/operator/configuring-serving-cr.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,75 @@ spec:
552552
service: custom-local-gateway.istio-system.svc.cluster.local
553553
```
554554

555+
## Configure the Gateway API ingress
556+
557+
!!! warning
558+
Gateway API support in Knative is currently in **Beta**. The API and configuration may change in future releases.
559+
The Knative team currently tests with Istio, Contour, and Envoy Gateway implementations. For more details, see the
560+
[net-gateway-api repository](https://github.com/knative-extensions/net-gateway-api).
561+
562+
To use Gateway API as the networking layer, you need to configure the `spec.ingress.gateway-api` and `spec.config.network` fields in the KnativeServing CR.
563+
564+
### Enable Gateway API
565+
566+
To enable Gateway API as the ingress, apply the following KnativeServing CR:
567+
568+
```yaml
569+
apiVersion: operator.knative.dev/v1beta1
570+
kind: KnativeServing
571+
metadata:
572+
name: knative-serving
573+
namespace: knative-serving
574+
spec:
575+
ingress:
576+
gateway-api:
577+
enabled: true
578+
config:
579+
network:
580+
ingress-class: "gateway-api.ingress.networking.knative.dev"
581+
```
582+
583+
### Configure Gateway API gateways
584+
585+
You can configure external and local gateways for Gateway API by using the `spec.config.gateway` field. For example:
586+
587+
```yaml
588+
apiVersion: operator.knative.dev/v1beta1
589+
kind: KnativeServing
590+
metadata:
591+
name: knative-serving
592+
namespace: knative-serving
593+
spec:
594+
ingress:
595+
gateway-api:
596+
enabled: true
597+
config:
598+
network:
599+
ingress-class: "gateway-api.ingress.networking.knative.dev"
600+
gateway:
601+
external-gateways: |
602+
- class: istio
603+
gateway: istio-system/knative-gateway
604+
service: istio-system/istio-ingressgateway
605+
local-gateways: |
606+
- class: istio
607+
gateway: istio-system/knative-local-gateway
608+
service: istio-system/knative-local-gateway
609+
```
610+
611+
The key in `spec.config.gateway` is in the format of:
612+
613+
```
614+
external-gateways: |
615+
- class: <gateway-class>
616+
gateway: <namespace>/<gateway-name>
617+
service: <namespace>/<service-name>
618+
local-gateways: |
619+
- class: <gateway-class>
620+
gateway: <namespace>/<gateway-name>
621+
service: <namespace>/<service-name>
622+
```
623+
555624
## Customize kourier-bootstrap for Kourier gateways:
556625

557626
By default, Kourier contains envoy bootstrap configuration in the ConfigMap `kourier-bootstrap`. The `spec.ingress.kourier.bootstrap-configmap` field allows you to specify your customized bootstrap ConfigMap.

docs/versioned/install/operator/knative-with-operators.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,83 @@ Knative Serving with different ingresses:
263263
264264
Save this for configuring DNS later.
265265
266+
=== "Gateway API"
267+
268+
!!! warning
269+
Gateway API support in Knative is currently in **Beta**. The API and configuration may change in future releases.
270+
The Knative team currently tests with Istio, Contour, and Envoy Gateway implementations. For more details, see the
271+
[net-gateway-api repository](https://github.com/knative-extensions/net-gateway-api).
272+
273+
The following steps configure Knative Serving to use Gateway API as the networking layer:
274+
275+
1. You must have a Gateway API implementation installed in your cluster (for example, Istio, Contour,
276+
or Envoy Gateway). Refer to your chosen implementation's documentation for installation instructions.
277+
278+
1. Install the Gateway API CRDs if they are not already installed on your cluster:
279+
280+
```bash
281+
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/latest/download/standard-install.yaml
282+
```
283+
284+
1. Ensure that a `Gateway` resource exists in your cluster for Knative to use. If your Gateway API
285+
implementation does not create one automatically, create it according to your implementation's documentation.
286+
For more information on configuring gateway references, see
287+
[Configure the Gateway API ingress](configuring-serving-cr.md#configure-the-gateway-api-ingress).
288+
289+
1. To configure Knative Serving to use Gateway API, add `spec.ingress.gateway-api`
290+
and `spec.config.network` to your Serving CR YAML file as follows:
291+
292+
```yaml
293+
apiVersion: operator.knative.dev/v1beta1
294+
kind: KnativeServing
295+
metadata:
296+
name: knative-serving
297+
namespace: knative-serving
298+
spec:
299+
# ...
300+
ingress:
301+
gateway-api:
302+
enabled: true
303+
config:
304+
network:
305+
ingress-class: "gateway-api.ingress.networking.knative.dev"
306+
```
307+
308+
!!! note
309+
By default, the net-gateway-api controller uses Istio's Gateway resources
310+
(`istio-system/knative-gateway` for external traffic and `istio-system/knative-local-gateway`
311+
for cluster-local traffic). If you are using Istio as your Gateway API implementation,
312+
no additional gateway configuration is needed.
313+
314+
If you are using a different Gateway API implementation such as Contour or Envoy Gateway,
315+
you must configure `spec.config.gateway` in the KnativeServing CR to specify the correct
316+
gateway references. For details, see
317+
[Configure the Gateway API ingress](configuring-serving-cr.md#configure-the-gateway-api-ingress).
318+
319+
1. Apply the YAML file for your Serving CR by running the command:
320+
321+
```bash
322+
kubectl apply -f <filename>.yaml
323+
```
324+
325+
Where `<filename>` is the name of your Serving CR file.
326+
327+
1. Verify that the Knative Gateway API components are deployed:
328+
329+
```bash
330+
kubectl get deployment -n knative-serving
331+
```
332+
333+
You should see the `net-gateway-api-controller` deployment in the list of deployments.
334+
335+
1. Fetch the External IP or CNAME by checking your Gateway status:
336+
337+
```bash
338+
kubectl get gateway --all-namespaces
339+
```
340+
341+
The `ADDRESS` column shows the external IP or hostname. Save this for configuring DNS later.
342+
266343
### Verify the Knative Serving deployment
267344

268345
1. Monitor the Knative deployments:

0 commit comments

Comments
 (0)