Update ingress outputs (#10052)
* Update ingress outputs * ing -> ingress * Feedback from @cmluciano * update describe outputs * update output description
This commit is contained in:
@@ -97,7 +97,7 @@ In order for the Ingress resource to work, the cluster must have an Ingress cont
|
|||||||
* [NGINX, Inc.](https://www.nginx.com/) offers support and maintenance for the [NGINX Ingress Controller for Kubernetes](https://www.nginx.com/products/nginx/kubernetes-ingress-controller)
|
* [NGINX, Inc.](https://www.nginx.com/) offers support and maintenance for the [NGINX Ingress Controller for Kubernetes](https://www.nginx.com/products/nginx/kubernetes-ingress-controller)
|
||||||
|
|
||||||
{{< note >}}
|
{{< note >}}
|
||||||
Review the documentation for your controller to find its specific support policy.
|
**Note:** Review the documentation for your controller to find its specific support policy.
|
||||||
{{< /note >}}
|
{{< /note >}}
|
||||||
|
|
||||||
## Before you begin
|
## Before you begin
|
||||||
@@ -105,7 +105,7 @@ Review the documentation for your controller to find its specific support policy
|
|||||||
The following document describes a set of cross-platform features exposed through the Ingress resource. Ideally, all Ingress controllers should fulfill this specification, but we're not there yet. We currently support and maintain [GCE](https://git.k8s.io/ingress-gce/README.md) and [nginx](https://git.k8s.io/ingress-nginx/README.md) controllers. If you use the F5 BIG-IP Controller, see [Use the BIG-IP Controller as a Kubernetes Ingress Controller](http://clouddocs.f5.com/containers/latest/kubernetes/kctlr-k8s-ingress-ctlr.html).
|
The following document describes a set of cross-platform features exposed through the Ingress resource. Ideally, all Ingress controllers should fulfill this specification, but we're not there yet. We currently support and maintain [GCE](https://git.k8s.io/ingress-gce/README.md) and [nginx](https://git.k8s.io/ingress-nginx/README.md) controllers. If you use the F5 BIG-IP Controller, see [Use the BIG-IP Controller as a Kubernetes Ingress Controller](http://clouddocs.f5.com/containers/latest/kubernetes/kctlr-k8s-ingress-ctlr.html).
|
||||||
|
|
||||||
{{< note >}}
|
{{< note >}}
|
||||||
Make sure you review your controller's specific docs so you understand the caveats.
|
**Note:** Make sure you review your controller's specific docs so you understand the caveats.
|
||||||
{{< /note >}}
|
{{< /note >}}
|
||||||
|
|
||||||
## Types of Ingress
|
## Types of Ingress
|
||||||
@@ -121,14 +121,16 @@ as well, by specifying a *default backend* with no rules.
|
|||||||
If you create it using `kubectl create -f` you should see:
|
If you create it using `kubectl create -f` you should see:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ kubectl get ing
|
kubectl get ingress test-ingress
|
||||||
NAME RULE BACKEND ADDRESS
|
```
|
||||||
test-ingress - testsvc:80 107.178.254.228
|
|
||||||
|
```shell
|
||||||
|
NAME HOSTS ADDRESS PORTS AGE
|
||||||
|
test-ingress * 107.178.254.228 80 59s
|
||||||
```
|
```
|
||||||
|
|
||||||
Where `107.178.254.228` is the IP allocated by the Ingress controller to satisfy
|
Where `107.178.254.228` is the IP allocated by the Ingress controller to satisfy
|
||||||
this Ingress. The `RULE` column shows that all traffic sent to the IP are
|
this Ingress.
|
||||||
directed to the Kubernetes Service listed under `BACKEND`.
|
|
||||||
|
|
||||||
### Simple fanout
|
### Simple fanout
|
||||||
|
|
||||||
@@ -170,17 +172,36 @@ spec:
|
|||||||
When you create the Ingress with `kubectl create -f`:
|
When you create the Ingress with `kubectl create -f`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ kubectl get ing
|
kubectl describe ingress test
|
||||||
NAME RULE BACKEND ADDRESS
|
|
||||||
test -
|
|
||||||
foo.bar.com
|
|
||||||
/foo s1:80
|
|
||||||
/bar s2:80
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```shell
|
||||||
|
Name: test
|
||||||
|
Namespace: default
|
||||||
|
Address: 178.91.123.132
|
||||||
|
Default backend: default-http-backend:80 (10.8.2.3:8080)
|
||||||
|
Rules:
|
||||||
|
Host Path Backends
|
||||||
|
---- ---- --------
|
||||||
|
foo.bar.com
|
||||||
|
/foo s1:80 (10.8.0.90:80)
|
||||||
|
/bar s2:80 (10.8.0.91:80)
|
||||||
|
Annotations:
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||||
|
Events:
|
||||||
|
Type Reason Age From Message
|
||||||
|
---- ------ ---- ---- -------
|
||||||
|
Normal ADD 22s loadbalancer-controller default/test
|
||||||
|
```
|
||||||
|
|
||||||
The Ingress controller will provision an implementation specific loadbalancer
|
The Ingress controller will provision an implementation specific loadbalancer
|
||||||
that satisfies the Ingress, as long as the services (`s1`, `s2`) exist.
|
that satisfies the Ingress, as long as the services (`s1`, `s2`) exist.
|
||||||
When it has done so, you will see the address of the loadbalancer under the
|
When it has done so, you will see the address of the loadbalancer at the
|
||||||
last column of the Ingress.
|
Address field.
|
||||||
|
|
||||||
|
{{< note >}}
|
||||||
|
**Note:** You need to create a default-http-backend [Service](/docs/concepts/services-networking/service/) if necessary.
|
||||||
|
{{< /note >}}
|
||||||
|
|
||||||
### Name based virtual hosting
|
### Name based virtual hosting
|
||||||
|
|
||||||
@@ -292,12 +313,29 @@ specific docs to see how they handle health checks (
|
|||||||
Say you'd like to add a new Host to an existing Ingress, you can update it by editing the resource:
|
Say you'd like to add a new Host to an existing Ingress, you can update it by editing the resource:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ kubectl get ing
|
kubectl describe ingress test
|
||||||
NAME RULE BACKEND ADDRESS
|
```
|
||||||
test - 178.91.123.132
|
|
||||||
foo.bar.com
|
```shell
|
||||||
/foo s1:80
|
Name: test
|
||||||
$ kubectl edit ing test
|
Namespace: default
|
||||||
|
Address: 178.91.123.132
|
||||||
|
Default backend: default-http-backend:80 (10.8.2.3:8080)
|
||||||
|
Rules:
|
||||||
|
Host Path Backends
|
||||||
|
---- ---- --------
|
||||||
|
foo.bar.com
|
||||||
|
/foo s1:80 (10.8.0.90:80)
|
||||||
|
Annotations:
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||||
|
Events:
|
||||||
|
Type Reason Age From Message
|
||||||
|
---- ------ ---- ---- -------
|
||||||
|
Normal ADD 35s loadbalancer-controller default/test
|
||||||
|
```
|
||||||
|
|
||||||
|
```shell
|
||||||
|
kubectl edit ingress test
|
||||||
```
|
```
|
||||||
|
|
||||||
This should pop up an editor with the existing yaml, modify it to include the new Host:
|
This should pop up an editor with the existing yaml, modify it to include the new Host:
|
||||||
@@ -325,13 +363,27 @@ spec:
|
|||||||
Saving the yaml will update the resource in the API server, which should tell the Ingress controller to reconfigure the loadbalancer.
|
Saving the yaml will update the resource in the API server, which should tell the Ingress controller to reconfigure the loadbalancer.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ kubectl get ing
|
kubectl describe ingress test
|
||||||
NAME RULE BACKEND ADDRESS
|
```
|
||||||
test - 178.91.123.132
|
|
||||||
foo.bar.com
|
```shell
|
||||||
/foo s1:80
|
Name: test
|
||||||
bar.baz.com
|
Namespace: default
|
||||||
/foo s2:80
|
Address: 178.91.123.132
|
||||||
|
Default backend: default-http-backend:80 (10.8.2.3:8080)
|
||||||
|
Rules:
|
||||||
|
Host Path Backends
|
||||||
|
---- ---- --------
|
||||||
|
foo.bar.com
|
||||||
|
/foo s1:80 (10.8.0.90:80)
|
||||||
|
bar.baz.com
|
||||||
|
/foo s2:80 (10.8.0.91:80)
|
||||||
|
Annotations:
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||||
|
Events:
|
||||||
|
Type Reason Age From Message
|
||||||
|
---- ------ ---- ---- -------
|
||||||
|
Normal ADD 45s loadbalancer-controller default/test
|
||||||
```
|
```
|
||||||
|
|
||||||
You can achieve the same by invoking `kubectl replace -f` on a modified Ingress yaml file.
|
You can achieve the same by invoking `kubectl replace -f` on a modified Ingress yaml file.
|
||||||
|
|||||||
Reference in New Issue
Block a user