Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
cbc1aa6
Create config-network-adapters.md
iRaindrop Nov 19, 2025
14b81f4
Added Nav
iRaindrop Nov 19, 2025
3b315cb
Update config-network-adapters.md
iRaindrop Nov 19, 2025
9a212b2
Update config-network-adapters.md
iRaindrop Nov 19, 2025
2300e4f
Added snippet file for Kourier
iRaindrop Nov 20, 2025
e6167d0
Update config-network-adapters.md
iRaindrop Nov 20, 2025
d283146
Update config-network-adapters.md
iRaindrop Nov 20, 2025
5062101
Snippet fix
iRaindrop Nov 20, 2025
916f3b4
Update config-network-adapters.md
iRaindrop Nov 20, 2025
81fd46e
Update config-network-adapters.md
iRaindrop Nov 20, 2025
d10ab27
Update config-network-adapters.md
iRaindrop Nov 20, 2025
9aec3ac
Added Contour snippet
iRaindrop Nov 22, 2025
1c48767
Update config-network-adapters.md
iRaindrop Nov 22, 2025
205ecae
Added istio and gateway api snippet files
iRaindrop Nov 22, 2025
310d9eb
Writing and snippet work
iRaindrop Nov 23, 2025
84f0b03
Misc fixes
iRaindrop Nov 23, 2025
92d24f1
Link fixes
iRaindrop Nov 23, 2025
55a8c41
Update netadapter-istio.md
iRaindrop Nov 23, 2025
e35130c
Tab work
iRaindrop Nov 23, 2025
77cb4b8
Update config-network-adapters.md
iRaindrop Nov 23, 2025
a019583
Update config-network-adapters.md
iRaindrop Nov 23, 2025
fb9a9f0
Update config-network-adapters.md
iRaindrop Nov 24, 2025
e39c0ae
Title and edits
iRaindrop Nov 24, 2025
f346e57
Update config-network-adapters.md
iRaindrop Nov 24, 2025
c277d3d
Update config-network-adapters.md
iRaindrop Nov 24, 2025
2578283
Update config-network-adapters.md
iRaindrop Nov 24, 2025
4d49145
Update config-network-adapters.md
iRaindrop Nov 24, 2025
4fad8ae
Update config-network-adapters.md
iRaindrop Nov 24, 2025
8b39f84
Update config-network-adapters.md
iRaindrop Nov 24, 2025
8986808
Update config-network-adapters.md
iRaindrop Nov 25, 2025
761be15
Update config-network-adapters.md
iRaindrop Nov 25, 2025
f7a24a0
Update config-network-adapters.md
iRaindrop Nov 25, 2025
3905026
Update config-network-adapters.md
iRaindrop Nov 25, 2025
a4512c4
Update config-network-adapters.md
iRaindrop Nov 25, 2025
49db831
Update config-network-adapters.md
iRaindrop Nov 27, 2025
41240db
Writing and structuring
iRaindrop Nov 27, 2025
631c56f
Update config-network-adapters.md
iRaindrop Nov 27, 2025
73e845f
Update config-network-adapters.md
iRaindrop Nov 27, 2025
6dbb22a
Update netadapter-gatewayapi.md
iRaindrop Nov 27, 2025
497620d
Formatting tests
iRaindrop Nov 27, 2025
359f605
Update config-network-adapters.md
iRaindrop Nov 27, 2025
8e5bf80
Update config-network-adapters.md
iRaindrop Nov 27, 2025
5c032f4
Update config-network-adapters.md
iRaindrop Nov 27, 2025
9cf4980
Update config-network-adapters.md
iRaindrop Nov 27, 2025
187c0a1
Update config-network-adapters.md
iRaindrop Nov 27, 2025
3e2a67f
Update config-network-adapters.md
iRaindrop Nov 27, 2025
1c05b86
Update config-network-adapters.md
iRaindrop Nov 27, 2025
dddacd1
Added Ingress Gateway tab
iRaindrop Nov 29, 2025
129133a
Update config-network-adapters.md
iRaindrop Nov 29, 2025
f300403
More writing
iRaindrop Nov 30, 2025
d475c32
Update config-network-adapters.md
iRaindrop Nov 30, 2025
6f6fb4b
Update config-network-adapters.md
iRaindrop Nov 30, 2025
1eeda2e
Misc fixes
iRaindrop Nov 30, 2025
614e293
Small edit to rebuild
iRaindrop Nov 30, 2025
ee0d3f0
Update config-network-adapters.md
iRaindrop Dec 1, 2025
d70fae5
Update config-network-adapters.md
iRaindrop Dec 1, 2025
aa5c536
Misc updates
iRaindrop Dec 1, 2025
1425f02
Update config-network-adapters.md
iRaindrop Dec 1, 2025
6659e07
Update config-network-adapters.md
iRaindrop Dec 1, 2025
9059d0d
Update config-network-adapters.md
iRaindrop Dec 1, 2025
1d76ef9
Update netadapter-gatewayapi.md
iRaindrop Dec 1, 2025
7c0cb5d
Update config-network-adapters.md
iRaindrop Dec 2, 2025
d21ff02
Update config-network-adapters.md
iRaindrop Dec 2, 2025
89a5b3c
Update config-network-adapters.md
iRaindrop Dec 2, 2025
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
13 changes: 3 additions & 10 deletions docs/snippets/dns.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
You can configure DNS to prevent the need to run curl commands with a host header.
You can configure DNS to avoid running curl commands with a host header.

