-
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
Open
iRaindrop
wants to merge
133
commits into
knative:main
Choose a base branch
from
iRaindrop:bh-networkadapters
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
133 commits
Select commit
Hold shift + click to select a range
cbc1aa6
Create config-network-adapters.md
iRaindrop 14b81f4
Added Nav
iRaindrop 3b315cb
Update config-network-adapters.md
iRaindrop 9a212b2
Update config-network-adapters.md
iRaindrop 2300e4f
Added snippet file for Kourier
iRaindrop e6167d0
Update config-network-adapters.md
iRaindrop d283146
Update config-network-adapters.md
iRaindrop 5062101
Snippet fix
iRaindrop 916f3b4
Update config-network-adapters.md
iRaindrop 81fd46e
Update config-network-adapters.md
iRaindrop d10ab27
Update config-network-adapters.md
iRaindrop 9aec3ac
Added Contour snippet
iRaindrop 1c48767
Update config-network-adapters.md
iRaindrop 205ecae
Added istio and gateway api snippet files
iRaindrop 310d9eb
Writing and snippet work
iRaindrop 84f0b03
Misc fixes
iRaindrop 92d24f1
Link fixes
iRaindrop 55a8c41
Update netadapter-istio.md
iRaindrop e35130c
Tab work
iRaindrop 77cb4b8
Update config-network-adapters.md
iRaindrop a019583
Update config-network-adapters.md
iRaindrop fb9a9f0
Update config-network-adapters.md
iRaindrop e39c0ae
Title and edits
iRaindrop f346e57
Update config-network-adapters.md
iRaindrop c277d3d
Update config-network-adapters.md
iRaindrop 2578283
Update config-network-adapters.md
iRaindrop 4d49145
Update config-network-adapters.md
iRaindrop 4fad8ae
Update config-network-adapters.md
iRaindrop 8b39f84
Update config-network-adapters.md
iRaindrop 8986808
Update config-network-adapters.md
iRaindrop 761be15
Update config-network-adapters.md
iRaindrop f7a24a0
Update config-network-adapters.md
iRaindrop 3905026
Update config-network-adapters.md
iRaindrop a4512c4
Update config-network-adapters.md
iRaindrop 49db831
Update config-network-adapters.md
iRaindrop 41240db
Writing and structuring
iRaindrop 631c56f
Update config-network-adapters.md
iRaindrop 73e845f
Update config-network-adapters.md
iRaindrop 6dbb22a
Update netadapter-gatewayapi.md
iRaindrop 497620d
Formatting tests
iRaindrop 359f605
Update config-network-adapters.md
iRaindrop 8e5bf80
Update config-network-adapters.md
iRaindrop 5c032f4
Update config-network-adapters.md
iRaindrop 9cf4980
Update config-network-adapters.md
iRaindrop 187c0a1
Update config-network-adapters.md
iRaindrop 3e2a67f
Update config-network-adapters.md
iRaindrop 1c05b86
Update config-network-adapters.md
iRaindrop dddacd1
Added Ingress Gateway tab
iRaindrop 129133a
Update config-network-adapters.md
iRaindrop f300403
More writing
iRaindrop d475c32
Update config-network-adapters.md
iRaindrop 6f6fb4b
Update config-network-adapters.md
iRaindrop 1eeda2e
Misc fixes
iRaindrop 614e293
Small edit to rebuild
iRaindrop ee0d3f0
Update config-network-adapters.md
iRaindrop d70fae5
Update config-network-adapters.md
iRaindrop aa5c536
Misc updates
iRaindrop 1425f02
Update config-network-adapters.md
iRaindrop 6659e07
Update config-network-adapters.md
iRaindrop 9059d0d
Update config-network-adapters.md
iRaindrop 1d76ef9
Update netadapter-gatewayapi.md
iRaindrop 7c0cb5d
Update config-network-adapters.md
iRaindrop d21ff02
Update config-network-adapters.md
iRaindrop 89a5b3c
Update config-network-adapters.md
iRaindrop e1b403e
Update config-network-adapters.md
iRaindrop 39b879a
Update docs/snippets/dns.md
iRaindrop 96c2e5d
Processed reviewer edits
iRaindrop de084ee
Misc edits
iRaindrop 4de8810
Update config-network-adapters.md
iRaindrop 6240ade
Update docs/versioned/serving/config-network-adapters.md
iRaindrop d10aa03
Reviewer udpates
iRaindrop 845b289
Update config-network-adapters.md
iRaindrop 190f622
Update config-network-adapters.md
iRaindrop 176cadf
Update config-network-adapters.md
iRaindrop e77ee57
Update config-network-adapters.md
iRaindrop 003de74
Update config-network-adapters.md
iRaindrop aa645a3
Update config-network-adapters.md
iRaindrop 0f1e2c6
Update config-network-adapters.md
iRaindrop 7806497
Update config-network-adapters.md
iRaindrop fc76a54
Update config-network-adapters.md
iRaindrop 93dc28b
Update config-network-adapters.md
iRaindrop 32eb3a4
Update docs/snippets/netadapter-kourier.md
iRaindrop b9ee495
Update config-network-adapters.md
iRaindrop 99a8194
Update config-network-adapters.md
iRaindrop 94f611a
Chart work and misc fixes
iRaindrop 73f8507
Misc updates
iRaindrop 47883ad
Update config-network-adapters.md
iRaindrop f5a1367
Gateway additions and misc
iRaindrop 9ec1cfe
Update config-network-adapters.md
iRaindrop d1fedb1
Update config-network-adapters.md
iRaindrop 10035ad
Update config-network-adapters.md
iRaindrop 1948079
Update config-network-adapters.md
iRaindrop 48664a3
Update config-network-adapters.md
iRaindrop 031fec0
Update config-network-adapters.md
iRaindrop 2d0b90d
Update config-network-adapters.md
iRaindrop 065b020
Tab test with snippets
iRaindrop daab253
Configured snippets
iRaindrop 4dc3ea2
Update install-serving-with-yaml.md
iRaindrop dd6e4be
Snippet code formatting
iRaindrop 7e94de4
Update install-serving-with-yaml.md
iRaindrop 1af8870
Update install-serving-with-yaml.md
iRaindrop 33a0b7a
Update docs/versioned/serving/config-network-adapters.md
iRaindrop c489ded
Update docs/versioned/serving/config-network-adapters.md
iRaindrop 2b6b3f3
Update docs/versioned/serving/config-network-adapters.md
iRaindrop dd061d9
Update docs/versioned/serving/config-network-adapters.md
iRaindrop 15884c6
Update config-network-adapters.md
iRaindrop 5b132e9
Update config-network-adapters.md
iRaindrop bcc347a
Update config-network-adapters.md
iRaindrop aba1034
Update config-network-adapters.md
iRaindrop d2af6d9
Update config-network-adapters.md
iRaindrop c988447
Snippet references and fixes
iRaindrop 214e7ba
Misc edits
iRaindrop 4df6d8c
Update install-serving-with-yaml.md
iRaindrop 92670a8
Update install-serving-with-yaml.md
iRaindrop edea5c3
Snippet and Tab fixes
iRaindrop 25438dd
Tab fixes
iRaindrop b77528c
Tab fixes and reviewer edits
iRaindrop 6365583
tab tweaks
iRaindrop b6c8203
tab and include test
iRaindrop 0bd2122
tab include test
iRaindrop 0674346
tab test
iRaindrop 57ac62f
A hopeful test
iRaindrop 7f0a3cd
Tab test with indent filter
iRaindrop 087728b
Indent test
iRaindrop c8d8a94
Test edit to rebuild
iRaindrop 07f9f94
Install snippets and DNS snippets
iRaindrop 726cb82
Update install-serving-with-yaml.md
iRaindrop cb169ef
file name fix
iRaindrop 75ba64c
Format fixes and rerognization
iRaindrop d804895
formatting fixes
iRaindrop ce7742e
Link improvment
iRaindrop 1927664
link format edits
iRaindrop 1a4ba6c
Update netadapter-gatewayapi.md
iRaindrop File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,11 @@ | ||
| You can configure DNS to prevent the need to run curl commands with a host header. | ||
| <!-- Referenced by: | ||
| - install/operator/knative-with-operators.md | ||
| - install/yaml-install/serving/install-serving-with-yaml.md | ||
| --> | ||
| Knative provides a Kubernetes Job called `default-domain` that configures Knative Serving to use [sslip.io](http://sslip.io) as the default DNS suffix. | ||
|
|
||
| The following tabs expand to show instructions for configuring DNS. | ||
| Follow the procedure for the DNS of your choice: | ||
| ```bash | ||
| kubectl apply -f {{artifact(repo="serving",file="serving-default-domain.yaml")}} | ||
| ``` | ||
|
|
||
| === "Magic DNS (sslip.io)" | ||
|
|
||
| Knative provides a Kubernetes Job called `default-domain` that configures Knative Serving to use [sslip.io](http://sslip.io) as the default DNS suffix. | ||
|
|
||
| ```bash | ||
| 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 the [`minikube tunnel`](https://minikube.sigs.k8s.io/docs/commands/tunnel/) is running. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| <!-- Referenced by: | ||
| - install/yaml-install/serving/install-serving-with-yaml.md | ||
| --> | ||
| Use the following steps to install and enable Contour and set it as the ingress controller. | ||
|
|
||
| 1. Install the Knative Contour configuration: | ||
|
|
||
| ```bash | ||
| kubectl apply -f {{ artifact(repo="net-contour",org="knative-extensions",file="contour.yaml")}} | ||
| ``` | ||
|
|
||
| 1. Install the Knative Contour integration controller: | ||
|
|
||
| ```bash | ||
| kubectl apply -f {{ artifact(repo="net-contour",org="knative-extensions",file="net-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. Get the external IP address (FQDN) to later configure DNS: | ||
|
|
||
| ```bash | ||
| kubectl --namespace contour-external get service envoy | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| <!-- Referenced by: | ||
| - install/yaml-install/serving/install-serving-with-yaml.md | ||
| --> | ||
| Use the following steps to install and configure the Knative Gateway API adapter. Note that you need to have a [Gateway API implementation](https://gateway-api.sigs.k8s.io/implementations/) installed in your cluster. The Knative team currently tests the Istio, Contour, and Envoy-Gateway implementations of Gateway API. | ||
|
|
||
| 1. Install the Knative Gateway API: | ||
|
|
||
| ```bash | ||
| kubectl apply -f {{ artifact(repo="net-gateway-api",org="knative-extensions",file="net-gateway-api.yaml") }} | ||
| ``` | ||
|
|
||
| Alternatively, you can also install a preconfigured Gateways for either Contour or Istio. Replace the filename in this step with either `contour-gateway.yaml` or `istio-gateway.yaml`. If you use either file you can skip the next step to configure gateway resources. | ||
|
|
||
| 1. Configure Gateway resources for use by external ("north-south") Knative traffic, and local ("east-west") traffic. If you do not need separate routing for local traffic (or [private Knative services](../../../serving/services/private-services.md)), you can use the external Gateway for both. | ||
|
|
||
| Knative verifies traffic settings according to the Kubernetes namespace, the name of the Gateways, and an underlying DNS name such as a Kubernetes service DNS name that corresponds to the Gateway. | ||
|
|
||
| ```bash | ||
| cat <<EOF | kubectl apply -f - | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: config-gateway | ||
| namespace: knative-serving | ||
| data: | ||
| external-gateways: | | ||
| - name: knative-ingress-gateway # Name of the external Gateway resource | ||
| namespace: knative-serving # Namespace where the Gateway is deployed | ||
| service: knative-ingress-service.knative-serving.svc.cluster.local # backing Service FQDN | ||
| local-gateways: | | ||
| - name: knative-local-gateway # Name of the local Gateway resource | ||
| namespace: knative-serving # Namespace where the Gateway is deployed | ||
| service: knative-local-service.knative-serving.svc.cluster.local # backing Service FQDN | ||
| EOF | ||
| ``` | ||
|
|
||
| 1. Configure Knative Serving to use the Knative Gateway API ingress class: | ||
|
|
||
| ```bash | ||
| kubectl patch configmap/config-network \ | ||
| --namespace knative-serving \ | ||
| --type merge \ | ||
| --patch '{"data":{"ingress-class":"gateway-api.ingress.networking.knative.dev"}}' | ||
| ``` | ||
|
|
||
| 1. Verify the `config-gateway` ConfigMap: | ||
|
|
||
| ```bash | ||
| kubectl get configmap config-gateway -n knative-serving -o yaml | ||
| ``` | ||
|
|
||
| 1. Get the external IP address (FQDN) to configure DNS records: | ||
|
|
||
| ```bash | ||
| kubectl get gateway --all-namespaces | ||
| ``` | ||
|
|
||
| Look for the external Gateway (`knative-ingress-gateway`) to get status and address for DNS configuration. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| <!-- Referenced by: | ||
| - install/yaml-install/serving/install-serving-with-yaml.md | ||
| --> | ||
| Use the following steps to install Istio and set it as the ingress controller. | ||
|
|
||
| 1. Install a properly configured Istio: | ||
|
|
||
| ```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",org="knative-extensions", file="net-istio.yaml") }} | ||
| ``` | ||
|
|
||
| 1. Configure the `config-network` ConfigMap to use Istio: | ||
|
|
||
| ```bash | ||
| kubectl patch configmap/config-network \ | ||
| --namespace knative-serving \ | ||
| --type merge \ | ||
| --patch '{"data":{"ingress-class":"istio.ingress.networking.knative.dev"}}' | ||
| ``` | ||
|
|
||
| 1. Get the external IP address (FQDN) to later configure DNS: | ||
|
|
||
| ```bash | ||
| kubectl --namespace istio-system get service istio-ingressgateway | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| <!-- Referenced by: | ||
| - install/yaml-install/serving/install-serving-with-yaml.md | ||
| --> | ||
| Use the following steps to install Kourier and set it as the ingress controller. | ||
|
|
||
| 1. Install the Knative Kourier controller: | ||
|
|
||
| ```bash | ||
| kubectl apply -f {{ artifact(repo="net-kourier",org="knative-extensions", file="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. Get the external IP address (FQDN) to later configure DNS: | ||
|
|
||
| ```bash | ||
| kubectl --namespace kourier-system get service kourier | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,28 @@ | ||
| === "Real DNS" | ||
| <!-- Referenced by: | ||
| - install/yaml-install/serving/install-serving-with-yaml.md | ||
| --> | ||
| To configure DNS for Knative, take the External IP | ||
| or CNAME from setting up networking, and configure it with your DNS provider as | ||
| follows: | ||
|
|
||
| To configure DNS for Knative, take the External IP | ||
| or CNAME from setting up networking, and configure it with your DNS provider as | ||
| follows: | ||
| - If the networking layer produced an External IP address, then configure a wildcard `A` record for the domain. In the following example, `knative.example.com` is the domain suffix for a cluster. | ||
|
|
||
| - If the networking layer produced an External IP address, then configure a | ||
| wildcard `A` record for the domain: | ||
| ```bash | ||
| *.knative.example.com == A 35.233.41.212 | ||
| ``` | ||
|
|
||
| ``` | ||
| # Here knative.example.com is the domain suffix for your cluster | ||
| *.knative.example.com == A 35.233.41.212 | ||
| ``` | ||
| - If the networking layer produced a CNAME, then configure a CNAME record for the domain. In the following example, `knative.example.com` is the domain suffix for a cluster. | ||
|
|
||
| - If the networking layer produced a CNAME, then configure a CNAME record for the domain: | ||
| ```bash | ||
| *.knative.example.com == CNAME a317a278525d111e89f272a164fd35fb-1510370581.eu-central-1.elb.amazonaws.com | ||
| ``` | ||
|
|
||
| ``` | ||
| # Here knative.example.com is the domain suffix for your cluster | ||
| *.knative.example.com == CNAME a317a278525d111e89f272a164fd35fb-1510370581.eu-central-1.elb.amazonaws.com | ||
| ``` | ||
| - After your DNS provider has been configured, direct Knative to use that domain: | ||
|
|
||
| - Once your DNS provider has been configured, direct Knative to use that domain: | ||
|
|
||
| ```yaml | ||
| # Replace knative.example.com with your domain suffix | ||
| kubectl patch configmap/config-domain \ | ||
| --namespace knative-serving \ | ||
| --type merge \ | ||
| --patch '{"data":{"knative.example.com":""}}' | ||
| ``` | ||
| ```yaml | ||
| # Replace knative.example.com with your domain suffix | ||
| kubectl patch configmap/config-domain \ | ||
| --namespace knative-serving \ | ||
| --type merge \ | ||
| --patch '{"data":{"knative.example.com":""}}' | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The
contour-gateway.yamlandistio-gateway.yamldon't replace thenet-gateway-api.yamlfile, but they replace steps 2 and 3. Not sure how to make that clearer here, but right now, it reads as if you can just install those files instead of thenet-gateway-api.yaml(which won't produce a working system, but the commands will succeed).