diff --git a/content/rancher/v2.x/en/cluster-admin/upgrading-kubernetes/_index.md b/content/rancher/v2.x/en/cluster-admin/upgrading-kubernetes/_index.md index 513d31f1fab..ef5d7688644 100644 --- a/content/rancher/v2.x/en/cluster-admin/upgrading-kubernetes/_index.md +++ b/content/rancher/v2.x/en/cluster-admin/upgrading-kubernetes/_index.md @@ -3,7 +3,7 @@ title: Upgrading Kubernetes weight: 70 --- -> **Prerequisite:** The options below are available only for clusters that are [launched using RKE.]({{}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/) +> **Prerequisite:** The options below are available only for [Rancher-launched RKE Kubernetes clusters]({{}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/) and [imported K3s Kubernetes clusters.]({{}}/rancher/v2.x/en/cluster-provisioning/imported-clusters/#additional-features-for-imported-k3s-clusters) Following an upgrade to the latest version of Rancher, you can update your existing clusters to use the latest supported version of Kubernetes. @@ -11,7 +11,7 @@ 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.]({{}}/rancher/v2.x/en/admin-settings/k8s-metadata) ->**Recommended:** Before upgrading Kubernetes, [backup your cluster]({{}}/rancher/v2.x/en/backups). +> **Recommended:** Before upgrading Kubernetes, [backup your cluster]({{}}/rancher/v2.x/en/backups). 1. From the **Global** view, find the cluster for which you want to upgrade Kubernetes. Select **Vertical Ellipsis (...) > Edit**. @@ -21,4 +21,4 @@ As of Rancher v2.3.0, the Kubernetes metadata feature was added, which allows Ra 1. Click **Save**. -**Result:** Kubernetes begins upgrading for the cluster. During the upgrade, your cluster is unavailable. \ No newline at end of file +**Result:** Kubernetes begins upgrading for the cluster. During the upgrade, your cluster is unavailable. diff --git a/content/rancher/v2.x/en/cluster-provisioning/_index.md b/content/rancher/v2.x/en/cluster-provisioning/_index.md index ad6df2689bd..c9e23d21752 100644 --- a/content/rancher/v2.x/en/cluster-provisioning/_index.md +++ b/content/rancher/v2.x/en/cluster-provisioning/_index.md @@ -17,20 +17,21 @@ For a conceptual overview of how the Rancher server provisions clusters and what This section covers the following topics: + - [Setting up clusters in a hosted Kubernetes provider](#setting-up-clusters-in-a-hosted-kubernetes-cluster) - [Launching Kubernetes with Rancher](#launching-kubernetes-with-rancher) - - [Launching Kubernetes and Provisioning Nodes in an Infrastructure Provider](#launching-kubernetes-and-provisioning-nodes-in-an-infrastructure-provider) - - [Launching Kubernetes on Existing Custom Nodes](#launching-kubernetes-on-existing-custom-nodes) -- [Importing Existing Cluster](#importing-existing-cluster) - + - [Launching Kubernetes and Provisioning Nodes in an Infrastructure Provider](#launching-kubernetes-and-provisioning-nodes-in-an-infrastructure-provider) + - [Launching Kubernetes on Existing Custom Nodes](#launching-kubernetes-on-existing-custom-nodes) +- [Importing Existing Clusters](#importing-existing-clusters) + The following table summarizes the options and settings available for each cluster type: - Rancher Capability | RKE Launched | Hosted Kubernetes Cluster | Imported Cluster - ---------|----------|---------|---------| - Manage member roles | ✓ | ✓ | ✓ - Edit cluster options | ✓ | | - Manage node pools | ✓ | | +| Rancher Capability | RKE Launched | Hosted Kubernetes Cluster | Imported Cluster | +| -------------------- | ------------ | ------------------------- | ---------------- | +| Manage member roles | ✓ | ✓ | ✓ | +| Edit cluster options | ✓ | | +| Manage node pools | ✓ | | # Setting up Clusters in a Hosted Kubernetes Provider @@ -76,6 +77,23 @@ These nodes include on-premise bare metal servers, cloud-hosted virtual machines In this type of cluster, Rancher connects to a Kubernetes cluster that has already been set up. Therefore, Rancher does not provision Kubernetes, but only sets up the Rancher agents to communicate with the cluster. -Note that Rancher does not automate the provisioning, scaling, or upgrade of imported clusters. All other Rancher features, including management of cluster, policy, and workloads, are available for imported clusters. +Note that Rancher does not automate the provisioning, scaling, or upgrade of imported clusters. Other Rancher features, including management of cluster, role-based access control, policy, and workloads, are available for imported clusters. + +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. For more information, refer to the section on [importing existing clusters.]({{}}/rancher/v2.x/en/cluster-provisioning/imported-clusters/) + +### Importing and Editing K3s Clusters + +_Available as of Rancher v2.4.0_ + +[K3s]({{}}/k3s/latest/en/) is lightweight, fully compliant Kubernetes distribution. K3s Kubernetes clusters can now be imported into Rancher. + +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 see a read-only version of the K3s cluster's configuration arguments and environment variables used to launch each node in the cluster. + +For more information, refer to the section on [imported K3s clusters.]({{}}/rancher/v2.x/en/cluster-provisioning/imported-clusters/#additional-features-of-imported-k3s-clusters) diff --git a/content/rancher/v2.x/en/cluster-provisioning/imported-clusters/_index.md b/content/rancher/v2.x/en/cluster-provisioning/imported-clusters/_index.md index e1cf1478588..26e7321c85a 100644 --- a/content/rancher/v2.x/en/cluster-provisioning/imported-clusters/_index.md +++ b/content/rancher/v2.x/en/cluster-provisioning/imported-clusters/_index.md @@ -1,8 +1,8 @@ --- title: Importing Existing Clusters into Rancher description: Learn how you can create a cluster in Rancher by importing an existing Kubernetes cluster. Then, you can manage it using Rancher -metaTitle: "Kubernetes Cluster Management" -metaDescription: "Learn how you can import an existing Kubernetes cluster and then manage it using Rancher" +metaTitle: 'Kubernetes Cluster Management' +metaDescription: 'Learn how you can import an existing Kubernetes cluster and then manage it using Rancher' weight: 2300 aliases: - /rancher/v2.x/en/tasks/clusters/import-cluster/ @@ -10,7 +10,27 @@ aliases: When managing an imported cluster, Rancher connects to a Kubernetes cluster that has already been set up. Therefore, Rancher does not provision Kubernetes, but only sets up the Rancher agents to communicate with the cluster. -Keep in mind that editing your Kubernetes cluster still has to be done outside of Rancher. Some examples of editing the cluster include adding and removing nodes, upgrading the Kubernetes version, and changing Kubernetes component parameters. +Note that Rancher does not automate the provisioning, scaling, or upgrade of imported clusters. Other Rancher features, including management of cluster, role-based access control, policy, and workloads, are available for imported clusters. + +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. + +- [Prerequisites](#prerequisites) +- [Importing a cluster](#importing-a-cluster) +- [Additional features for imported K3s clusters](#additional-features-for-imported-k3s-clusters) + +### Features + +After importing a cluster, the cluster owner can: + +- [Manage cluster access]({{}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/) through role-based access control +- Enable [monitoring]({{}}/rancher/v2.x/en/cluster-admin/tools/monitoring/) and [logging]({{}}/rancher/v2.x/en/cluster-admin/tools/logging/) +- Enable [Istio]({{}}/rancher/v2.x/en/cluster-admin/tools/istio/) +- Use [pipelines]({{}}/rancher/v2.x/en/project-admin/pipelines/) +- Configure [alerts] and [notifiers] + +After importing a K3s cluster, the cluster owner can also [upgrade Kubernetes from the Rancher UI.]({{}}/rancher/v2.x/en/cluster-admin/upgrading-kubernetes/) ### Prerequisites @@ -23,12 +43,15 @@ kubectl create clusterrolebinding cluster-admin-binding \ --clusterrole cluster-admin \ --user [USER_ACCOUNT] ``` + before running the `kubectl` command to import the cluster. By default, GKE users are not given this privilege, so you will need to run the command before importing GKE clusters. To learn more about role-based access control for GKE, please click [here](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). ### Importing a Cluster +> **Prerequisites:** If you are importing a K3s cluster, make sure the `cluster.yml` is readable. It is protected by default. + 1. From the **Clusters** page, click **Add Cluster**. 2. Choose **Import**. 3. Enter a **Cluster Name**. @@ -38,7 +61,26 @@ By default, GKE users are not given this privilege, so you will need to run the 7. Copy the `kubectl` command to your clipboard and run it on a node where kubeconfig is configured to point to the cluster you want to import. If you are unsure it is configured correctly, run `kubectl get nodes` to verify before running the command shown in {{< product >}}. 8. If you are using self signed certificates, you will receive the message `certificate signed by unknown authority`. To work around this validation, copy the command starting with `curl` displayed in {{< product >}} to your clipboard. Then run the command on a node where kubeconfig is configured to point to the cluster you want to import. 9. When you finish running the command(s) on your node, click **Done**. -{{< result_import-cluster >}} + {{< result_import-cluster >}} > **Note:** > You can not re-import a cluster that is currently active in a Rancher setup. + +### Additional Features for Imported K3s Clusters + +_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]({{}}/k3s/latest/en/) is lightweight, fully compliant Kubernetes distribution. + +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 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. + +In K3s, nodes with the "server" (also known as "controlplane") role have the capability to have workloads scheduled to them by default. + +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. \ No newline at end of file