The following tabs expand to show instructions for configuring DNS.
Follow the procedure for the DNS of your choice:
The following tabs show instructions for configuring DNS. Follow the procedure for the DNS of your choice:

=== "Magic DNS (sslip.io)"

Expand All @@ -11,10 +10,4 @@ Follow the procedure for the DNS of your choice:
kubectl apply -f {{artifact(repo="serving",file="serving-default-domain.yaml")}}
```

!!! warning
This will only work if the cluster `LoadBalancer` Service exposes an
IPv4 address or hostname, so it will not work with IPv6 clusters or local setups
like minikube unless [`minikube tunnel`](https://minikube.sigs.k8s.io/docs/commands/tunnel/)
is running.

In these cases, see the "Real DNS" or "No DNS" tabs.
This configuration works only if the cluster `LoadBalancer` Service exposes an IPv4 address or hostname. It does not work with IPv6 clusters or local setups such as minikube, unless [`minikube tunnel`](https://minikube.sigs.k8s.io/docs/commands/tunnel/) is running, and should consider using the "Real DNS" or "No DNS" tabs.
28 changes: 28 additions & 0 deletions docs/snippets/netadapter-contour.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Use the following steps to install and enable Contour and set it as the ingress conroller.

1. Install the Knative Contour controller:

```bash
kubectl apply -f https://github.com/knative/net-kourier/releases/latest/download/kourier.yaml
```

1. Configure Knative Serving to use Contour:

```bash
kubectl patch configmap/config-network \
--namespace knative-serving \
--type merge \
--patch '{"data":{"ingress-class":"contour.ingress.networking.knative.dev"}}'
```

1. Verify the installation by having a pod with the base name of `contour` in the results.

```bash
kubectl get pods -n knative-serving
```

1. Get the external IP address (FQDN) to configure DNS records:

```bash
kubectl --namespace contour-external get service envoy
```
22 changes: 22 additions & 0 deletions docs/snippets/netadapter-gatewayapi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Use the following steps to install and configure the Knative Gateway API.

1. Install the Knative Gateway API channel:

```bash
kubectl apply -f {{ artifact(repo="net-gateway-api",org="knative-extensions",file="net-gateawy-api.yaml")}}
```

1. Configure Knative Serving to use Knative Gateway API channel:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is channel the right word? Doesn't the ConfigMap need to configure the underlying ingress controller?


```bash
kubectl patch configmap/config-network \
--namespace knative-serving \
--type merge \
--patch '{"data":{"ingress-class":"gateway-api.ingress.networking.knative.dev"}}'
```

1. Get the external IP address (FQDN) to configure DNS records:

```bash
kubectl get gateway --all-namespaces
```
35 changes: 35 additions & 0 deletions docs/snippets/netadapter-istio.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Use the following steps to install Istio and set it as the ingress conroller.

1. Install a properly configured Istio:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The artifact "macros" are not rendering to provide the URL. I wasn't able to find this one.


```bash
kubectl apply -l knative.dev/crd-install=true -f {{ artifact(repo="net-istio",org="knative-extensions",file="istio.yaml")}}
kubectl apply -f {{ artifact(repo="net-istio",org="knative-extensions",file="istio.yaml")}}
```

1. Install the Knative Istio controller:

```bash
kubectl apply -f {{ artifact(repo="net-istio",file="net-istio.yaml")}}
```

<!-- 1. Set the `config-network` ConfigMap to use Istio:
Copy link
Contributor Author

@iRaindrop iRaindrop Dec 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this ConfigMap patch step that might not be correct. Or does Istio make the ingress controller connection without the ConfigMap?


```bash
kubectl patch configmap/config-network \
--namespace knative-serving \
--type merge \
--patch '{"data":{"ingress-class":"istio.ingress.networking.knative.dev"}}'
``` -->

1. Verify the installation by having pods with the base name of `istio` and `istio-webhook` in the results.

```bash
kubectl get pods -n knative-serving
```

1. Get the external IP address (FQDN) to configure DNS records:

```bash
kubectl --namespace istio-system get service istio-ingressgateway
```
28 changes: 28 additions & 0 deletions docs/snippets/netadapter-kourier.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Use the following steps to install Kourier and set it as the ingress controller.

1. Install the Knative Kourier controller:

```bash
kubectl apply -f https://github.com/knative/net-kourier/releases/latest/download/kourier.yaml
```

1. Configure Knative Serving to use Kourier by default:

```bash
kubectl patch configmap/config-network \
--namespace knative-serving \
--type merge \
--patch '{"data":{"ingress-class":"kourier.ingress.networking.knative.dev"}}'
```

1. Verify the installation by having pods with the base name of `kourier-controller` and `kourier-gateway` in the results.

```bash
kubectl get pods -n knative-serving
```

1. Get the external IP address (FQDN) to configure DNS records:

```bash
kubectl --namespace kourier-system get service kourier
```
4 changes: 0 additions & 4 deletions docs/snippets/no-dns.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<!-- Referenced by:
- install/operator/knative-with-operators.md
- install/yaml-install/serving/install-serving-with-yaml.md
-->
=== "No DNS"

If you are using `curl` to access [the sample applications](/docs/getting-started/first-service/), or your own Knative app, and are unable to use the "Magic DNS (sslip.io)" or "Real DNS" methods, there is a temporary approach. This is useful for those who wish to evaluate Knative without altering their DNS configuration, as per the "Real DNS" method, or cannot use the "Magic DNS" method due to using,
Expand Down
1 change: 1 addition & 0 deletions docs/versioned/.nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ nav:
- Configure high-availability components: serving/config-ha.md
- Exclude namespaces from the Knative webhook: serving/webhook-customizations.md
- Networking Options:
- Configure Knative networking: serving/config-network-adapters.md
- Configure the ingress gateway: serving/setting-up-custom-ingress-gateway.md
- Configure domain names: serving/using-a-custom-domain.md
- Istio Authorization: serving/istio-authorization.md
Expand Down
187 changes: 187 additions & 0 deletions docs/versioned/serving/config-network-adapters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
---
audience: administrator
components:
- serving
function: how-to
---

# Configure Knative networking

This page provides installation and configuration guidance for Knative networking. You can configure Ingress controls, service-meshes, and gateways.

### Determine current state

Use the following command to determine which ingress controllers are installed and their status.

```bash
kubectl get pods -n knative-serving
```

The ingress controllers, that have been tested for Knative, have the following base names:

- Kourier: `kourier-control-*`, and `kourier-gateway-*`. Kourier is included in the Knative Serving installation should appear in the results when your cluster is first created.
- Contour: `contour-*`
- Istio: `istio-webhook-*`. The main Istio control plane pods such as `istiod-*` are in the `istio-system` namespace. Knative adds the `istio-webhook-*` pod in the `knative-serving` namespace when Istio is the chosen networking layer.

The `network-config` ConfigMap sets which controller to use with the ingress controller key. This key is patched with the name of any new controller. See [Changing the ingress controller](#change-the-controller) for important information about using this key.

## Network layer options

Review the following tabs to determine the optimal networking layer for your cluster. For most users, the Kourier ingress controller is sufficient in conjunction the default Istio gateway, which is also included in the Knative Serving installation. You can expand your capabilities with the Contour ingress, a full-feature service mesh with Istio, and the Kubernetes Gateway API.

=== "Kourier"

```mermaid
---
config:
theme: default
layout: elk
look: neo
---
flowchart LR
K1["Knative<br>net-kourier"] -- creates --> K2["Ingress&nbsp;objects"]
K2 --> K3["Class: kourier.ingress.networking.knative.dev"]
```

The Kourier ingress controller, `net-kourier`, is installed with Knative Serving. Kourier is a lightweight alternative for the Istio ingress as its deployment consists only of an envoy proxy and a control plane. If Kourier is satisfactory, no further configurations are required.

Kourier is the only supported ingress controller for the IBM Z and IBM Power platforms, and requires additional steps as documented in [Install Serving with YAML on IBM-Z and IBM-P](/versioned/install/yaml-install/serving/install-serving-with-yaml-on-IBM-Z-and-IBM-P.md).

**Install and configure Kourier**

--8<-- "netadapter-kourier.md"

=== "Contour"

```mermaid
---
config:
theme: default
layout: elk
look: neo
---
flowchart LR
C1["Knative<br>net-contour"] -- creates --> C2["Ingress&nbsp;objects"]
C2 --> C3["Class: contour.ingress.networking.knative.dev"]
```

The Contour ingress controller, `net-contour`, bridges Knative's KIngress resources to Contour's HTTPProxy resources. A good choice for clusters that already run non-Knative apps, teams who want to use a single Ingress controller, and are already using Contour envoy but don't need a full-feature service mesh.

**Install and configure Contour**

--8<-- "netadapter-contour.md"

=== "Istio"

```mermaid
---
config:
theme: default
layout: elk
---
flowchart LR
I1["Knative&nbsp;net-istio"] -- creates --> I2["Service + Gateway"]
I2 --> I3["Class: istio.ingress.networking.knative.dev<br>No native Ingress objects"]
```

The Knative `net-istio` is a KIngress controller for Istio. It's a full-feature service mesh that also functions as a Knative ingress. Good for enterprises already running Istio or needing advanced service mesh features.

**Install and configure Istio**

--8<-- "netadapter-istio.md"

=== "Ingress Gateway"

```mermaid
---
config:
layout: elk
theme: default
look: neo
---
flowchart LR
Client["External&nbsp;Client"] --> CGW["Custom&nbsp;Ingress&nbsp;Gateway"]
CGW --> KIGW["Knative&nbsp;Ingress&nbsp;Gateway"] & Client
KIGW --> Revision["Knative&nbsp;Revision"] & CGW
Revision --> KIGW
```

Knative has a default Istio integration without the full-feature service mesh. The `knative-ingress-gateway` in the `knative-serving` namespace is a shared Istio gateway resource that handles all incoming (north-south) traffic to Knative services. This gateway points to the underlying `istio-ingressgateway` service in the `istio-system` namespace. You can replace this gateway with one of your own.

**Install and configure Ingress Gateway**

See [Configuring the Ingress gateway](setting-up-custom-ingress-gateway.md).

=== "Gateway API"

```mermaid
---
config:
layout: elk
theme: default
---
flowchart LR
subgraph net-gateway-api["net-gateway-api&nbsp;controller"]
GW["Gateway"]
Route["Knative&nbsp;Route"]
HR["HTTPRoute"]
end
subgraph underlying["Underlying&nbsp;Controller<br>(Contour │ Istio │ Envoy Gateway │ …)"]
Controller["GatewayClass&nbsp;Controller"]
end
KSvc["Knative&nbsp;Service"] --> Route
Route -- translates&nbsp;to --> GW & HR
GW --> Controller
HR --> Controller
Controller -- routes&nbsp;traffic&nbsp;to --> Pods["Your&nbsp;Pods"]

