NavigationContentFooter
Suggest an edit

How to connect to a cluster with kubectl

Reviewed on 30 October 2023Published on 20 September 2020

Once your cluster is created, a .kubeconfig file is available for download to manage several Kubernetes clusters. You can use this with kubectl, the Kubernetes command line tool, allowing you to run commands against your Kubernetes clusters. You can use kubectl from a terminal on your local computer to deploy applications, inspect and manage cluster resources, and view logs.

Before you start

To complete the actions presented on this page, you must have:

Requirements
  • You have an account and are logged into the Scaleway console
  • You have created a Kubernetes Kapsule cluster
  1. Install kubectl on your local computer.

  2. Download the .kubeconfig files from your cluster’s overview page:

  3. Configure access to your cluster. You can do this in one of two ways:

    Set the KUBECONFIG environment variable:

    export KUBECONFIG=/$HOME/Downloads/Kubeconfig-ClusterName.yaml

    Or use use $HOME/.kube/config file:

    mv $HOME/Downloads/Kubeconfig-ClusterName.yaml $HOME/.kube/config

    Either way, make sure you replace /$HOME/Downloads/Kubeconfig-ClusterName.yaml with the correct name and path of your downloaded .kubeconfig file.

  4. Run the following command to finish:

    kubectl get nodes
See also
How to manage a Kosmos clusterHow to deploy an image from Container Registry
Cloud Products & Resources
  • Scaleway Console
  • Compute
  • Storage
  • Network
  • IoT
  • AI
Dedicated Products & Resources
  • Dedibox Console
  • Dedibox Servers
  • Network
  • Web Hosting
Scaleway
  • Scaleway.com
  • Blog
  • Careers
  • Scaleway Learning
Follow us
FacebookTwitterSlackInstagramLinkedin
ContractsLegal NoticePrivacy PolicyCookie PolicyDocumentation license
© 1999-2024 – Scaleway SAS