Continental Innovates with Rancher and Kubernetes
System Tools is a tool to perform operational tasks on Rancher Launched Kubernetes clusters or installations of Rancher on an RKE cluster. The tasks include:
The following commands are available:
You can download the latest version of System Tools from the GitHub releases page. Download the version of system-tools for the OS that you are using to interact with the cluster.
system-tools
system-tools_darwin-amd64
system-tools_linux-amd64
system-tools_windows-amd64.exe
After you download the tools, complete the following actions:
Rename the file to system-tools.
Give the file executable permissions by running the following command:
Using Windows? The file is already an executable, you can skip this step.
chmod +x system-tools
The logs subcommand will collect log files of core Kubernetes cluster components from nodes in Rancher-launched Kubernetes clusters or nodes on an RKE Kubernetes cluster that Rancher is installed on.. See 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.
cluster-logs.tar
--node NODENAME
-n NODENAME
./system-tools_darwin-amd64 logs --kubeconfig <KUBECONFIG>
The following are the options for the logs command:
--kubeconfig <KUBECONFIG_PATH>, -c <KUBECONFIG_PATH>
--output <FILENAME>, -o cluster-logs.tar
--node <NODENAME>, -n node1
The stats subcommand will display system metrics from nodes in Rancher-launched Kubernetes clusters or nodes in an RKE Kubernetes cluster that Rancher is installed on..
System Tools will deploy a DaemonSet, and run a predefined command based on sar (System Activity Report) to show system metrics.
sar
./system-tools_darwin-amd64 stats --kubeconfig <KUBECONFIG>
The following are the options for the stats command:
--stats-command value, -s value
/usr/bin/sar -u -r -F 1 1
Warning: This command will remove data from your etcd nodes. Make sure you have created a backup of etcd 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:
remove
cattle-system
serviceAccount
clusterRoles
clusterRoleBindings
cattle.io/creator:norman
management.cattle.io
Using 2.0.8 or Earlier? 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.
Using 2.0.8 or Earlier?
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.
clusterRole
When you run the command below, all the resources listed above will be removed from the cluster.
./system-tools remove --kubeconfig <KUBECONFIG> --namespace <NAMESPACE>
The following are the options for the remove command:
--namespace <NAMESPACE>, -n cattle-system
<NAMESPACE>
--force