How to Connect to Rancher Provisioned Clusters using CLI When Rancher is Offline
This document (000021767) is provided subject to the disclaimer at the end of this document.
Environment
Rancher Version : Applicable for all Rancher versions.
Downstream clusters : RKE1 , RKE2 or K3S
Standalone Clusters : Its applicable for Standalone clusters of RKE1 , RKE2 or K3S
SSH access to the ControlPlane nodes are mandatory.
Situation
In the event of a Rancher application outage, administrators may need to directly access provisioned downstream clusters via command-line interface (CLI) tools to diagnose and resolve issues.
Resolution
RKE2 :
- SSH to the Server Node ( Privileged access is required )
- Run the Below Command
# export CRI_CONFIG_FILE=/var/lib/rancher/rke2/agent/etc/crictl.yaml KUBECONFIG=/etc/rancher/rke2/rke2.yaml
# PATH=$PATH:/var/lib/rancher/rke2/bin
- To verify, check the "crictl" and "kubectl" access to the cluster from the Server node.
K3S :
- SSH to the Server Node ( Privileged access is required )
- Run the Below Command
# export CRI_CONFIG_FILE=/var/lib/rancher/k3s/agent/etc/crictl.yaml KUBECONFIG=/etc/rancher/k3s/k3s.yaml
# PATH=$PATH:/var/lib/rancher/k3s/agent/containerd/bin/
- To verify, check the "crictl" and "kubectl" access to the cluster from the Server node.
RKE1 :
- SSH to the Server Node ( Privileged access is required )
- Follow the GH article to retrieve kubeconfig file
- To verify, check the "docker" and "kubectl" access to the cluster from the Server node.
Cause
NA
Status
Additional Information
Refer for RKE2 : https://docs.rke2.io/cluster_access
Refer for K3S : https://docs.k3s.io/cluster-access
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000021767
- Creation Date: 03-Apr-2025
- Modified Date:10-Apr-2025
-
- SUSE Rancher
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com