Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/versioned/.nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
118 changes: 118 additions & 0 deletions docs/versioned/install/operator/configuring-serving-cr.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-class>
gateway: <namespace>/<gateway-name>
service: <namespace>/<service-name>
supported-features:
- <feature-name>
local-gateways: |
- class: <gateway-class>
gateway: <namespace>/<gateway-name>
service: <namespace>/<service-name>
supported-features:
- <feature-name>
```

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
`<gateway-name>-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.
Expand Down
54 changes: 53 additions & 1 deletion docs/versioned/install/operator/knative-with-operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 <filename>.yaml
```

Where `<filename>` 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:
Expand Down
Loading