style net-gateway-api fill:#e3f2fd,stroke:#1976d2
style underlying fill:#fff3e0,stroke:#ef6c00
```

The Knative `net-gateway-api` is a KIngress implementation and testing for Knative integration with the [Kubernetes Gateway API](https://gateway-api.sigs.k8s.io/). Good for teams adopting the Gateway API to unify ingress across Kubernetes.

The Kubernetes Gateway API requires a controller or service mesh. Istio and Contour implementations are tested though other Gateway API implementations should work. Currently, there is no native Gateway API support for Kourier. For more information see [Tested Gateway API version and Ingress](https://github.com/knative-extensions/net-gateway-api/blob/main/docs/test-version.md).

The controller that Knative uses is determined by which Gateway API-compatible controller you install and configure in your cluster.

**Install and configure Gateway API**

--8<-- "netadapter-gatewayapi.md"

## Configure DNS

--8<-- "dns.md"
--8<-- "real-dns-yaml.md"
--8<-- "no-dns.md"

## Changing the ingress controller

If you want to change the ingress controllers, install and configure the new controller as instructed in the [Network layer options](#network-layer-options). There is no requirement to remove ingress controllers that are not in use.

You can determine the controller in use by examining the `config-network.yaml`:

```bash
kubectl get cm config-network -n knative-serving -o yaml
```

Look for the `ingress-class` key. It could also be the `ingress.class` key with a dot. The dash usage is more current and supersedes any key with the dot. In the following example, the `ingress.class` key was initially set for the Kourier controller, but is now set to Contour because the ingress key with a dash takes precedence.

```yml
ingress-class: contour.ingress.networking.knative.dev
ingress.class: kourier.ingress.networking.knative.dev
```

If you want to switch back to a previously installed controller, patch the `config-network` ConfigMap with the new controller. In the following example Kourier is used because of the dash in `ingress-class`.

```bash
kubectl patch cm config-network -n knative-serving \
--type merge -p '{"data":{"ingress-class":"kourier.ingress.networking.knative.dev"}}'
```

You can remove an unused key with a dot with the following command:

```bash
ubectl patch configmap config-network -n knative-serving \
--type=json -p='[{"op": "remove", "path": "/data/ingress.class"}]'
```
Loading