Skip to content

Commit 2e4836e

Browse files
committed
feat: add through api and add useful info
1 parent a864d09 commit 2e4836e

17 files changed

+1538
-143
lines changed

pages/platform/kubernetes-k8s/resetting-a-cluster/guide.de-de.md

Lines changed: 103 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ slug: resetting-a-cluster
55
section: User guides
66
routes:
77
canonical: 'https://docs.ovh.com/gb/en/kubernetes/resetting-a-cluster/'
8-
updated: 2022-07-27
8+
updated: 2023-03-23
99
---
1010

11-
**Last updated July 27th, 2022.**
11+
**Last updated March 23th, 2023.**
1212

1313
<style>
1414
pre {
@@ -33,21 +33,36 @@ updated: 2022-07-27
3333

3434
## Objective
3535

36-
OVHcloud Managed Kubernetes service provides you Kubernetes clusters without the hassle of installing or operating them.
36+
OVHcloud Managed Kubernetes service provides you Kubernetes clusters without the hassle of installing or operating them.
3737

38-
**Find out how to reset an OVHcloud Managed Kubernetes cluster.**
38+
Through the OVHcloud Control Panel and the API, you can reset your OVHcloud Managed Kubernetes cluster.
3939

40+
> [!primary]
41+
>
42+
> During a reset, all data in the ETCD will be deleted (pods, deployments, services, secrets, CRDs, etc.), all PVC (Persistent Volume Claim) with their PCI cinder volumes and also load balancers.
43+
> Nodes will be either deleted or reinstalled.
44+
45+
Whole cluster configuration is resetted but some value can be precise (optional):
46+
- nodes_policy: reinstall|delete
47+
- minor_version: for ex. 1.25
48+
- update_policy: "ALWAYS_UPDATE" by default
49+
- customization: API Server & kube proxy configuration
50+
- private_network_id: private network openstack UUID
51+
- private_network_routing_as_default: true|false
52+
- default_vrack_gateway: gateway IP
53+
- kube_proxy_mode: ipvs|iptables
4054

4155
## Requirements
4256

4357
- an OVHcloud Managed Kubernetes cluster
4458

45-
4659
## Instructions
4760

48-
### Step 1 - Ask for cluster reset on the OVHcloud Control Panel
61+
### Reset a Kubernetes cluster on the OVHcloud Control Panel
4962

50-
Log in to the [OVHcloud Control Panel](https://www.ovh.com/auth/?action=gotomanager&from=https://www.ovh.de/&ovhSubsidiary=de), go to the `Public Cloud`{.action} section and select the Public Cloud project concerned.
63+
#### Step 1 - Ask for cluster reset on the OVHcloud Control Panel
64+
65+
Log in to the [OVHcloud Control Panel](https://www.ovh.com/auth/?action=gotomanager&from=https://www.ovh.co.uk/&ovhSubsidiary=GB), go to the `Public Cloud`{.action} section and select the Public Cloud project concerned.
5166

5267
Access the administration UI for your OVHcloud Managed Kubernetes clusters by clicking on `Managed Kubernetes Service`{.action} in the left-hand menu.
5368

@@ -59,8 +74,7 @@ Click on your Kubernetes cluster.
5974

6075
In the *Service* tab of the administration UI, click on *Reset your cluster*.
6176

62-
63-
### Step 2 - Choose the type of reset you want
77+
#### Step 2 - Choose the type of reset you want
6478

6579
You have two options on the reset menu, *Delete* and *Reinstall*.
6680

@@ -75,12 +89,91 @@ You can also choose the minor version of the cluster and the private network att
7589
Click on the `Confirm`{.action} button to continue.
7690

7791

78-
### Step 3 - Wait for the resetting to end
92+
#### Step 3 - Wait for the resetting to end
7993

8094
Depending on the chosen kind of reset, the process can take several minutes. During that time, a message on the manager warns you that the cluster is under resetting:
8195

8296
![resetting](images/resetting_a_cluster-04.png){.thumbnail}
8397

98+
### Reset a Kubernetes cluster through the API
99+
100+
#### The API Explorer
101+
102+
To simplify things, we are using the [API Explorer](https://api.ovh.com/) which allows to explore, learn and interact with the API in an interactive way.
103+
104+
Log in to the API Explorer using your OVHcloud NIC handle.
105+
106+
![Log in to the API Explorer](images/kubernetes-quickstart-api-ovh-com-001.png){.thumbnail}
107+
108+
If you go to the [Kubernetes section](https://api.ovh.com/console/#/cloud/project/%7BserviceName%7D/kube~GET) of the API Explorer, you will see the available endpoints:
109+
110+
![Kubernetes section of the API Explorer](images/kubernetes-quickstart-api-ovh-com-002.png){.thumbnail}
111+
112+
#### API endpoints
113+
114+
- Reset a Kubernetes cluster:
115+
116+
> [!api]
117+
>
118+
> @api {POST} /cloud/project/{serviceName}/kube/{kubeId}/reset
119+
>
120+
121+
**Input:**
122+
```json
123+
{
124+
"name": "my-test-cluster",
125+
"updatePolicy": "ALWAYS_UPDATE",
126+
"version": "1.25"
127+
}
128+
```
129+
130+
**Result:**
131+
```json
132+
null
133+
```
134+
135+
> [!primary]
136+
>
137+
> You should receive a response with `null` content. This message will be improved in the future with the same information you have after a Kubernetes cluster creation.
138+
139+
- Check the Kubernetes cluster is resetting:
140+
141+
> [!api]
142+
>
143+
> @api {GET} /cloud/project/{serviceName}/kube/{kubeId}
144+
>
145+
146+
**Result:**
147+
```json
148+
{
149+
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
150+
"region": "GRA5",
151+
"name": "my-test-cluster",
152+
"url": "xxxxxx.xx.gra.k8s.ovh.net",
153+
"nodesUrl": "xxxxxx.nodes.c1.gra.k8s.ovh.net",
154+
"version": "1.25.4-2",
155+
"nextUpgradeVersions": [],
156+
"kubeProxyMode": "iptables",
157+
"customization": {
158+
"apiServer": {
159+
"admissionPlugins": {
160+
"enabled": [
161+
"AlwaysPullImages",
162+
"NodeRestriction"
163+
],
164+
"disabled": []
165+
}
166+
}
167+
},
168+
"status": "REDEPLOYING",
169+
"updatePolicy": "ALWAYS_UPDATE",
170+
"isUpToDate": true,
171+
"controlPlaneIsUpToDate": true,
172+
"privateNetworkId": null,
173+
"createdAt": "2023-03-21T10:53:35Z",
174+
"updatedAt": "2023-03-22T09:16:34Z"
175+
}
176+
```
84177

85178
## Go further
86179

pages/platform/kubernetes-k8s/resetting-a-cluster/guide.en-asia.md

Lines changed: 102 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ title: Resetting an OVHcloud Managed Kubernetes cluster
33
excerpt: Find out how to reset an OVHcloud Managed Kubernetes cluster
44
slug: resetting-a-cluster
55
section: User guides
6-
updated: 2022-07-27
6+
updated: 2023-03-23
77
---
88

9-
**Last updated July 27th, 2022.**
9+
**Last updated March 23th, 2023.**
1010

1111
<style>
1212
pre {
@@ -31,19 +31,34 @@ updated: 2022-07-27
3131

3232
## Objective
3333

34-
OVHcloud Managed Kubernetes service provides you Kubernetes clusters without the hassle of installing or operating them.
34+
OVHcloud Managed Kubernetes service provides you Kubernetes clusters without the hassle of installing or operating them.
3535

36-
**Find out how to reset an OVHcloud Managed Kubernetes cluster.**
36+
Through the OVHcloud Control Panel and the API, you can reset your OVHcloud Managed Kubernetes cluster.
3737

38+
> [!primary]
39+
>
40+
> During a reset, all data in the ETCD will be deleted (pods, deployments, services, secrets, CRDs, etc.), all PVC (Persistent Volume Claim) with their PCI cinder volumes and also load balancers.
41+
> Nodes will be either deleted or reinstalled.
42+
43+
Whole cluster configuration is resetted but some value can be precise (optional):
44+
- nodes_policy: reinstall|delete
45+
- minor_version: for ex. 1.25
46+
- update_policy: "ALWAYS_UPDATE" by default
47+
- customization: API Server & kube proxy configuration
48+
- private_network_id: private network openstack UUID
49+
- private_network_routing_as_default: true|false
50+
- default_vrack_gateway: gateway IP
51+
- kube_proxy_mode: ipvs|iptables
3852

3953
## Requirements
4054

4155
- an OVHcloud Managed Kubernetes cluster
4256

43-
4457
## Instructions
4558

46-
### Step 1 - Ask for cluster reset on the OVHcloud Control Panel
59+
### Reset a Kubernetes cluster on the OVHcloud Control Panel
60+
61+
#### Step 1 - Ask for cluster reset on the OVHcloud Control Panel
4762

4863
Log in to the [OVHcloud Control Panel](https://ca.ovh.com/auth/?action=gotomanager&from=https://www.ovh.com/asia/&ovhSubsidiary=asia), go to the `Public Cloud`{.action} section and select the Public Cloud project concerned.
4964

@@ -57,8 +72,7 @@ Click on your Kubernetes cluster.
5772

5873
In the *Service* tab of the administration UI, click on *Reset your cluster*.
5974

60-
61-
### Step 2 - Choose the type of reset you want
75+
#### Step 2 - Choose the type of reset you want
6276

6377
You have two options on the reset menu, *Delete* and *Reinstall*.
6478

@@ -73,12 +87,91 @@ You can also choose the minor version of the cluster and the private network att
7387
Click on the `Confirm`{.action} button to continue.
7488

7589

76-
### Step 3 - Wait for the resetting to end
90+
#### Step 3 - Wait for the resetting to end
7791

7892
Depending on the chosen kind of reset, the process can take several minutes. During that time, a message on the manager warns you that the cluster is under resetting:
7993

8094
![resetting](images/resetting_a_cluster-04.png){.thumbnail}
8195

96+
### Reset a Kubernetes cluster through the API
97+
98+
#### The API Explorer
99+
100+
To simplify things, we are using the [API Explorer](https://api.ovh.com/) which allows to explore, learn and interact with the API in an interactive way.
101+
102+
Log in to the API Explorer using your OVHcloud NIC handle.
103+
104+
![Log in to the API Explorer](images/kubernetes-quickstart-api-ovh-com-001.png){.thumbnail}
105+
106+
If you go to the [Kubernetes section](https://api.ovh.com/console/#/cloud/project/%7BserviceName%7D/kube~GET) of the API Explorer, you will see the available endpoints:
107+
108+
![Kubernetes section of the API Explorer](images/kubernetes-quickstart-api-ovh-com-002.png){.thumbnail}
109+
110+
#### API endpoints
111+
112+
- Reset a Kubernetes cluster:
113+
114+
> [!api]
115+
>
116+
> @api {POST} /cloud/project/{serviceName}/kube/{kubeId}/reset
117+
>
118+
119+
**Input:**
120+
```json
121+
{
122+
"name": "my-test-cluster",
123+
"updatePolicy": "ALWAYS_UPDATE",
124+
"version": "1.25"
125+
}
126+
```
127+
128+
**Result:**
129+
```json
130+
null
131+
```
132+
133+
> [!primary]
134+
>
135+
> You should receive a response with `null` content. This message will be improved in the future with the same information you have after a Kubernetes cluster creation.
136+
137+
- Check the Kubernetes cluster is resetting:
138+
139+
> [!api]
140+
>
141+
> @api {GET} /cloud/project/{serviceName}/kube/{kubeId}
142+
>
143+
144+
**Result:**
145+
```json
146+
{
147+
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
148+
"region": "GRA5",
149+
"name": "my-test-cluster",
150+
"url": "xxxxxx.xx.gra.k8s.ovh.net",
151+
"nodesUrl": "xxxxxx.nodes.c1.gra.k8s.ovh.net",
152+
"version": "1.25.4-2",
153+
"nextUpgradeVersions": [],
154+
"kubeProxyMode": "iptables",
155+
"customization": {
156+
"apiServer": {
157+
"admissionPlugins": {
158+
"enabled": [
159+
"AlwaysPullImages",
160+
"NodeRestriction"
161+
],
162+
"disabled": []
163+
}
164+
}
165+
},
166+
"status": "REDEPLOYING",
167+
"updatePolicy": "ALWAYS_UPDATE",
168+
"isUpToDate": true,
169+
"controlPlaneIsUpToDate": true,
170+
"privateNetworkId": null,
171+
"createdAt": "2023-03-21T10:53:35Z",
172+
"updatedAt": "2023-03-22T09:16:34Z"
173+
}
174+
```
82175

83176
## Go further
84177

0 commit comments

Comments
 (0)