-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Create Configure Knative Networking page #6518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 70 commits
cbc1aa6
14b81f4
3b315cb
9a212b2
2300e4f
e6167d0
d283146
5062101
916f3b4
81fd46e
d10ab27
9aec3ac
1c48767
205ecae
310d9eb
84f0b03
92d24f1
55a8c41
e35130c
77cb4b8
a019583
fb9a9f0
e39c0ae
f346e57
c277d3d
2578283
4d49145
4fad8ae
8b39f84
8986808
761be15
f7a24a0
3905026
a4512c4
49db831
41240db
631c56f
73e845f
6dbb22a
497620d
359f605
8e5bf80
5c032f4
9cf4980
187c0a1
3e2a67f
1c05b86
dddacd1
129133a
f300403
d475c32
6f6fb4b
1eeda2e
614e293
ee0d3f0
d70fae5
aa5c536
1425f02
6659e07
9059d0d
1d76ef9
7c0cb5d
d21ff02
89a5b3c
e1b403e
39b879a
96c2e5d
de084ee
4de8810
6240ade
d10aa03
845b289
190f622
176cadf
e77ee57
003de74
aa645a3
0f1e2c6
7806497
fc76a54
93dc28b
32eb3a4
b9ee495
99a8194
94f611a
73f8507
47883ad
f5a1367
9ec1cfe
d1fedb1
10035ad
1948079
48664a3
031fec0
2d0b90d
065b020
daab253
4dc3ea2
dd6e4be
7e94de4
1af8870
33a0b7a
c489ded
2b6b3f3
dd061d9
15884c6
5b132e9
bcc347a
aba1034
d2af6d9
c988447
214e7ba
4df6d8c
92670a8
edea5c3
25438dd
b77528c
6365583
b6c8203
0bd2122
0674346
57ac62f
7f0a3cd
087728b
c8d8a94
07f9f94
726cb82
cb169ef
75ba64c
d804895
ce7742e
1927664
1a4ba6c
2db4fc1
4f92823
7b140b7
c144687
1936a69
5a32d83
07e5162
f6ea325
0486052
2286c51
c5de903
98b3927
e73e15c
c9b2ccc
4d54a67
5e0a08f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 {{ artifact(org="knative-extensions", repo="net-contour", file="contour.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 | ||
| ``` | ||
| 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. | ||||||
iRaindrop marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| 1. Install the Knative Gateway API channel: | ||||||
iRaindrop marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| ```bash | ||||||
| kubectl apply -f {{ artifact(repo="net-gateway-api",org="knative-extensions",file="net-gateawy-api.yaml") }} | ||||||
| ``` | ||||||
evankanderson marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
|
||||||
| 1. Configure Knative Serving to use Knative Gateway API channel: | ||||||
|
||||||
| 1. Configure Knative Serving to use Knative Gateway API channel: | |
| 1. Configure Knative Serving to use Knative Gateway API class: |
| 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: | ||
evankanderson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ```bash | ||
| kubectl apply -l knative.dev/crd-install=true -f {{ artifact(repo="net-istio",org="knative-extensions",file="istio.yaml") }} | ||
evankanderson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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: | ||
iRaindrop marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ```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 | ||
| ``` | ||
| 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 | ||
iRaindrop marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| 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 | ||
| ``` | ||
| 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 | ||
| --> | ||
|
Comment on lines
1
to
4
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why remove this information?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. STET - I must have cut instead of copied for use as a template |
||
| === "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, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -266,6 +266,7 @@ nav: | |
| - Working with ConfigMaps: admin/editing-configmaps.md | ||
| - Configure high-availability components: serving/config-ha.md | ||
| - Exclude namespaces from the Knative webhook: serving/webhook-customizations.md | ||
| - Configure Knative networking: serving/config-network-adapters.md | ||
| - Networking Options: | ||
| - Configure the ingress gateway: serving/setting-up-custom-ingress-gateway.md | ||
iRaindrop marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - Configure domain names: serving/using-a-custom-domain.md | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,189 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## 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. You can expand your capabilities with the Contour ingress, a full-feature service mesh with Istio, and the Kubernetes Gateway API. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The Knative `networking.internal.knative.dev` Ingress type is generally referred to as KIngress objects. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The Knative `networking.internal.knative.dev` Ingress type is generally referred to as KIngress objects. | |
| The Knative `networking.internal.knative.dev` Ingress type is generally referred to as KIngress objects. | |
| ```mermaid | |
| --- | |
| config: | |
| layout: elk | |
| theme: default | |
| --- | |
| flowchart LR | |
| subgraph top[" "] | |
| direction LR | |
| kingress1["Ingress object (KIngress)<br>networking.internal.knative.dev"] | |
| serving("Serving<br>controller") | |
| route["Route object<br>serving.knative.dev"] | |
| end | |
| route -- read by --> serving | |
| serving -- creates --> kingress1 | |
| style kingress1 fill:#BBDEFB,stroke-width:1px,stroke-dasharray: 0 | |
| style serving fill:#FFE0B2 | |
| style top fill:transparent | |
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A great developmental edit observation.
iRaindrop marked this conversation as resolved.
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
net-kourier doesn't create KIngress objects; it reads objects created by serving. I think a more accurate diagram would have two parts. One is common for all network layers:
flowchart LR
route["Route object"] -- "read by" --> serving-core("Serving<br>controller") -- creates --> KIngress["Ingress object<br>networking.internal.knative.dev<br>(KIngress)"]
And then for Kourier, the chart would look like
flowchart LR
KIngress["KIngress<br>Class:kourier.ingress.networking.knative.dev"] -- "read by" --> controller("net-kourier<br>controller") -- programs --> envoy("Envoy deployment<br>kourier-system namespace")
I'll update the other diagrams with just the second-part diagrams.
iRaindrop marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be: (May need "TD" formatting)
flowchart LR
C1["KIngress objects"] -- "read by" --> C2("Knative<br>net-contour") -- creates --> C3["HTTPProxy<br>projectcontour.io"] -- "read by" --> C4("Contour")
iRaindrop marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
iRaindrop marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should re-use the Route --> KIngress diagram, as it's still the mechanism for net-gateway-api as well:
| flowchart LR | |
| subgraph net-gateway-api["net-gateway-api controller"] | |
| GW["Gateway"] | |
| Route["Knative Route"] | |
| HR["HTTPRoute"] | |
| end | |
| subgraph underlying["Underlying Controller<br>(Contour │ Istio │ Envoy Gateway │ …)"] | |
| Controller["GatewayClass Controller"] | |
| end | |
| KSvc["Knative Service"] --> Route | |
| Route -- translates to --> GW & HR | |
| GW --> Controller | |
| HR --> Controller | |
| Controller -- routes traffic to --> Pods["Your Pods"] | |
| style net-gateway-api fill:#e3f2fd,stroke:#1976d2 | |
| style underlying fill:#fff3e0,stroke:#ef6c00 | |
| flowchart LR | |
| net-gateway["net-gateway-api controller"] | |
| GW["Gateway"] | |
| KIngress["KIngress objects"] | |
| HR["HTTPRoute"] | |
| subgraph underlying["Gateway-API Implementation<br>(Contour, Istio, Envoy Gateway, …)"] | |
| Controller("GatewayClass Controller") | |
| end | |
| KIngress -- read by --> net-gateway | |
| net-gateway -- updates --> GW | |
| net-gateway -- creates --> HR | |
| GW -- read by --> Controller | |
| HR -- read by --> Controller | |
| style net-gateway fill:#FFE0B2 | |
| style GW fill:#BBDEFB | |
| style HR fill:#BBDEFB | |
| style Controller fill:#BBDEFB | |
| style underlying fill:#fff3e0,stroke:#ef6c00 |
iRaindrop marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In particular, it's determined by the configuration in config-gateway, that I described in an earlier comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Gateway API, running kubectl get gatewayclass should list which gateway implementations are available in the cluster.
iRaindrop marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - Gateway API: `net-gateway-api-controller` is the deployment used to interface with the Gateway API. It uses the configuration from `config-gateway` to select existing Gateway resources on the cluster. | |
Uh oh!
There was an error while loading. Please reload this page.