View and Download kubeconfig File
This section describes how to view and download the kubeconfig file.
The kubeconfig file contains the cluster’s authentication information and is used to grant access to the cluster for other applications. KubeSphere supports automatically generating a kubeconfig file based on the currently logged-in user, which can grant the same access permissions as the current user to other applications. For more information, please refer to the Kubernetes official documentation.
Prerequisites
You need to obtain the KubeSphere username and password.
Steps
-
Log in to the KubeSphere web console.
-
In the upper-right corner of the page, click
, then select kubeconfig under the toolbox.
-
In the pop-up window, view the kubeconfig configuration information. If there are multiple clusters, you need to first select the target cluster from the drop-down list in the upper-right corner. If there is only one cluster, this drop-down list is not visible.
-
The access address displayed in the clusters:cluster:server field is a virtual IP address, which can only be accessed from within the cluster. To access it from outside the cluster, modify this address to the externally exposed address of kube-apiserver.
-
The project name displayed by default in the contexts:cluster:namespace field is default. Please change the value of this field to the name of a project that the current user actually has access to.
-
Click
to download the kubeconfig.yaml file to your local machine.
-