mirror of
https://github.com/docker/docs.git
synced 2026-11-06 12:54:24 +03:00
Update layer-7-routing.md
This commit is contained in:
@@ -19,15 +19,13 @@ Use an ingress controller when you want to:
|
||||
* Give your Kubernetes app an externally-reachable URL.
|
||||
* Load-balance traffic to your app.
|
||||
|
||||
Kubernetes provides an NGINX ingress controller that is based on the Kubernetes community [NGINX controller](https://github.com/kubernetes/ingress-nginx) and that can be used in Docker EE. This example serves as a recommendation for how to deploy an ingress controller on Docker Enterprise, but it is not directly supported by Docker, Inc.
|
||||
Learn about [ingress in Kubernetes](https://v1-11.docs.kubernetes.io/docs/concepts/services-networking/ingress/).
|
||||
|
||||
## Deploy NGINX ingress controller
|
||||
|
||||
Kubernetes provides an NGINX ingress controller that is based on the Kubernetes community [NGINX controller](https://github.com/kubernetes/ingress-nginx), and can be used in Docker Enterprise Edition,
|
||||
but it is not directly supported by Docker, Inc.
|
||||
A popular ingress controller within the Kubernetes Community is the [NGINX controller](https://github.com/kubernetes/ingress-nginx), and can be used in Docker Enterprise Edition, but it is not directly supported by Docker, Inc.
|
||||
|
||||
For another example of a YAML NGINX kube ingress deployment, refer to <https://success.docker.com/article/how-to-configure-a-default-tls-certificate-for-the-kubernetes-nginx-ingress-controller>.
|
||||
Learn about [ingress in Kubernetes](https://v1-11.docs.kubernetes.io/docs/concepts/services-networking/ingress/).
|
||||
|
||||
For an example of a YAML NGINX kube ingress deployment, refer to <https://success.docker.com/article/how-to-configure-a-default-tls-certificate-for-the-kubernetes-nginx-ingress-controller>.
|
||||
Note that this example uses hostPorts for controller ports. This exposes the host port ( selected in a high range using `hostPort: 38080`) directly into the nodes.
|
||||
Port 38080 is used for HTTP and port 38443 is used for HTTPS. Make sure that your loadbalancer forwards to the applicable ports on the nodes. You can change them as needed.
|
||||
|
||||
@@ -53,59 +51,3 @@ nginx-ingress-controller-6b987cbbc6-4qqz8 1/1 Running 0 1m
|
||||
nginx-ingress-controller-6b987cbbc6-h6rmg 1/1 Running 0 1m 192.168.116.146 dockeree-worker-linux-3
|
||||
nginx-ingress-controller-6b987cbbc6-hkw86 1/1 Running 0 1m 192.168.247.211 dockeree-worker-linux-2
|
||||
```
|
||||
|
||||
## Check your deployment
|
||||
|
||||
The `default-http-backend` provides a simple service that serves a 404 page
|
||||
at `/` and serves 200 on the `/healthz` endpoint.
|
||||
|
||||
1. Navigate to the **Controllers** page and confirm that the
|
||||
**default-http-backend** and **nginx-ingress-controller** objects are
|
||||
scheduled.
|
||||
|
||||
> Scheduling latency
|
||||
>
|
||||
> It may take several seconds for the HTTP backend and the ingress controller's
|
||||
> `Deployment` and `ReplicaSet` objects to be scheduled.
|
||||
{: .important}
|
||||
|
||||
{: .with-border}
|
||||
|
||||
2. When the workload is running, navigate to the **Load Balancers** page
|
||||
and click the **ingress-nginx** service.
|
||||
|
||||
{: .with-border}
|
||||
|
||||
3. In the details pane, click the first URL in the **Ports** section.
|
||||
|
||||
A new page opens, displaying `default backend - 404`.
|
||||
|
||||
## Check your deployment from the CLI
|
||||
|
||||
From the command line, confirm that the deployment is running by using
|
||||
`curl` with the URL that's shown on the details pane of the **ingress-nginx**
|
||||
service.
|
||||
|
||||
```bash
|
||||
curl -I http://<ucp-ip>:<ingress port>/
|
||||
```
|
||||
|
||||
This command returns the following result.
|
||||
|
||||
```
|
||||
HTTP/1.1 404 Not Found
|
||||
Server: nginx/1.13.8
|
||||
```
|
||||
|
||||
Test the server's health ping service by appending `/healthz` to the URL.
|
||||
|
||||
```bash
|
||||
curl -I http://<ucp-ip>:<ingress port>/healthz
|
||||
```
|
||||
|
||||
This command returns the following result.
|
||||
|
||||
```
|
||||
HTTP/1.1 200 OK
|
||||
Server: nginx/1.13.8
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user