mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-25 12:38:05 +00:00
Merge pull request #2134 from catherineluse/rm-rancher
Document detaching clusters from Rancher
This commit is contained in:
@@ -8,7 +8,12 @@ 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 Kubernetes cluster,]({{<baseurl>}}/rancher/v2.x/en/installation/ha/) remove Rancher by using the [System Tools]({{<baseurl>}}/rancher/v2.x/en/system-tools/) with the `remove` subcommand.
|
||||
|
||||
### 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.
|
||||
@@ -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 <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 <FILENAME>, -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 <NODENAME>, -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 <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 <NODENAME>, -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 <KUBECONFIG> --namespace <NAMESPACE>
|
||||
```
|
||||
|
||||
#### Options
|
||||
The following are the options for the `remove` command:
|
||||
|
||||
| Option | Description
|
||||
| ---------------------------------------------- | ------------
|
||||
|
||||
Reference in New Issue
Block a user