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.

image20210330103933070.png

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?

Unhelpful
Mostly Unhelpful
A little helpful
Helpful
Very helpful

What might be the problems?

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

More suggestions

0/200

Please give us your feedback.

Submitted

Thank you for your feedback.

问题反馈