Connect to a serverless cluster by using kubectl

Last updated:2021-04-14 15:43:53

To connect to a serverless cluster from your local computer, use the Kubernetes command-line tool kubectl.

Install kubectl

For more information, see Installing and Setting up kubectl.

Obtain the cluster credential

  1. Log in to the KCE console.
  2. In the left navigation pane, click ServerlessCluster. The cluster management page appears.
  3. Click the ID of the cluster that you want to manage. The cluster details page appears.
  4. Click Basic Information. On the Basic Information page, click Get Cluster Config.
  5. Select a Config file based on your network environment (public or private network) and obtain the cluster credential. Public Access Config is available only when Public Access is On.


Download the Config file

Copy the Config file to $HOME/.kube/config, which is the default path of kubectl, on your local computer.

Access the cluster

Access the cluster from your local computer by using kubectl:

kubectl get node

Did you find the above information helpful?

Mostly Unhelpful
A little helpful
Very helpful

What might be the problems?

Unclear or awkward
Redundant or clumsy
Lack of context for the complex system or functionality

More suggestions


Please give us your feedback.


Thank you for your feedback.