Merge pull request #421 from deniseschannon/nginx

nginx references
This commit is contained in:
Denise
2018-07-11 14:59:51 -07:00
committed by GitHub
6 changed files with 19 additions and 13 deletions

View File

@@ -5,7 +5,7 @@ weight: 276
This set of instructions creates a new Kubernetes cluster that's dedicated to running Rancher in a high-availability (HA) configuration. This procedure walks you through setting up a 3-node cluster using the Rancher Kubernetes Engine (RKE). The cluster's sole purpose is running pods for Rancher. The setup is based on:
- Layer 7 Loadbalancer with SSL termination (HTTPS)
- NGINX Ingress controller (HTTP)
- [NGINX Ingress controller (HTTP)](https://kubernetes.github.io/ingress-nginx/)
![Rancher HA]({{< baseurl >}}/img/rancher/ha/rancher2ha-l7.svg)
@@ -64,15 +64,15 @@ Before you install Rancher, confirm you meet the host requirements. Provision 3
### Requirements
#### Operating System
#### Operating System
{{< requirements_os >}}
#### Hardware
#### Hardware
{{< requirements_hardware >}}
#### Software
#### Software
{{< requirements_software >}}

View File

@@ -12,6 +12,8 @@ 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 example configuration below does not include all available Nginx options and may not be suitable for your production environment. For full configuration documentation, see [NGINX Load Balancing - HTTP Load Balancer](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:**
@@ -21,18 +23,18 @@ After installing NGINX, you need to create the NGINX config file, `/etc/nginx/co
server IP_NODE_2:80;
server IP_NODE_3:80;
}
map $http_upgrade $connection_upgrade {
default Upgrade;
'' close;
}
server {
listen 443 ssl http2;
server_name FQDN;
ssl_certificate /certs/fullchain.pem;
ssl_certificate_key /certs/privkey.pem;
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
@@ -46,7 +48,7 @@ After installing NGINX, you need to create the NGINX config file, `/etc/nginx/co
proxy_read_timeout 900s;
}
}
server {
listen 80;
server_name FQDN;

View File

@@ -5,7 +5,7 @@ weight: 275
This set of instructions creates a new Kubernetes cluster that's dedicated to running Rancher in a high-availability (HA) configuration. This procedure walks you through setting up a 3-node cluster using the Rancher Kubernetes Engine (RKE). The cluster's sole purpose is running pods for Rancher. The setup is based on:
- Layer 4 load balancer (TCP)
- NGINX ingress controller with SSL termination (HTTPS)
- [NGINX ingress controller with SSL termination (HTTPS)](https://kubernetes.github.io/ingress-nginx/)
![Rancher HA]({{< baseurl >}}/img/rancher/ha/rancher2ha.svg)
@@ -108,6 +108,8 @@ After installing NGINX, you need to update the NGINX config file, `nginx.conf`,
2. From `nginx.conf`, replace `IP_NODE_1`, `IP_NODE_2`, and `IP_NODE_3` with the IPs of your [Linux hosts](#1-provision-linux-hosts).
>**Note:** This Nginx configuration is only an example and may not suit your environment. For complete documentation, see [NGINX Load Balancing - TCP and UDP Load Balancer](https://docs.nginx.com/nginx/admin-guide/load-balancer/tcp-udp-load-balancer/).
**Example NGINX config:**
```
worker_processes 4;
@@ -391,7 +393,7 @@ Save the `.yml` file and close it.
## 9. Back Up Your RKE Config File
After you close your `.yml` file, back it up to a secure location. You can use this file again when it's time to upgrade Rancher.
After you close your `.yml` file, back it up to a secure location. You can use this file again when it's time to upgrade Rancher.
## 10. Run RKE

View File

@@ -21,7 +21,7 @@ Configuring an Amazon NLB is a multistage process. We've broken it down into mul
## Create Target Groups
Your first NLB configuration step is to create two target groups. Technically, only port 443 is needed to access Rancher, but its convenient to add a listener for port 80 which will be redirected to port 443 automatically. The NGINX controller on the nodes will make sure that port 80 gets redirected to port 443.
Your first NLB configuration step is to create two target groups. Technically, only port 443 is needed to access Rancher, but its convenient to add a listener for port 80 which will be redirected to port 443 automatically. The NGINX ingress controller on the nodes will make sure that port 80 gets redirected to port 443.
Log into the [Amazon AWS Console](https://console.aws.amazon.com/ec2/) to get started, make sure to select the **Region** where your EC2 instances (Linux nodes) are created.

View File

@@ -131,6 +131,8 @@ The load balancer or proxy has to be configured to support the following:
This Nginx configuration is tested on Nginx version 1.13 (mainline) and 1.14 (stable).
>**Note:** This Nginx configuration is only an example and may not suit your environment. For complete documentation, see [NGINX Load Balancing - TCP and UDP Load Balancer](https://docs.nginx.com/nginx/admin-guide/load-balancer/tcp-udp-load-balancer/).
```
upstream rancher {
server rancher-server:80;

View File

@@ -37,9 +37,9 @@ You can disable the default controller by specifying `none` to the ingress `pro
ingress:
provider: none
```
## Nginx Ingress Controller
## Configuring NGINX Ingress Controller
For the configuration of nginx, there are some configuration options. There are a [list of options](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/configmap.md) for the nginx config map and [command line extra_args](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/cli-arguments.md).
For the configuration of nginx, there are configuration options available in Kubernetes. There are a [list of options for the NGINX config map](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/configmap.md) , [command line extra_args](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/cli-arguments.md) and [annotations](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/).
```yaml
ingress: