Obtaining a kubeconfig file
A kubeconfig file is required to remotely deploy infrastructure on the Harvester
clusters within Condenser. You may need to provide it to kubectl or to the Harvester
Terraform provider. With a kubeconfig file you can take any action that your user
account is permitted to do, including the destruction of resources.
Note
The kubeconfig file contains a secret token that uses your credentials to authenticate to the Harvester cluster. Do not share it with anyone. If your kubeconfig file is compromised, you can revoke the key from the Account and API Keys page in Rancher.
- Log in to the Rancher GUI
- In the left menu, click Virtualization Management
- Select a cluster in Harvester Clusters section that you want to access
- In the bottom left corner, click on Support
- Click on Download KubeConfig. Your browser will download a file named
<cluster name>.yaml
This is your kubeconfig file.
The Harvester Terraform provider
accepts the path to the kubeconfig file from the KUBECONFIG environment variable
or as configuration to the provider block.
See the Kubernetes documentation
for instructions to use a kubeconfig file with kubectl.