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
3 changes: 3 additions & 0 deletions docs/admin/install/knative-with-operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,10 @@ knative-serving <version number> True

Save this for configuring DNS below.

<!-- These are snippets from the docs/snippets directory -->
{% include "dns.md" %}
{% include "real-dns-operator.md" %}
{% include "temporary-dns.md" %}

## Installing the Knative Eventing component

Expand Down
3 changes: 3 additions & 0 deletions docs/admin/install/serving/install-serving-with-yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ Follow the procedure for the networking layer of your choice:
kubectl get pods --namespace knative-serving
```

<!-- These are snippets from the docs/snippets directory -->
{% include "dns.md" %}
{% include "real-dns-yaml.md" %}
{% include "temporary-dns.md" %}

## Install optional Serving extensions

Expand Down
72 changes: 0 additions & 72 deletions docs/snippets/dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,75 +20,3 @@ Follow the procedure for the DNS of your choice:
is running.

In these cases, see the "Real DNS" or "Temporary DNS" tabs.


=== "Real DNS"

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:

```
# 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:

```
# Here knative.example.com is the domain suffix for your cluster
*.knative.example.com == CNAME a317a278525d111e89f272a164fd35fb-1510370581.eu-central-1.elb.amazonaws.com
```

Once your DNS provider has been configured, add the following section into your existing Serving CR, and apply it:

```yaml
# Replace knative.example.com with your domain suffix
apiVersion: operator.knative.dev/v1alpha1
kind: KnativeServing
metadata:
name: knative-serving
namespace: knative-serving
spec:
config:
domain:
"knative.example.com": ""
...
```

=== "Temporary DNS"

If you are using `curl` to access the sample applications, 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,
for example, minikube locally or IPv6 clusters.

To access your application using `curl` using this method:

1. After starting your application, get the URL of your application:
```bash
kubectl get ksvc
```
The output should be similar to:
```bash
NAME URL LATESTCREATED LATESTREADY READY REASON
helloworld-go http://helloworld-go.default.example.com helloworld-go-vqjlf helloworld-go-vqjlf True
```

1. Instruct `curl` to connect to the External IP or CNAME defined by the
networking layer in section 3 above, and use the `-H "Host:"` command-line
option to specify the Knative application's host name.

For example, if the networking layer defines your External IP and port to be `http://192.168.39.228:32198` and you wish to access the above `helloworld-go` application, use:

```bash
curl -H "Host: helloworld-go.default.example.com" http://192.168.39.228:32198
```
In the case of the provided `helloworld-go` sample application, using the default configuration, the output is:

```
Hello Go Sample v1!
```

Refer to the "Real DNS" method for a permanent solution.
36 changes: 36 additions & 0 deletions docs/snippets/real-dns-operator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
=== "Real DNS"

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:

```
# 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:

```
# Here knative.example.com is the domain suffix for your cluster
*.knative.example.com == CNAME a317a278525d111e89f272a164fd35fb-1510370581.eu-central-1.elb.amazonaws.com
```

- Once your DNS provider has been configured, add the following section into your existing Serving CR, and apply it:

```yaml
# Replace knative.example.com with your domain suffix
apiVersion: operator.knative.dev/v1alpha1
kind: KnativeServing
metadata:
name: knative-serving
namespace: knative-serving
spec:
config:
domain:
"knative.example.com": ""
...
```
30 changes: 30 additions & 0 deletions docs/snippets/real-dns-yaml.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
=== "Real DNS"

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:

```
# 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:

```
# Here knative.example.com is the domain suffix for your cluster
*.knative.example.com == CNAME a317a278525d111e89f272a164fd35fb-1510370581.eu-central-1.elb.amazonaws.com
```

- 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":""}}'
```
29 changes: 29 additions & 0 deletions docs/snippets/temporary-dns.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
=== "Temporary DNS"

If you are using `curl` to access the sample applications, 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,
for example, minikube locally or IPv6 clusters.

To access your application using `curl` using this method:

1. After starting your application, get the URL of your application:
```bash
kubectl get ksvc
```
The output should be similar to:
```bash
NAME URL LATESTCREATED LATESTREADY READY REASON
helloworld-go http://helloworld-go.default.example.com helloworld-go-vqjlf helloworld-go-vqjlf True
```

1. Instruct `curl` to connect to the External IP or CNAME defined by the
networking layer in section 3 above, and use the `-H "Host:"` command-line
option to specify the Knative application's host name.
For example, if the networking layer defines your External IP and port to be `http://192.168.39.228:32198` and you wish to access the above `helloworld-go` application, use:
```bash
curl -H "Host: helloworld-go.default.example.com" http://192.168.39.228:32198
```
In the case of the provided `helloworld-go` sample application, using the default configuration, the output is:
```
Hello Go Sample v1!
```
Refer to the "Real DNS" method for a permanent solution.