Skip to content

Commit a277d3a

Browse files
bene2k1RoRoJ
andauthored
docs(k8s): add instructions for kubeconfig download from console (#5615)
* docs(k8s): add instructions for kubeconfig download from console * Apply suggestions from code review Co-authored-by: Rowena Jones <[email protected]> * Apply suggestions from code review * docs(k8s): fix anchors --------- Co-authored-by: Rowena Jones <[email protected]>
1 parent 227b185 commit a277d3a

File tree

1 file changed

+47
-33
lines changed

1 file changed

+47
-33
lines changed

pages/kubernetes/how-to/connect-cluster-kubectl.mdx

Lines changed: 47 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -36,39 +36,53 @@ For detailed information about the configuration of IAM policies for your Kubern
3636

3737
## Accessing the cluster
3838

39-
You can use the Scaleway CLI to automatically retrieve (and merge) your `kubeconfig` file, then interact with your Kubernetes cluster.
40-
41-
### Install and configure the Scaleway CLI
42-
43-
If you have not set up the Scaleway CLI yet:
44-
45-
1. Follow our [installation guide](/scaleway-cli/quickstart) for platform-specific instructions using Homebrew, Chocolatey, or manual methods.
46-
2. Run the following command and follow the prompts to set up your CLI with your Scaleway API keys:
47-
```bash
48-
scw init
49-
```
50-
You will need your [API Key](/iam/how-to/create-api-keys/) (access key and secret key).
51-
52-
53-
### Retrieve and install the kubeconfig using scw
54-
55-
1. Run the following command to install the `kubeconfig` file for your cluster:
56-
```bash
57-
scw k8s kubeconfig install <cluster-id>
58-
```
59-
This command will:
60-
- Download the `kubeconfig` for the specified cluster.
61-
- Merge it into your existing `kubeconfig` file (default location: `~/.kube/config`).
62-
63-
2. Verify the installation:
64-
```bash
65-
kubectl get nodes
66-
```
67-
A list of nodes from your Kapsule cluster should appear.
68-
69-
<Message type="tip">
70-
Refer to our complete [Documentation for `scw k8s`](https://github.com/scaleway/scaleway-cli/blob/master/docs/commands/k8s.md) to learn more about all available commands to manage your Kubernetes cluster using `scw`.
71-
</Message>
39+
<Tabs id="connect-cluster">
40+
<TabsTab label="Using the Scaleway console">
41+
1. Click **Kubernetes** in the **Containers** section of the [Scaleway console](https://console.scaleway.com) side menu. The Kubernetes Kapsule overview displays.
42+
2. From the drop-down menu, select the geographical region you want to manage.
43+
3. Click the name of the cluster you want to access. The cluster overview page displays. This page provides information about your cluster.
44+
4. In the **Getting Started** section of the page, click **2 Download kubeconfig**, then **Generate kubeconfig**.
45+
5. Enter your existing Scaleway API key or click **Generate API key** to generate a new one.
46+
6. (Optional) Enter API key specifics by selecting the API key bearer, and entering a description and expiration date for the key. Then click **Generate API key**.
47+
7. The secret key of your API key displays. **Copy and store it** in a secure location. It will only be shown once.
48+
8. Click **Dowload kubeconfig** and run the command shown to export the path to the configuration file on your local machine.
49+
</TabsTab>
50+
<TabsTab label="Using the Scaleway CLI">
51+
You can use the Scaleway CLI to automatically retrieve (and merge) your `kubeconfig` file, then interact with your Kubernetes cluster.
52+
53+
#### Install and configure the Scaleway CLI
54+
55+
If you have not set up the Scaleway CLI yet:
56+
57+
1. Follow our [installation guide](/scaleway-cli/quickstart) for platform-specific instructions using Homebrew, Chocolatey, or manual methods.
58+
2. Run the following command and follow the prompts to set up your CLI with your Scaleway API keys:
59+
```bash
60+
scw init
61+
```
62+
You will need your [API Key](/iam/how-to/create-api-keys/) (access key and secret key).
63+
64+
65+
#### Retrieve and install the kubeconfig using scw
66+
67+
1. Run the following command to install the `kubeconfig` file for your cluster:
68+
```bash
69+
scw k8s kubeconfig install <cluster-id>
70+
```
71+
This command will:
72+
- Download the `kubeconfig` for the specified cluster.
73+
- Merge it into your existing `kubeconfig` file (default location: `~/.kube/config`).
74+
75+
2. Verify the installation:
76+
```bash
77+
kubectl get nodes
78+
```
79+
A list of nodes from your Kapsule cluster should appear.
80+
81+
<Message type="tip">
82+
Refer to our complete [Documentation for `scw k8s`](https://github.com/scaleway/scaleway-cli/blob/master/docs/commands/k8s.md) to learn more about all available commands to manage your Kubernetes cluster using `scw`.
83+
</Message>
84+
</TabsTab>
85+
</Tabs>
7286

7387

7488
## Revoking user access to the Kubernetes cluster

0 commit comments

Comments
 (0)