From 9e333104327760b1d5dec8a7ba37905c77b00f21 Mon Sep 17 00:00:00 2001 From: Catherine Luse Date: Tue, 24 Dec 2019 18:05:07 -0700 Subject: [PATCH 1/2] Add page about detaching clusters from Rancher --- .../v2.x/en/detaching-rancher/_index.md | 34 ++++++++++++++ .../v2.x/en/removing-rancher/_index.md | 7 +-- .../rancher/v2.x/en/system-tools/_index.md | 46 +++++++++---------- 3 files changed, 60 insertions(+), 27 deletions(-) create mode 100644 content/rancher/v2.x/en/detaching-rancher/_index.md diff --git a/content/rancher/v2.x/en/detaching-rancher/_index.md b/content/rancher/v2.x/en/detaching-rancher/_index.md new file mode 100644 index 00000000000..40ec4eebe0a --- /dev/null +++ b/content/rancher/v2.x/en/detaching-rancher/_index.md @@ -0,0 +1,34 @@ +--- +title: Detaching Rancher from Downstream Clusters +weight: 7502 +--- + +This section describes the options for disconnecting a downstream cluster from Rancher while still being able to use the cluster. For imported clusters, this result is achieved by deleting the cluster from the Rancher UI. For other types of clusters, we recommend using a third-party service to back up your Kubernetes applications, because the Rancher UI does not allow them to be deleted without also uninstalling Kubernetes from the cluster. + +# Imported Clusters + +If you use the Rancher UI to delete an imported cluster, the cluster is detached from Rancher, but not destroyed. You should still be able to use the cluster. + +# Non-imported Clusters + +For other types of clusters, if you use the Rancher UI to delete the cluster, Rancher uninstalls Kubernetes from the cluster and cleans the nodes so that they can be used for other purposes. + +For clusters created in a hosted Kubernetes provider, such as EKS, GKE, or AKS, the ability to detach the cluster from Rancher without removing Kubernetes is a feature that will be added to Rancher in a future update. + +For clusters in which Kubernetes was launched by Rancher, such as custom clusters, or clusters created in an infrastructure provider, it is not possible to detach the cluster from Rancher in a way that still allows you to use the cluster, and we don't plan to add that capability to Rancher. However, some third-party software solutions exist to help you backup and restore your cluster, such as Velero/Restic and Stashed. + +If you need to detach non-imported clusters from Rancher while still being able to use the cluster, we recommend backing up the cluster, deleting it in Rancher, then restoring it from backup. + +# Backing up Kubernetes Applications with Restic and Velero + +Velero has support for backing up and restoring Kubernetes volumes using a free open-source backup tool called restic. This support is considered beta quality. Please see the list of limitations to understand if it currently fits your use case. + +# Backing up Kubernetes Applications with Stash + +Stash by AppsCode is a Kubernetes operator for restic. If you are running production workloads in Kubernetes, you might want to take backup of your disks. Traditional tools are too complex to setup and maintain in a dynamic compute environment like Kubernetes. restic is a backup program that is fast, efficient and secure with few moving parts. Stash is a CRD controller for Kubernetes built around restic to address these issues. Using Stash, you can backup Kubernetes volumes mounted in following types of workloads: + +- Deployment +- DaemonSet +- ReplicaSet +- ReplicationController +- StatefulSet \ No newline at end of file diff --git a/content/rancher/v2.x/en/removing-rancher/_index.md b/content/rancher/v2.x/en/removing-rancher/_index.md index e7f11cc45a4..43c20b3273e 100644 --- a/content/rancher/v2.x/en/removing-rancher/_index.md +++ b/content/rancher/v2.x/en/removing-rancher/_index.md @@ -8,7 +8,8 @@ aliases: - /rancher/v2.x/en/admin-settings/removing-rancher/rancher-cluster-nodes/ --- -When you deploy Rancher and use it to provision clusters, Rancher installs its components on the nodes you use. There are two contexts in which you'd remove Rancher from a Kubernetes cluster node. +When you deploy the Rancher server, Rancher's components are installed on the nodes you use. -- **[Removing Rancher from Your Rancher Server Nodes]({{< baseurl >}}/rancher/v2.x/en/system-tools/#remove)**: In this context, you are removing Rancher from the Kubernetes cluster that you configured for your [Rancher installation]({{< baseurl >}}/rancher/v2.x/en/installation/ha/). This can be done using [System Tools]({{< baseurl >}}/rancher/v2.x/en/system-tools/). -- **[Removing Rancher Components from Rancher Launched Kubernetes Clusters]({{< baseurl >}}/rancher/v2.x/en/admin-settings/removing-rancher/user-cluster-nodes/)**: In this context, you are removing Rancher components from Kubernetes clusters that you [launched using Rancher]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/). +If you installed Rancher on a [high-availability]({{< baseurl >}}/rancher/v2.x/en/installation/ha/) Kubernetes cluster, remove Rancher by using the [System Tools]({{< baseurl >}}/rancher/v2.x/en/system-tools/) with the `remove` subcommand. + +For information about how to remove Rancher components from downstream Kubernetes clusters, refer to the section on [detaching clusters.]({{}}/rancher/v2.x/en/detaching-rancher/) diff --git a/content/rancher/v2.x/en/system-tools/_index.md b/content/rancher/v2.x/en/system-tools/_index.md index db524751cd4..9850ba29715 100644 --- a/content/rancher/v2.x/en/system-tools/_index.md +++ b/content/rancher/v2.x/en/system-tools/_index.md @@ -8,7 +8,15 @@ System Tools is a tool to perform operational tasks on [Rancher Launched Kuberne * Collect logging and system metrics from nodes. * Remove Kubernetes resources created by Rancher. -### Download System Tools +The following commands are available: + +| Command | Description +|---|--- +| [logs](#logs) | Collect Kubernetes cluster component logs from nodes. +| [stats](#stats) | Stream system metrics from nodes. +| [remove](#remove) | Remove Kubernetes resources created by Rancher. + +# Download System Tools You can download the latest version of System Tools from the [GitHub releases page](https://github.com/rancher/system-tools/releases/latest). Download the version of `system-tools` for the OS that you are using to interact with the cluster. @@ -31,29 +39,19 @@ After you download the tools, complete the following actions: chmod +x system-tools ``` -### Using System Tools +# Logs -The following subcommands are available: - -| Command | Description -|---|--- -| [logs](#logs) | Collect Kubernetes cluster component logs from nodes. -| [stats](#stats) | Stream system metrics from nodes. -| [remove](#remove) | Remove Kubernetes resources created by Rancher. - -### Logs - -The logs subcommand will collect log files of core Kubernetes cluster components from nodes in [Rancher Launched Kubernetes]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/) clusters or [RKE cluster as used for Rancher HA]({{< baseurl >}}/rancher/v2.x/en/installation/ha/kubernetes-rke/). See [Troubleshooting]({{< baseurl >}}//rancher/v2.x/en/troubleshooting/) for a list of core Kubernetes cluster components. +The `logs` subcommand will collect log files of core Kubernetes cluster components from nodes in [Rancher Launched Kubernetes]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/) clusters or [RKE cluster as used for Rancher HA]({{< baseurl >}}/rancher/v2.x/en/installation/ha/kubernetes-rke/). See [Troubleshooting]({{< baseurl >}}//rancher/v2.x/en/troubleshooting/) for a list of core Kubernetes cluster components. System Tools will use the provided kubeconfig file to deploy a DaemonSet, that will copy all the logfiles from the core Kubernetes cluster components and add them to a single tar file (`cluster-logs.tar` by default). If you only want to collect logging from a single node, you can specify the node by using `--node NODENAME` or `-n NODENAME`. -#### Usage +### Usage ``` ./system-tools_darwin-amd64 logs --kubeconfig ``` -#### Options +The following are the options for the logs command: | Option | Description | ------------------------------------------------------ | ------------------------------------------------------ @@ -61,19 +59,19 @@ System Tools will use the provided kubeconfig file to deploy a DaemonSet, that w | `--output , -o cluster-logs.tar` | Name of the created tarball containing the logs. If no output filename is defined, the options defaults to `cluster-logs.tar`. | `--node , -n node1` | Specify the nodes to collect the logs from. If no node is specified, logs from all nodes in the cluster will be collected. -### Stats +# Stats -The stats subcommand will display system metrics from nodes in [Rancher Launched Kubernetes]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/) clusters or [RKE cluster as used for Rancher HA]({{< baseurl >}}/rancher/v2.x/en/installation/ha/kubernetes-rke/). +The `stats` subcommand will display system metrics from nodes in [Rancher Launched Kubernetes]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/) clusters or [RKE cluster as used for Rancher HA]({{< baseurl >}}/rancher/v2.x/en/installation/ha/kubernetes-rke/). System Tools will deploy a DaemonSet, and run a predefined command based on `sar` (System Activity Report) to show system metrics. -#### Usage +### Usage ``` ./system-tools_darwin-amd64 stats --kubeconfig ``` -#### Options +The following are the options for the stats command: | Option | Description | ------------------------------------------------------ | ------------------------------ @@ -81,12 +79,12 @@ System Tools will deploy a DaemonSet, and run a predefined command based on `sar | `--node , -n node1` | Specify the nodes to display the system metrics from. If no node is specified, logs from all nodes in the cluster will be displayed. | `--stats-command value, -s value` | The command to run to display the system metrics. If no command is defined, the options defaults to `/usr/bin/sar -u -r -F 1 1`. -### Remove - -When you install Rancher on a Kubernetes cluster, it will create Kubernetes resources to run and to store configuration data. If you want to remove Rancher from your cluster, you can use the remove subcommand to remove the Kubernetes resources. When you use the remove subcommand, the following resources will be removed: +# Remove >**Warning:** This command will remove data from your etcd nodes. Make sure you have created a [backup of etcd]({{< baseurl >}}/rancher/v2.x/en/backups/backups) before executing the command. +When you install Rancher on a Kubernetes cluster, it will create Kubernetes resources to run and to store configuration data. If you want to remove Rancher from your cluster, you can use the `remove` subcommand to remove the Kubernetes resources. When you use the `remove` subcommand, the following resources will be removed: + - The Rancher deployment namespace (`cattle-system` by default). - Any `serviceAccount`, `clusterRoles`, and `clusterRoleBindings` that Rancher applied the `cattle.io/creator:norman` label to. Rancher applies this label to any resource that it creates as of v2.1.0. - Labels, annotations, and finalizers. @@ -99,7 +97,7 @@ When you install Rancher on a Kubernetes cluster, it will create Kubernetes reso > >These versions of Rancher do not automatically delete the `serviceAccount`, `clusterRole`, and `clusterRoleBindings` resources after the job runs. You'll have to delete them yourself. -#### Usage +### Usage When you run the command below, all the resources listed [above](#remove) will be removed from the cluster. @@ -109,7 +107,7 @@ When you run the command below, all the resources listed [above](#remove) will b ./system-tools remove --kubeconfig --namespace ``` -#### Options +The following are the options for the `remove` command: | Option | Description | ---------------------------------------------- | ------------ From 0f43c2d2589d4b24f2d5ea63dc87a9d0ded79b84 Mon Sep 17 00:00:00 2001 From: Catherine Luse Date: Tue, 14 Jan 2020 12:05:39 -0700 Subject: [PATCH 2/2] Say that it is not possible to detach non-imported clusters from Rancher --- .../v2.x/en/detaching-rancher/_index.md | 34 ------------------- .../v2.x/en/removing-rancher/_index.md | 8 +++-- 2 files changed, 6 insertions(+), 36 deletions(-) delete mode 100644 content/rancher/v2.x/en/detaching-rancher/_index.md diff --git a/content/rancher/v2.x/en/detaching-rancher/_index.md b/content/rancher/v2.x/en/detaching-rancher/_index.md deleted file mode 100644 index 40ec4eebe0a..00000000000 --- a/content/rancher/v2.x/en/detaching-rancher/_index.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: Detaching Rancher from Downstream Clusters -weight: 7502 ---- - -This section describes the options for disconnecting a downstream cluster from Rancher while still being able to use the cluster. For imported clusters, this result is achieved by deleting the cluster from the Rancher UI. For other types of clusters, we recommend using a third-party service to back up your Kubernetes applications, because the Rancher UI does not allow them to be deleted without also uninstalling Kubernetes from the cluster. - -# Imported Clusters - -If you use the Rancher UI to delete an imported cluster, the cluster is detached from Rancher, but not destroyed. You should still be able to use the cluster. - -# Non-imported Clusters - -For other types of clusters, if you use the Rancher UI to delete the cluster, Rancher uninstalls Kubernetes from the cluster and cleans the nodes so that they can be used for other purposes. - -For clusters created in a hosted Kubernetes provider, such as EKS, GKE, or AKS, the ability to detach the cluster from Rancher without removing Kubernetes is a feature that will be added to Rancher in a future update. - -For clusters in which Kubernetes was launched by Rancher, such as custom clusters, or clusters created in an infrastructure provider, it is not possible to detach the cluster from Rancher in a way that still allows you to use the cluster, and we don't plan to add that capability to Rancher. However, some third-party software solutions exist to help you backup and restore your cluster, such as Velero/Restic and Stashed. - -If you need to detach non-imported clusters from Rancher while still being able to use the cluster, we recommend backing up the cluster, deleting it in Rancher, then restoring it from backup. - -# Backing up Kubernetes Applications with Restic and Velero - -Velero has support for backing up and restoring Kubernetes volumes using a free open-source backup tool called restic. This support is considered beta quality. Please see the list of limitations to understand if it currently fits your use case. - -# Backing up Kubernetes Applications with Stash - -Stash by AppsCode is a Kubernetes operator for restic. If you are running production workloads in Kubernetes, you might want to take backup of your disks. Traditional tools are too complex to setup and maintain in a dynamic compute environment like Kubernetes. restic is a backup program that is fast, efficient and secure with few moving parts. Stash is a CRD controller for Kubernetes built around restic to address these issues. Using Stash, you can backup Kubernetes volumes mounted in following types of workloads: - -- Deployment -- DaemonSet -- ReplicaSet -- ReplicationController -- StatefulSet \ No newline at end of file diff --git a/content/rancher/v2.x/en/removing-rancher/_index.md b/content/rancher/v2.x/en/removing-rancher/_index.md index 43c20b3273e..e177d40dee5 100644 --- a/content/rancher/v2.x/en/removing-rancher/_index.md +++ b/content/rancher/v2.x/en/removing-rancher/_index.md @@ -10,6 +10,10 @@ aliases: When you deploy the Rancher server, Rancher's components are installed on the nodes you use. -If you installed Rancher on a [high-availability]({{< baseurl >}}/rancher/v2.x/en/installation/ha/) Kubernetes cluster, remove Rancher by using the [System Tools]({{< baseurl >}}/rancher/v2.x/en/system-tools/) with the `remove` subcommand. +If you [installed Rancher on a Kubernetes cluster,]({{}}/rancher/v2.x/en/installation/ha/) remove Rancher by using the [System Tools]({{}}/rancher/v2.x/en/system-tools/) with the `remove` subcommand. -For information about how to remove Rancher components from downstream Kubernetes clusters, refer to the section on [detaching clusters.]({{}}/rancher/v2.x/en/detaching-rancher/) +### Detaching Rancher from Downstream Clusters + +If an imported cluster is deleted from the Rancher UI, the cluster is detached from Rancher, but not destroyed. You can still access the cluster using `kubectl`. + +For other types of clusters, including RKE clusters and hosted Kubernetes clusters, it is not possible to detach the cluster from Rancher in a way that allows you to continue using the cluster. If the cluster is deleted from the Rancher UI, it is destroyed. \ No newline at end of file