From 4a2652daad0097e0bc76cc64250c9da5ee648968 Mon Sep 17 00:00:00 2001 From: Mark Bishop Date: Mon, 9 Jul 2018 12:40:13 -0700 Subject: [PATCH] updated docs based on feedback from Seb and Alena --- .../nginx/_index.md | 5 +++ .../workloads/add-a-dns-record/_index.md | 4 +-- .../tasks/workloads/add-a-sidecar/_index.md | 6 ++-- .../en/tasks/workloads/add-ingress/_index.md | 31 ++++++++++--------- 4 files changed, 27 insertions(+), 19 deletions(-) diff --git a/content/rancher/v2.x/en/installation/ha-server-install-external-lb/nginx/_index.md b/content/rancher/v2.x/en/installation/ha-server-install-external-lb/nginx/_index.md index 20579aa96b8..454cf7552eb 100644 --- a/content/rancher/v2.x/en/installation/ha-server-install-external-lb/nginx/_index.md +++ b/content/rancher/v2.x/en/installation/ha-server-install-external-lb/nginx/_index.md @@ -12,6 +12,9 @@ For help installing NGINX, refer to their [install documentation](https://www.ng After installing NGINX, you need to create the NGINX config file, `/etc/nginx/conf.d/rancher.conf`, with the IP addresses for your Linux nodes, chosen FQDN and location of the certificate file and certificate key file. +>**Note:** The configuration example in this procedure includes the minimum configurations needed to use +to use Nginx as a Layer 7 load balancer with Rancher. For full documentation on all Nginx Layer 7 configuration options available, see the [Nginx HTTP Load Balancer Documentation](https://docs.nginx.com/nginx/admin-guide/load-balancer/http-load-balancer/). + 1. Copy and paste the code sample below into your favorite text editor. Save it as `/etc/nginx/conf.d/rancher.conf`. **Example NGINX config:** @@ -59,6 +62,8 @@ After installing NGINX, you need to create the NGINX config file, `/etc/nginx/co 4. In `/etc/nginx/conf.d/rancher.conf`, replace `/certs/fullchain.pem` with the path to your certificate. If there are intermediates required for you certificate, they should be included in this file. 5. In `/etc/nginx/conf.d/rancher.conf`, replace `/certs/privkey.pem` with the path to your certificate key. + + ## Run NGINX * Reload or restart NGINX diff --git a/content/rancher/v2.x/en/tasks/workloads/add-a-dns-record/_index.md b/content/rancher/v2.x/en/tasks/workloads/add-a-dns-record/_index.md index a5cd2ba0a21..e9906d3f19b 100644 --- a/content/rancher/v2.x/en/tasks/workloads/add-a-dns-record/_index.md +++ b/content/rancher/v2.x/en/tasks/workloads/add-a-dns-record/_index.md @@ -8,11 +8,11 @@ For every workload created, a complementing Service Discovery entry is created. However, you also have the option of creating additional Service Discovery records. You can use these additional records so that a given namespace resolves with one or more external IP addresses, an external hostname, an alias to another DNS record, other workloads, or a set of pods that match a selector that you create. -1. From the **Global** view, open the project running ingress. +1. From the **Global** view, open the project that you want to add a DNS record to. 1. Select the **Service Discovery** tab. Then click **Add Record**. -1. Enter a **Name** for the DNS record. +1. Enter a **Name** for the DNS record. This name is used for DNS resolution. 1. Select a **Namespace** from the drop-down list. Alternatively, you can create a new namespace on the fly by clicking **Add to a new namespace**. diff --git a/content/rancher/v2.x/en/tasks/workloads/add-a-sidecar/_index.md b/content/rancher/v2.x/en/tasks/workloads/add-a-sidecar/_index.md index 9bc60a3c714..841b2fa5c06 100644 --- a/content/rancher/v2.x/en/tasks/workloads/add-a-sidecar/_index.md +++ b/content/rancher/v2.x/en/tasks/workloads/add-a-sidecar/_index.md @@ -3,7 +3,7 @@ title: Adding a Sidecar weight: draft: true --- -A _sidecar_ is a container that extends or enhances the main container in a pod. You can add sidecars to existing workloads by using the **Add a Sidecar** option. +A _sidecar_ is a container that extends or enhances the main container in a pod. The main container and the sidecar share a pod, and therefore share the same network space and storage. You can add sidecars to existing workloads by using the **Add a Sidecar** option. 1. From the **Global** view, open the project running the workload you want to add a sidecar to. @@ -21,7 +21,9 @@ A _sidecar_ is a container that extends or enhances the main container in a pod. - **Init Container:** - The sidecar container is deployed before the mainer container. + The sidecar container is deployed before the main container. + +1. From the **Docker Image** field, enter the name of the Docker image that you want to deploy in support of the main container. During deployment, Rancher pulls this image from [Docker Hub](https://hub.docker.com/explore/). Enter the name exactly as it appears on Docker Hub. 1. Set the remaining options. You can read about them in [Deploying Workloads](../deploy-workloads). diff --git a/content/rancher/v2.x/en/tasks/workloads/add-ingress/_index.md b/content/rancher/v2.x/en/tasks/workloads/add-ingress/_index.md index 0b04294806a..f3e100a384b 100644 --- a/content/rancher/v2.x/en/tasks/workloads/add-ingress/_index.md +++ b/content/rancher/v2.x/en/tasks/workloads/add-ingress/_index.md @@ -19,18 +19,18 @@ Ingress can be added for workloads to provide load balancing, SSL termination an - **Automatically generate a xip.io hostname** If you choose this option, ingress routes requests to hostname to a DNS name that's automatically generated. Rancher uses [xip.io](http://xip.io/) to automatically generates the DNS name. This option is best used for testing, _not_ production environments. + + >**Note:** To use this option, you must be able to resolve to `xip.io` addresses. - 1. Add a **Target Backend**. Click either **Service** or **Workload** to add the target. + 1. Add a **Target Backend**. By default, a workload is added to the ingress, but you can add more targets by clicking either **Service** or **Workload**. - 1. **Optional:** If you want specify a service or workload when a request is sent to a particular hostname path, add a **Path** for the target. For example, if you want requests for `www.mysite.com/contact-us` to be sent to a different service than `www.mysite.com`, enter `/contact-us` in the **Path** field. + 1. **Optional:** If you want specify a workload or service when a request is sent to a particular hostname path, add a **Path** for the target. For example, if you want requests for `www.mysite.com/contact-us` to be sent to a different service than `www.mysite.com`, enter `/contact-us` in the **Path** field. Typically, the first rule that you create does not include a path. - 1. Select a service or workload from the **Target** drop-down list. + 1. Select a workload or service from the **Target** drop-down list for each target you've added. - 1. Enter the **Port** that the service or workload operates on. - - 1. If you want to add additional **Target Backends**, repeat these substeps. + 1. Enter the **Port** number that each target operates on. - **Specify a hostname to use** @@ -38,17 +38,16 @@ Ingress can be added for workloads to provide load balancing, SSL termination an 1. Enter the hostname that your ingress will handle request forwarding for. For example, `www.mysite.com`. - 1. Add a **Target Backend**. Click either **Service** or **Workload** to add the target. - - 1. **Optional:** If you want specify a service or workload when a request is sent to a particular hostname path, add a **Path** for the target. For example, if you want requests for `www.mysite.com/contact-us` to be sent to a different service than `www.mysite.com`, enter `/contact-us` in the **Path** field. - - Typically, the first rule that you create does not include a path. + 1. Add a **Target Backend**. By default, a workload is added to the ingress, but you can add more targets by clicking either **Service** or **Workload**. - 1. Select a service or workload from the **Target** drop-down list. + 1. **Optional:** If you want specify a workload or service when a request is sent to a particular hostname path, add a **Path** for the target. For example, if you want requests for `www.mysite.com/contact-us` to be sent to a different service than `www.mysite.com`, enter `/contact-us` in the **Path** field. - 1. Enter the **Port** that the service or workload operates on. - - 1. If you want to add additional **Target Backends**, repeat these substeps. + Typically, the first rule that you create does not include a path. + + 1. Select a workload or service from the **Target** drop-down list for each target you've added. + + 1. Enter the **Port** number that each target operates on. + - **Use as the default backend** @@ -74,4 +73,6 @@ Ingress can be added for workloads to provide load balancing, SSL termination an 1. **Optional:** Add [Labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) and/or [Annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) to provide metadata for your ingress. + For a list of annotations available for use, see the [Nginx Ingress Controller Documentation](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/). + **Result:** Your ingress is added to the project. The ingress begins enforcing your ingress rules.