mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-26 04:58:07 +00:00
Add content to docs on importing K3s
This commit is contained in:
@@ -11,6 +11,8 @@ Before a new version of Rancher is released, it's tested with the latest minor v
|
||||
|
||||
As of Rancher v2.3.0, the Kubernetes metadata feature was added, which allows Rancher to ship Kubernetes patch versions without upgrading Rancher. For details, refer to the [section on Kubernetes metadata.]({{<baseurl>}}/rancher/v2.x/en/admin-settings/k8s-metadata)
|
||||
|
||||
As of Rancher v2.4.0, the ability to import K3s Kubernetes clusters into Rancher was added, along with the ability to upgrade Kubernetes when editing those clusters.
|
||||
|
||||
> **Recommended:** Before upgrading Kubernetes, [backup your cluster]({{<baseurl>}}/rancher/v2.x/en/backups).
|
||||
|
||||
1. From the **Global** view, find the cluster for which you want to upgrade Kubernetes. Select **Vertical Ellipsis (...) > Edit**.
|
||||
|
||||
@@ -14,7 +14,7 @@ Note that Rancher does not automate the provisioning, scaling, or upgrade of imp
|
||||
|
||||
For all imported Kubernetes clusters except for K3s clusters, the configuration of an imported cluster still has to be edited outside of Rancher. Some examples of editing the cluster include adding and removing nodes, upgrading the Kubernetes version, and changing Kubernetes component parameters.
|
||||
|
||||
In Rancher v2.4, it became possible to import a K3s cluster and upgrade Kubernetes by editing the cluster in the Rancher UI.
|
||||
Rancher v2.4 added the capability to import a K3s cluster into Rancher, as well as the ability to upgrade Kubernetes by editing the cluster in the Rancher UI.
|
||||
|
||||
- [Prerequisites](#prerequisites)
|
||||
- [Importing a cluster](#importing-a-cluster)
|
||||
@@ -28,7 +28,8 @@ After importing a cluster, the cluster owner can:
|
||||
- Enable [monitoring]({{<baseurl>}}/rancher/v2.x/en/cluster-admin/tools/monitoring/) and [logging]({{<baseurl>}}/rancher/v2.x/en/cluster-admin/tools/logging/)
|
||||
- Enable [Istio]({{<baseurl>}}/rancher/v2.x/en/cluster-admin/tools/istio/)
|
||||
- Use [pipelines]({{<baseurl>}}/rancher/v2.x/en/project-admin/pipelines/)
|
||||
- Configure [alerts] and [notifiers]
|
||||
- Configure [alerts]({{<baseurl>}}/rancher/v2.x/en/cluster-admin/tools/alerts/) and [notifiers]({{<baseurl>}}/rancher/v2.x/en/cluster-admin/tools/notifiers/)
|
||||
- Manage [projects]() and [workloads]()
|
||||
|
||||
After importing a K3s cluster, the cluster owner can also [upgrade Kubernetes from the Rancher UI.]({{<baseurl>}}/rancher/v2.x/en/cluster-admin/upgrading-kubernetes/)
|
||||
|
||||
@@ -50,7 +51,7 @@ By default, GKE users are not given this privilege, so you will need to run the
|
||||
|
||||
### Importing a Cluster
|
||||
|
||||
> **Prerequisites:** If you are importing a K3s cluster, make sure the `cluster.yml` is readable. It is protected by default.
|
||||
> **Prerequisites:** If you are importing a K3s cluster, make sure the `cluster.yml` is readable. It is protected by default. For details, refer to [Configuring a K3s cluster to enable importation to Rancher.](#configuring-a-k3s-cluster-to-enable-importation-to-rancher)
|
||||
|
||||
1. From the **Clusters** page, click **Add Cluster**.
|
||||
2. Choose **Import**.
|
||||
@@ -70,17 +71,35 @@ By default, GKE users are not given this privilege, so you will need to run the
|
||||
|
||||
_Available as of v2.4.0_
|
||||
|
||||
You can now import a K3s cluster into Rancher. You can also upgrade Kubernetes by editing the cluster in the Rancher UI.
|
||||
|
||||
[K3s]({{<baseurl>}}/k3s/latest/en/) is lightweight, fully compliant Kubernetes distribution.
|
||||
You can now import a K3s cluster into Rancher. [K3s]({{<baseurl>}}/k3s/latest/en/) is lightweight, fully compliant Kubernetes distribution. You can also upgrade Kubernetes by editing the cluster in the Rancher UI.
|
||||
|
||||
When a K3s cluster is imported, Rancher will recognize it as K3s, and the Rancher UI will expose the following features in addition to the functionality for other imported clusters:
|
||||
|
||||
- The ability to upgrade the K3s version
|
||||
- The ability to configure the maximum number of nodes that will be upgraded concurrently
|
||||
- The ability to see a read-only version of the K3s cluster's configuration arguments and environment variables used to launch each node in the cluster.
|
||||
|
||||
On the cluster edit page, you will see the configuration of the Kubernetes controlplane nodes. In the K3s documentation, these nodes are called server nodes. Regardless of the terminology used, these nodes run the Kubernetes master, which maintains the desired state of the cluster.
|
||||
The **concurrency** is the maximum number of nodes that are permitted to be unavailable during an upgrade. If number of unavailable nodes is larger than the **concurrency,** the upgrade will fail. If an upgrade fails, you may need to repair or remove failed nodes before the upgrade can succeed.
|
||||
|
||||
In K3s, nodes with the "server" (also known as "controlplane") role have the capability to have workloads scheduled to them by default.
|
||||
- **Server concurrency:** The maximum number of server nodes to upgrade at a single time; also the maximum unavailable server nodes
|
||||
- **Worker concurrency:** The maximum number worker nodes to upgrade at the same time; also the maximum unavailable worker nodes
|
||||
|
||||
K3s nodes with the "agent" (also known as "worker") role will be managed by the controlplane. Any workloads or pods that are deployed in the cluster can be scheduled to these nodes.
|
||||
In the K3s documentation, controlplane nodes are called server nodes. These nodes run the Kubernetes master, which maintains the desired state of the cluster. In K3s, these controlplane nodes have the capability to have workloads scheduled to them by default.
|
||||
|
||||
Also in the K3s documentation, nodes with the worker role are called agent nodes. Any workloads or pods that are deployed in the cluster can be scheduled to these nodes by default.
|
||||
|
||||
### Configuring a K3s Cluster to Enable Importation to Rancher
|
||||
|
||||
The K3s server needs to be configured to allow writing to the kubeconfig file.
|
||||
|
||||
This can be accomplished by passing `--write-kubeconfig-mode 644` as a flag during installation:
|
||||
|
||||
```
|
||||
$ curl -sfL https://get.k3s.io | sh -s - --write-kubeconfig-mode 644
|
||||
```
|
||||
|
||||
The option can also be specified using the environment variable `K3S_KUBECONFIG_MODE`:
|
||||
|
||||
```
|
||||
$ curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -s -
|
||||
```
|
||||
Reference in New Issue
Block a user