Skip to content

Commit 3f93cd2

Browse files
authored
docs(k8s): fix formatting external commit (#5948)
* docs(k8s): fix formatting external commit * fix(k8s): fix typo * docs(k8s): fix headline
1 parent 6efa241 commit 3f93cd2

File tree

2 files changed

+37
-37
lines changed

2 files changed

+37
-37
lines changed

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

Lines changed: 33 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -29,71 +29,67 @@ To connect to the fully isolated Kubernetes Kapsule control plane, you can open
2929

3030
### Finding your cluster's URL
3131

32-
In the Scaleway console, go to the [Kubernetes product section](https://console.scaleway.com/kubernetes), then click your cluster's name.
33-
34-
Scroll down to the **Network** section, and click on the **URL** value. The URL is copied to your clipboard.
32+
1. Click **Kubernetes** in the **Containers** section of the [Scaleway console](https://console.scaleway.com) side menu. The Kubernetes dashboard displays.
33+
2. From the drop-down menu, select the geographical region you want to manage.
34+
3. Click on the name of the cluster you want to connect to. The cluster overview page displays.
35+
4. Scroll down to the **Network** section, then click the **URL** value. The URL is copied to your clipboard.
3536

3637
### Opening the SSH tunnel
3738

3839
Open a terminal on your computer, then run the following command:
3940

40-
```bash
41-
ssh -fNL 6443:<CLUSTER_URL_WITHOUT_HTTPS> bastion@<PUBLIC_GATEWAY_PUBLIC_IP> -p <SSH_BASTION_PORT>
42-
```
43-
44-
Make sure to replace the values with the appropriate values. `<CLUSTER_URL_WITHOUT_HTTPS>` should end in `:6443`, which is the control plane's port.
45-
46-
Here is an example command:
47-
48-
```bash
49-
ssh -fNL 6443:1379355f-f36a-4383-9791-b6c573dea811.api.k8s.fr-par.scw.cloud:6443 bastion@51.159.153.192 -p 61000
50-
```
41+
```bash
42+
ssh -fNL 6443:<CLUSTER_URL_WITHOUT_HTTPS> bastion@<PUBLIC_GATEWAY_PUBLIC_IP> -p <SSH_BASTION_PORT>
43+
```
44+
Make sure to replace the values with the appropriate values. `<CLUSTER_URL_WITHOUT_HTTPS>` should end in `:6443`, which is the control plane's port.
5145

52-
<Message type="note">
46+
Here is an example command:
5347

54-
The command contains several `ssh` flags:
48+
```bash
49+
ssh -fNL 6443:1379355f-f36a-4383-9791-b6c573dea811.api.k8s.fr-par.scw.cloud:6443 bastion@51.159.153.192 -p 61000
50+
```
5551

56-
- `-f` runs the command in the background;
57-
- `-N` tells `ssh` not to run a remote command, which is the case here since we only want to port-forward;
58-
- `-L` sets up port-forwarding from a local port (here, port `6443`) and a given host and port on the remote side;
59-
- `-p` indicates the remote SSH port.
52+
<Message type="note">
53+
The command contains several `ssh` flags:
6054

61-
</Message>
55+
- `-f` runs the command in the background;
56+
- `-N` tells `ssh` not to run a remote command, which is the case here since we only want to port-forward;
57+
- `-L` sets up port-forwarding from a local port (here, port `6443`) and a given host and port on the remote side;
58+
- `-p` indicates the remote SSH port.
59+
</Message>
6260

6361
A tunnel to the Kubernetes Kapsule control plane is opened: all local traffic to port `6443` will now be redirected to the control plane through the Public Gateway's SSH bastion.
6462

6563
## Accessing the cluster
6664

67-
### Editing the `/etc/hosts` file
65+
### Editing the /etc/hosts file
6866

6967
The downloaded `kubeconfig` file points to the control plane's URL, which is currently unreachable due to its lack of public IP. However, you can redirect traffic to your local port-forwarded port by editing your `/etc/hosts` file.
7068

7169
Open the `/etc/hosts` file on your computer using a text editor, and add the following line:
7270

73-
```
74-
127.0.0.1 <CLUSTER_URL_WITHOUT_HTTPS>
75-
```
71+
```
72+
127.0.0.1 <CLUSTER_URL_WITHOUT_HTTPS>
73+
```
7674

77-
Using the same values as the previous example, the line would be:
75+
Using the same values as the previous example, the line would be:
7876

79-
```
80-
127.0.0.1 1379355f-f36a-4383-9791-b6c573dea811.api.k8s.fr-par.scw.cloud
81-
```
77+
```
78+
127.0.0.1 1379355f-f36a-4383-9791-b6c573dea811.api.k8s.fr-par.scw.cloud
79+
```
8280

83-
Processes on your computer now resolve your cluster's hostname to `127.0.0.1`, your `localhost` address.
81+
Processes on your computer now resolve your cluster's hostname to `127.0.0.1`, your `localhost` address.
8482

85-
### Using `kubectl`
83+
### Using kubectl
8684

8785
You can now manage your cluster using `kubectl`. Run the following command:
8886

89-
```bash
90-
kubectl get nodes
91-
```
87+
```bash
88+
kubectl get nodes
89+
```
9290

9391
A list of nodes from your Kapsule cluster should appear.
9492

9593
<Message type="note">
96-
97-
You need to run the `ssh` command again every time your computer reboots. This can be automated using various tools such as shell scripts.
98-
94+
You need to run the `ssh` command again every time your computer reboots. This can be automated using various tools such as shell scripts.
9995
</Message>

pages/kubernetes/menu.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ export const kubernetesMenu = {
4242
label: 'Connect to a cluster with kubectl',
4343
slug: 'connect-cluster-kubectl',
4444
},
45+
{
46+
label: 'Connect to a cluster within a Private Network',
47+
slug: 'connect-private-cluster',
48+
},
4549
{
4650
label: 'Manage Kapsule node pools',
4751
slug: 'manage-node-pools',

0 commit comments

Comments
 (0)