diff --git a/docs/versioned/.nav.yml b/docs/versioned/.nav.yml index cb4590fcfb..bb744d4cef 100644 --- a/docs/versioned/.nav.yml +++ b/docs/versioned/.nav.yml @@ -252,7 +252,6 @@ nav: - Configuring Knative Eventing CRDs: install/operator/configuring-eventing-cr.md - Installing plugins: - Install Istio for Knative: install/installing-istio.md - # TODO: docs for kourier, contour, gateway-api - Install Kafka for Knative: install/eventing/kafka-install.md - Install RabbitMQ for Knative: install/eventing/rabbitmq-install.md # N.B. this duplicates an "eventing" topic above, cross-referenced here. diff --git a/docs/versioned/install/operator/configuring-serving-cr.md b/docs/versioned/install/operator/configuring-serving-cr.md index 5beb229785..f79496afa6 100644 --- a/docs/versioned/install/operator/configuring-serving-cr.md +++ b/docs/versioned/install/operator/configuring-serving-cr.md @@ -552,6 +552,124 @@ spec: service: custom-local-gateway.istio-system.svc.cluster.local ``` +## Configure the Gateway API ingress + +!!! important + Gateway API support in Knative is currently in beta. The API and configuration may change in future releases. + The Knative team currently tests the Istio, Contour, and Envoy Gateway implementations of Gateway API. For more information, see the + [net-gateway-api repository](https://github.com/knative-extensions/net-gateway-api). + +### Enable Gateway API + +To configure Knative Serving to use Gateway API, add `spec.ingress.gateway-api` and `spec.config.network` to +your Serving CR YAML file as follows: + +```yaml +apiVersion: operator.knative.dev/v1beta1 +kind: KnativeServing +metadata: + name: knative-serving + namespace: knative-serving +spec: + ingress: + gateway-api: + enabled: true + config: + network: + ingress-class: "gateway-api.ingress.networking.knative.dev" +``` + +### Configure Gateway API gateways + +You must configure external and local gateways by using the `spec.config.gateway` field +in the KnativeServing CR. + +The key in `spec.config.gateway` is in the format of +``` +external-gateways: | + - class: + gateway: / + service: / + supported-features: + - +local-gateways: | + - class: + gateway: / + service: / + supported-features: + - +``` + +The following example configures gateways for Istio: + +```yaml +apiVersion: operator.knative.dev/v1beta1 +kind: KnativeServing +metadata: + name: knative-serving + namespace: knative-serving +spec: + ingress: + gateway-api: + enabled: true + config: + network: + ingress-class: "gateway-api.ingress.networking.knative.dev" + gateway: + external-gateways: | + - class: istio + gateway: istio-system/knative-gateway + service: istio-system/knative-gateway-istio + supported-features: + - HTTPRouteRequestTimeout + local-gateways: | + - class: istio + gateway: istio-system/knative-local-gateway + service: istio-system/knative-local-gateway-istio + supported-features: + - HTTPRouteRequestTimeout +``` + +!!! note + Istio's Gateway API implementation creates Service resources with the naming convention + `-istio`. Make sure the `service` value matches the actual Service name + in your cluster. + +The following example configures gateways for +[Envoy Gateway](https://gateway.envoyproxy.io/): + +```yaml +apiVersion: operator.knative.dev/v1beta1 +kind: KnativeServing +metadata: + name: knative-serving + namespace: knative-serving +spec: + ingress: + gateway-api: + enabled: true + config: + network: + ingress-class: "gateway-api.ingress.networking.knative.dev" + gateway: + external-gateways: | + - class: eg-external + gateway: eg-external/eg-external + service: eg-external/knative-external + supported-features: + - HTTPRouteRequestTimeout + local-gateways: | + - class: eg-internal + gateway: eg-internal/eg-internal + service: eg-internal/knative-internal + supported-features: + - HTTPRouteRequestTimeout +``` + +!!! note + The `class`, `gateway`, and `service` values must match your + `GatewayClass`, `Gateway`, and Service resource names. + ## Customize kourier-bootstrap for Kourier gateways: 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. diff --git a/docs/versioned/install/operator/knative-with-operators.md b/docs/versioned/install/operator/knative-with-operators.md index cfce8a0be1..1708a9f587 100644 --- a/docs/versioned/install/operator/knative-with-operators.md +++ b/docs/versioned/install/operator/knative-with-operators.md @@ -229,7 +229,7 @@ Knative Serving with different ingresses: ``` 1. To configure Knative Serving to use Contour, add `spec.ingress.contour` - `spec.config.network` to your Serving CR YAML file as follows: + and `spec.config.network` to your Serving CR YAML file as follows: ```yaml apiVersion: operator.knative.dev/v1beta1 @@ -263,6 +263,58 @@ Knative Serving with different ingresses: Save this for configuring DNS later. +=== "Gateway API" + + The following steps install Gateway API and enable its Knative integration: + + 1. Install a [Gateway API implementation](https://gateway-api.sigs.k8s.io/implementations/) + in your cluster (for example, [Istio](../installing-istio.md), Contour, or Envoy Gateway). + + 1. Install the Gateway API CRDs if they are not already installed on your cluster: + + ```bash + kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/latest/download/standard-install.yaml + ``` + + 1. Create `Gateway` resources in your cluster for Knative to use and configure the gateway + settings in your Serving CR. For more information, see + [Configure Gateway API gateways](configuring-serving-cr.md#configure-gateway-api-gateways). + + 1. To configure Knative Serving to use Gateway API, add `spec.ingress.gateway-api` + and `spec.config.network` to your Serving CR YAML file as follows: + + ```yaml + apiVersion: operator.knative.dev/v1beta1 + kind: KnativeServing + metadata: + name: knative-serving + namespace: knative-serving + spec: + # ... + ingress: + gateway-api: + enabled: true + config: + network: + ingress-class: "gateway-api.ingress.networking.knative.dev" + ``` + + 1. Apply the YAML file for your Serving CR by running the command: + + ```bash + kubectl apply -f .yaml + ``` + + Where `` is the name of your Serving CR file. + + 1. Fetch the External IP or CNAME by running the command: + + ```bash + kubectl get gateway --all-namespaces + ``` + + Save this for configuring DNS later. + ### Verify the Knative Serving deployment 1. Monitor the Knative deployments: