mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-05-23 05:15:16 +00:00
@@ -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:
|
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)
|
- Layer 7 Loadbalancer with SSL termination (HTTPS)
|
||||||
- NGINX Ingress controller (HTTP)
|
- [NGINX Ingress controller (HTTP)](https://kubernetes.github.io/ingress-nginx/)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -64,15 +64,15 @@ Before you install Rancher, confirm you meet the host requirements. Provision 3
|
|||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
|
|
||||||
#### Operating System
|
#### Operating System
|
||||||
|
|
||||||
{{< requirements_os >}}
|
{{< requirements_os >}}
|
||||||
|
|
||||||
#### Hardware
|
#### Hardware
|
||||||
|
|
||||||
{{< requirements_hardware >}}
|
{{< requirements_hardware >}}
|
||||||
|
|
||||||
#### Software
|
#### Software
|
||||||
|
|
||||||
{{< requirements_software >}}
|
{{< requirements_software >}}
|
||||||
|
|
||||||
|
|||||||
@@ -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.
|
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`.
|
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:**
|
**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_2:80;
|
||||||
server IP_NODE_3:80;
|
server IP_NODE_3:80;
|
||||||
}
|
}
|
||||||
|
|
||||||
map $http_upgrade $connection_upgrade {
|
map $http_upgrade $connection_upgrade {
|
||||||
default Upgrade;
|
default Upgrade;
|
||||||
'' close;
|
'' close;
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 443 ssl http2;
|
listen 443 ssl http2;
|
||||||
server_name FQDN;
|
server_name FQDN;
|
||||||
ssl_certificate /certs/fullchain.pem;
|
ssl_certificate /certs/fullchain.pem;
|
||||||
ssl_certificate_key /certs/privkey.pem;
|
ssl_certificate_key /certs/privkey.pem;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
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;
|
proxy_read_timeout 900s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name FQDN;
|
server_name FQDN;
|
||||||
|
|||||||
@@ -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:
|
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)
|
- 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/)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -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).
|
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:**
|
**Example NGINX config:**
|
||||||
```
|
```
|
||||||
worker_processes 4;
|
worker_processes 4;
|
||||||
@@ -391,7 +393,7 @@ Save the `.yml` file and close it.
|
|||||||
|
|
||||||
## 9. Back Up Your RKE Config File
|
## 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
|
## 10. Run RKE
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Configuring an Amazon NLB is a multistage process. We've broken it down into mul
|
|||||||
|
|
||||||
## Create Target Groups
|
## 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.
|
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.
|
||||||
|
|
||||||
|
|||||||
@@ -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).
|
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 {
|
upstream rancher {
|
||||||
server rancher-server:80;
|
server rancher-server:80;
|
||||||
|
|||||||
@@ -37,9 +37,9 @@ You can disable the default controller by specifying `none` to the ingress `pro
|
|||||||
ingress:
|
ingress:
|
||||||
provider: none
|
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
|
```yaml
|
||||||
ingress:
|
ingress:
|
||||||
|
|||||||
Reference in New Issue
Block a user