< img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=3131724&fmt=gif" />

View and Download kubeconfig Files

This section introduces how to view and download the kubeconfig file.

The kubeconfig file contains authentication information for the cluster, enabling other applications to access the cluster. KubeSphere supports automatically generating the kubeconfig file based on the current logged-in user, granting the same access permissions to other applications. For more information, please refer to the Kubernetes documentation.

Prerequisites

You should have KubeSphere username and password.

Steps

  1. Log in to the KubeSphere web console.

  2. Hover over the image::/images/ks-qkcp/zh/icons/hammer.svg[hammer,18,18] icon in the bottom right corner of the page, then click kubeconfig from the menu.

  3. In the pop-up dialog, view the kubeconfig configuration information.

    • The clusters:cluster:server field displays a virtual IP address for access, which can only be accessed from within the cluster. If you need to access it from outside the cluster, modify this address to the one exposed by the kube-apiserver.

    • The contexts:cluster:namespace field defaults to the project name default. Modify this field value to the actual project name that the current user has access to.

    • Click image::/images/ks-qkcp/zh/icons/download-dark.svg[download-dark,18,18] to download the kubeconfig.yaml file to your local machine.

Receive the latest news, articles and updates from KubeSphere


Thanks for the feedback. If you have a specific question about how to use KubeSphere, ask it on Slack. Open an issue in the GitHub repo if you want to report a problem or suggest an improvement.

What’s on this Page