From d33b296b9bc3be787f20927b01f33d0ac666f01d Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Fri, 17 Mar 2023 22:45:08 +0100 Subject: [PATCH 1/5] Accent the need of INSTALL_K3S_VERSION parameter Move the clause about INSTALL_K3S_VERSION before get.k3s.io cluster installation command example to emphasize its requirement to get the correct version of k3s on which the rancher should will be installed, because it can be an annoying mistake that user might start from setup from scratch. Signed-off-by: Kyr Shatskyy --- .../quick-start-guides/deploy-rancher-manager/helm-cli.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md b/docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md index ec47ac7df19..06b62a7841e 100644 --- a/docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md +++ b/docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md @@ -15,14 +15,14 @@ The full installation requirements are [here](../../../pages-for-subheaders/inst ## Install K3s on Linux +Rancher needs to be installed on a supported Kubernetes version. To specify the K3s version, use the INSTALL_K3S_VERSION environment variable when running the K3s installation script. Refer to the [support maintenance terms](https://rancher.com/support-maintenance-terms/). + Install a K3s cluster by running this command on the Linux machine: ``` curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION="***" sh -s - server --cluster-init ``` -Rancher needs to be installed on a supported Kubernetes version. To specify the K3s version, use the INSTALL_K3S_VERSION environment variable when running the K3s installation script. Refer to the [support maintenance terms](https://rancher.com/support-maintenance-terms/). - Using `--cluster-init` allows K3s to use embedded etcd as the datastore and has the ability to convert to an HA setup. Refer to [High Availability with Embedded DB](https://rancher.com/docs/k3s/latest/en/installation/ha-embedded/). Save the IP of the Linux machine. From 10802befe2bf1e14dedcbefede559ad52af0b52e Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Fri, 17 Mar 2023 23:06:00 +0100 Subject: [PATCH 2/5] Give a user better idea how INSTALL_K3S_VERSION could look Instead of sending user to find the real number k3s tag format, just give recent version of k3s which is needed by latest rancher. It would be great to update this value automatically, but I have no good idea how to do this at the moment. Signed-off-by: Kyr Shatskyy --- .../quick-start-guides/deploy-rancher-manager/helm-cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md b/docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md index 06b62a7841e..826e91bd272 100644 --- a/docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md +++ b/docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md @@ -20,7 +20,7 @@ Rancher needs to be installed on a supported Kubernetes version. To specify the Install a K3s cluster by running this command on the Linux machine: ``` -curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION="***" sh -s - server --cluster-init +curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION="v1.24.11+k3s1" sh -s - server --cluster-init ``` Using `--cluster-init` allows K3s to use embedded etcd as the datastore and has the ability to convert to an HA setup. Refer to [High Availability with Embedded DB](https://rancher.com/docs/k3s/latest/en/installation/ha-embedded/). From 4388ffb703adef48db855ddab7e07b9c4ca5bed1 Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Fri, 17 Mar 2023 23:35:30 +0100 Subject: [PATCH 3/5] Make a note about KUBECONFIG environment variable. A new to k3s user might get "surprised" by error messages from kubectl or k3s like: WARN[0000] Unable to read /etc/rancher/k3s/k3s.yaml, please start server with --write-kubeconfig-mode to modify kube config permissions error: error loading config file "/etc/rancher/k3s/k3s.yaml": open /etc/rancher/k3s/k3s.yaml: permission denied It can happen when there is a k3s installed on the same machine and `/etc/rancher/k3s/k3s.yaml` present. Signed-off-by: Kyr Shatskyy --- .../quick-start-guides/deploy-rancher-manager/helm-cli.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md b/docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md index 826e91bd272..f97db8db9f7 100644 --- a/docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md +++ b/docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md @@ -38,6 +38,8 @@ The kubeconfig file is important for accessing the Kubernetes cluster. Copy the scp root@:/etc/rancher/k3s/k3s.yaml ~/.kube/config ``` +In some cases it may need to make sure that your shell has the environment variable `KUBECONFIG=~/.kube/config` defined, for instance, it can be exported in your profile or rc files. + From bc9cff3a13b24876ad582eae89c1b2b084fb91f9 Mon Sep 17 00:00:00 2001 From: kyr Date: Tue, 21 Mar 2023 20:26:01 +0100 Subject: [PATCH 4/5] Update docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md Co-authored-by: Billy Tat --- .../quick-start-guides/deploy-rancher-manager/helm-cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md b/docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md index f97db8db9f7..b9ad07fa497 100644 --- a/docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md +++ b/docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md @@ -15,7 +15,7 @@ The full installation requirements are [here](../../../pages-for-subheaders/inst ## Install K3s on Linux -Rancher needs to be installed on a supported Kubernetes version. To specify the K3s version, use the INSTALL_K3S_VERSION environment variable when running the K3s installation script. Refer to the [support maintenance terms](https://rancher.com/support-maintenance-terms/). +Rancher needs to be installed on a supported Kubernetes version. To specify the K3s version, use the INSTALL_K3S_VERSION (e.g., `INSTALL_K3S_VERSION="v1.24.10+k3s1"`) environment variable when running the K3s installation script. Refer to the [support maintenance terms](https://rancher.com/support-maintenance-terms/). Install a K3s cluster by running this command on the Linux machine: From fbea12b5d8a911bc65b215d67cbbe49d4bb7f3c9 Mon Sep 17 00:00:00 2001 From: kyr Date: Tue, 21 Mar 2023 20:26:36 +0100 Subject: [PATCH 5/5] Update docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md Co-authored-by: Billy Tat --- .../quick-start-guides/deploy-rancher-manager/helm-cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md b/docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md index b9ad07fa497..7093fd95f44 100644 --- a/docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md +++ b/docs/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli.md @@ -20,7 +20,7 @@ Rancher needs to be installed on a supported Kubernetes version. To specify the Install a K3s cluster by running this command on the Linux machine: ``` -curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION="v1.24.11+k3s1" sh -s - server --cluster-init +curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION= sh -s - server --cluster-init ``` Using `--cluster-init` allows K3s to use embedded etcd as the datastore and has the ability to convert to an HA setup. Refer to [High Availability with Embedded DB](https://rancher.com/docs/k3s/latest/en/installation/ha-embedded/).