mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-05-16 10:03:28 +00:00
requested changes and tweaks
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "K3S - 5 less than k8s"
|
||||
shortTitle: K3S
|
||||
title: "k3s - 5 less than k8s"
|
||||
shortTitle: k3s
|
||||
date: 2019-02-05T09:52:46-07:00
|
||||
name: "menu"
|
||||
---
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
title: "Running K3S"
|
||||
title: "Advanced Options"
|
||||
weight: 3
|
||||
---
|
||||
|
||||
This section contains information for running k3s in various environments.
|
||||
This section contains advanced information describing the different ways you can run and manage k3s.
|
||||
|
||||
Starting the Server
|
||||
------------------
|
||||
@@ -3,14 +3,14 @@ title: "Installation Options"
|
||||
weight: 2
|
||||
---
|
||||
|
||||
This section contains instructions for installing K3S in testing and production environments. Please ensure you have met the [Node Requirements]({{< baseurl >}}/k3s/latest/en/installation/node-requirements/) before you begin installing K3S.
|
||||
This section contains instructions for installing k3s in testing and production environments. Please ensure you have met the [Node Requirements]({{< baseurl >}}/k3s/latest/en/installation/node-requirements/) before you begin installing k3s.
|
||||
|
||||
### Installation Options
|
||||
|
||||
* [Single Server Installation]({{< baseurl >}}/k3s/latest/en/installation/single-server/)
|
||||
* [Single Master Installation]({{< baseurl >}}/k3s/latest/en/installation/single-server/)
|
||||
|
||||
Install K3S on a single Linux host. Single server installs are recommended for development and test environments, as setup is simple and the server doesn't have to be readily available for a user-base.
|
||||
Install k3s on a single Linux host. Single master installs are recommended for development and test environments, as setup is simple and the cluster doesn't have to be readily available for a user-base.
|
||||
|
||||
* [High Availability (HA) Installation]({{< baseurl >}}/k3s/latest/en/installation/ha/)
|
||||
|
||||
Install K3S on two or more Linux hosts. High Availability installs are recommended for production environments.
|
||||
Install k3s on two or more Linux hosts. High Availability installs are recommended for production environments.
|
||||
|
||||
@@ -3,30 +3,25 @@ title: "High Availability (HA) Install (Experimental)"
|
||||
weight: 30
|
||||
---
|
||||
|
||||
>**Important:** High-Availability (HA) was introduced in the v0.10.0 release of K3S and is _experimental_. Our next release plans to support HA in production environments. HA should currently only be used for testing purposes in non-production environments.
|
||||
>**Note:** K3S does not utilize etcd by default so only a 2-node cluster is needed for HA at a minimum. The following will guide you through setting up a 2-node cluster with PostgreSQL. You could optionally add one or more nodes for additional redundancy. In the future we plan to add support for additional database providers.
|
||||
>**Important:** High-Availability (HA) was introduced in the v0.10.0 release of k3s and is _experimental_. Our next release plans to support HA in production environments. HA should currently only be used for testing purposes in non-production environments.
|
||||
>**Note:** k3s does not utilize etcd by default so only a 2-node cluster is needed for HA at a minimum. The following will guide you through setting up a 2-node cluster with PostgreSQL. You could optionally add one or more nodes for additional redundancy. In the future we plan to add support for additional database providers.
|
||||
|
||||
For production environments, we recommend installing K3S in a high-availability configuration so that you can always access your cluster. This procedure walks you through setting up a 2-node cluster with K3S with an external PostgreSQL database. As of v0.10.0 release (Experimental HA) we are supporting PostgreSQL 10.7-R1 thru 11.5-R1
|
||||
For production environments, we recommend installing k3s in a high-availability configuration so that you can always access your cluster. This procedure walks you through setting up a 2-node cluster with k3s with an external PostgreSQL database. As of v0.10.0 release (Experimental HA) we are supporting PostgreSQL 10.7-R1 thru 11.5-R1
|
||||
|
||||
Installation Outline
|
||||
--------------------
|
||||
1. Create backend database (PostgreSQL)
|
||||
2. Create master nodes
|
||||
3. Create a load balancer for the master nodes
|
||||
4. (Optionally) Join worker nodes
|
||||
4. Join worker nodes
|
||||
|
||||
### Create Database
|
||||
The first step for setting up High Availability (HA) is to create the database for the backend. As of v0.10.0 release (Experimental HA) we are currently supporting PostgreSQL 10.7-R1 thru 11.5-R1
|
||||
|
||||
Provision a database via your provider of choice. K3S does not have any unique requirements.
|
||||
|
||||
A strong master password should be utilized and the database should only be privately accessible by the master nodes.
|
||||
|
||||
|
||||
### Create Master Nodes
|
||||
Following the [Node Requirements]({{< baseurl >}}/k3s/latest/en/installation/node-requirements/) page, provision at least two machines to fill the role of the master nodes. They will need to be able to access the database that was created.
|
||||
Following the [Node Requirements]({{< baseurl >}}/k3s/latest/en/installation/node-requirements/) page, provision at least two machines.
|
||||
|
||||
On the first machine, run the following command to install K3S and connect it to the database. Do not run this command on the second machine.
|
||||
On the first machine, run the following command to install k3s and connect it to the database.
|
||||
|
||||
>**Note:** You may wish to taint the master nodes. They will run the kubelet by default and be scheduleable. You can only add node labels and taints during the install process. If you wish to do this, use the `--node-taint` flag. For example `--node-taint key1=value1:NoExecute` the folllowing examples do not include this flag.
|
||||
|
||||
@@ -41,21 +36,19 @@ On the second machine, run the following command. Since we ran the first node wi
|
||||
curl -fL https://get.k3s.io | sh -s - server --storage-endpoint='postgres://username:password@hostname:5432/dbname'
|
||||
```
|
||||
|
||||
Ensure that both of the nodes are up and ready such as with `k3s kubectl get nodes`
|
||||
Ensure that both of the nodes in a Ready state such as with `k3s kubectl get nodes`
|
||||
|
||||
### Create the Load Balancer
|
||||
You should create a TCP Load Balancer for the master nodes. This will allow worker nodes to address any master node should one of them fail. The Load Balancer should point to each of the master nodes on port 6443 (Default port for the server).
|
||||
|
||||
### (Optionally) Join Worker Nodes
|
||||
### Join Worker Nodes
|
||||
Following the [Node Requirements]({{< baseurl >}}/k3s/latest/en/installation/node-requirements/) page, provision one or more machines to fill the role of the worker node(s).
|
||||
|
||||
Run the following command to join a worker node to the master nodes. You can get the node-token from any of the servers at /var/lib/rancher/k3s/server/node-token
|
||||
Run the following command to join a worker node to the master nodes. You can get the node-token from any of the servers at `/var/lib/rancher/k3s/server/node-token`
|
||||
|
||||
```
|
||||
curl -sfL https://get.k3s.io | K3S_URL=https:/myserver:6443 K3S_TOKEN=XXX sh-
|
||||
curl -sfL https://get.k3s.io | K3S_URL=https:/<FQDN_of_LB>:6443 K3S_TOKEN=XXX sh-
|
||||
```
|
||||
|
||||
Provide the FQDN of the Load Balancer for the master nodes in place of "myserver".
|
||||
Provide the FQDN of the Load Balancer for the master nodes.
|
||||
|
||||
### Additional Options
|
||||
You may wish to taint the master nodes as they are schedulable by default. This is because the k3s agent is also running on the master nodes (this is required for the kubelet to be running on the master nodes such as so you can manage the master nodes via kubectl).
|
||||
|
||||
@@ -3,15 +3,17 @@ title: Node Requirements
|
||||
weight: 1
|
||||
---
|
||||
|
||||
K3S is very lightweight, but has some minimum requirements as outlined below.
|
||||
k3s is very lightweight, but has some minimum requirements as outlined below.
|
||||
|
||||
Whether you're configuring a K3S cluster to run in a single-node or high-availability (HA) setup, each node running k3s should meet the following minimum requirements. You may need more resources to fit your needs.
|
||||
Whether you're configuring a k3s cluster to run in a single-node or high-availability (HA) setup, each node running k3s should meet the following minimum requirements. You may need more resources to fit your needs.
|
||||
|
||||
## Operating Systems
|
||||
|
||||
K3S should run on just about any flavor of Linux. However, k3s is tested on the following operating systems and their subsequent non-major releases.
|
||||
k3s should run on just about any flavor of Linux. However, k3s is tested on the following operating systems and their subsequent non-major releases.
|
||||
|
||||
* Ubuntu 16.04 (amd64)
|
||||
* Ubuntu 18.04 (amd64)
|
||||
* Raspian Buster (armhf)
|
||||
|
||||
## Hardware
|
||||
|
||||
@@ -22,10 +24,10 @@ Hardware requirements scale based on the size of your deployments. Minimum recom
|
||||
|
||||
#### Disks
|
||||
|
||||
K3S performance depends on the performance of the database. To ensure optimal speed, we recommend using an SSD when possible. Disk performance will vary on ARM devices utilizing an SD card or eMMC.
|
||||
k3s performance depends on the performance of the database. To ensure optimal speed, we recommend using an SSD when possible. Disk performance will vary on ARM devices utilizing an SD card or eMMC.
|
||||
|
||||
## Networking
|
||||
|
||||
The K3S server needs port 6443 to be accessible by the nodes. The nodes need to be able to reach other nodes over UDP port 8472 (Flannel VXLAN). If you do not use flannel and provide your own custom CNI, then port 8472 is not needed by K3S. The node should not listen on any other port. K3S uses reverse tunneling such that the nodes make outbound connections to the server and all kubelet traffic runs through that tunnel.
|
||||
The k3s server needs port 6443 to be accessible by the nodes. The nodes need to be able to reach other nodes over UDP port 8472 (Flannel VXLAN). If you do not use flannel and provide your own custom CNI, then port 8472 is not needed by k3s. The node should not listen on any other port. k3s uses reverse tunneling such that the nodes make outbound connections to the server and all kubelet traffic runs through that tunnel.
|
||||
|
||||
IMPORTANT: The VXLAN port on nodes should not be exposed to the world as it opens up your cluster network to be accessed by anyone. Run your nodes behind a firewall/security group that disabled access to port 8472.
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
---
|
||||
title: "Single Server Install"
|
||||
title: "Single Master Install"
|
||||
weight: 20
|
||||
---
|
||||
|
||||
>**Note:** This section contains information on flags and environment variables used for starting a single-server
|
||||
(non-HA) K3S cluster. A High-Availability (HA) K3S cluster is required for production. A single server install is
|
||||
>**Note:** This section contains information on flags and environment variables used for starting a single-master
|
||||
(non-HA) k3s cluster. A High-Availability (HA) k3s cluster is required for production. A single server install is
|
||||
intended only for development and testing environments.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
K3S is easy to install. To install the latest version, simply run the following:
|
||||
k3s is easy to install. To install the latest version, simply run the following:
|
||||
|
||||
```sh
|
||||
curl -sfL https://get.k3s.io
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Quick-Start Guide"
|
||||
weight: 1
|
||||
---
|
||||
|
||||
>**Note:** The intent of this guide is to quickly launch a cluster that you can use to evaluate K3S. This guide is not intended for production environments. Production environments should utilize a High-Availability solutuion. The [installation options](../installation) section covers in greater detail how K3S can be setup.
|
||||
>**Note:** The intent of this guide is to quickly launch a cluster that you can use to evaluate k3s. This guide is not intended for production environments. Production environments should utilize a High-Availability solutuion. The [installation options](../installation) section covers in greater detail how k3s can be setup.
|
||||
|
||||
Install Script
|
||||
--------------
|
||||
|
||||
Reference in New Issue
Block a user