What is the kube_config_cluster.yml file that is created after provisioning a cluster with the Rancher Kubernetes Engine (RKE) CLI?
This document (000020139) is provided subject to the disclaimer at the end of this document.
The Rancher Kubernetes Engine (RKE) documentation references a file
kube_config_cluster.yml that is generated after running
rke up, this article explains what this file is and how to use it.
- A Rancher Kubernetes Engine (RKE) CLI provisioned Kubernetes cluster
- kubectl installed
When you provision a Kubernetes cluster using RKE, a kubeconfig file is automatically generated for your cluster.
This file is created and saved as
<cluster> is the filename of your cluster configuration YAML file. This kubeconfig defines the connection and authentication details to interact with your cluster, using tools such as
By default, kubectl checks
~/.kube/config for a kubeconfig file, but you can specify a different kubeconfig file using the --kubeconfig flag. For example:
kubectl --kubeconfig /custom/path/rke/kube_config_cluster.yml get pods
Or you can export the config path into the KUBECONFIG environment variable, removing the requirement to specify the --kubeconfig flag each time you run kubectl:
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:000020139
- Creation Date: 06-May-2021
- Modified Date:06-May-2021
- SUSE Rancher
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com