Skip to content

Commit ecfd925

Browse files
Merge pull request #4393 from ovh/ava-resetkube
Improve reset kubernetes cluster doc
2 parents d63485f + ad37e14 commit ecfd925

17 files changed

+1575
-135
lines changed

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

Lines changed: 105 additions & 9 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 23rd, 2023.**
1212

1313
<style>
1414
pre {
@@ -33,19 +33,35 @@ 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.). Similarly, load balancers and also all PVC (Persistent Volume Claim) with their PCI cinder volumes will be deleted.
43+
> Nodes will be either deleted or reinstalled (depending on the option you set during the reset).
44+
45+
The whole cluster configuration is reset but some values can be defined (optional):
46+
47+
- workerNodesPolicy: reinstall|delete
48+
- minor_version: for ex. 1.25
49+
- updatePolicy: "ALWAYS_UPDATE" by default
50+
- customization: API Server & kube proxy configuration
51+
- privateNetworkId: private network openstack UUID
52+
- privateNetworkConfiguration: true|false
53+
- defaultVrackGateway: gateway IP
54+
- kubeProxyMode: ipvs|iptables
4055

4156
## Requirements
4257

4358
- an OVHcloud Managed Kubernetes cluster
4459

45-
4660
## Instructions
4761

48-
### Step 1 - Ask for cluster reset on the OVHcloud Control Panel
62+
### Reset a Kubernetes cluster on the OVHcloud Control Panel
63+
64+
#### Step 1 - Ask for cluster reset on the OVHcloud Control Panel
4965

5066
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.
5167

@@ -59,8 +75,7 @@ Click on your Kubernetes cluster.
5975

6076
In the *Service* tab of the administration UI, click on *Reset your cluster*.
6177

62-
63-
### Step 2 - Choose the type of reset you want
78+
#### Step 2 - Choose the type of reset you want
6479

6580
You have two options on the reset menu, *Delete* and *Reinstall*.
6681

@@ -75,12 +90,93 @@ You can also choose the minor version of the cluster and the private network att
7590
Click on the `Confirm`{.action} button to continue.
7691

7792

78-
### Step 3 - Wait for the resetting to end
93+
#### Step 3 - Wait for the resetting to end
7994

8095
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:
8196

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

99+
### Reset a Kubernetes cluster through the API
100+
101+
#### The API Explorer
102+
103+
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.
104+
105+
Log in to the API Explorer using your OVHcloud NIC handle.
106+
107+
![Log in to the API Explorer](images/kubernetes-quickstart-api-ovh-com-001.png){.thumbnail}
108+
109+
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:
110+
111+
![Kubernetes section of the API Explorer](images/kubernetes-quickstart-api-ovh-com-002.png){.thumbnail}
112+
113+
#### API endpoints
114+
115+
- Reset a Kubernetes cluster:
116+
117+
> [!api]
118+
>
119+
> @api {POST} /cloud/project/{serviceName}/kube/{kubeId}/reset
120+
>
121+
122+
**Input:**
123+
```json
124+
{
125+
"name": "my-test-cluster",
126+
"updatePolicy": "ALWAYS_UPDATE",
127+
"version": "1.25"
128+
}
129+
```
130+
131+
**Result:**
132+
```json
133+
null
134+
```
135+
136+
By default, if you don't specify it, the `workerNodesPolicy` option will be equivalent to `delete`. If you don't want your Nodes deleted but reinstalled instead, you have to specify `"workerNodesPolicy": "reinstall"`.
137+
138+
> [!primary]
139+
>
140+
> 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.
141+
142+
- Check the Kubernetes cluster is resetting:
143+
144+
> [!api]
145+
>
146+
> @api {GET} /cloud/project/{serviceName}/kube/{kubeId}
147+
>
148+
149+
**Result:**
150+
```json
151+
{
152+
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
153+
"region": "GRA5",
154+
"name": "my-test-cluster",
155+
"url": "xxxxxx.xx.gra.k8s.ovh.net",
156+
"nodesUrl": "xxxxxx.nodes.c1.gra.k8s.ovh.net",
157+
"version": "1.25.4-2",
158+
"nextUpgradeVersions": [],
159+
"kubeProxyMode": "iptables",
160+
"customization": {
161+
"apiServer": {
162+
"admissionPlugins": {
163+
"enabled": [
164+
"AlwaysPullImages",
165+
"NodeRestriction"
166+
],
167+
"disabled": []
168+
}
169+
}
170+
},
171+
"status": "REDEPLOYING",
172+
"updatePolicy": "ALWAYS_UPDATE",
173+
"isUpToDate": true,
174+
"controlPlaneIsUpToDate": true,
175+
"privateNetworkId": null,
176+
"createdAt": "2023-03-21T10:53:35Z",
177+
"updatedAt": "2023-03-22T09:16:34Z"
178+
}
179+
```
84180

85181
## Go further
86182

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

Lines changed: 105 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 23rd, 2023.**
1010

1111
<style>
1212
pre {
@@ -31,19 +31,35 @@ 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.). Similarly, load balancers and also all PVC (Persistent Volume Claim) with their PCI cinder volumes will be deleted.
41+
> Nodes will be either deleted or reinstalled (depending on the option you set during the reset).
42+
43+
The whole cluster configuration is reset but some values can be defined (optional):
44+
45+
- workerNodesPolicy: reinstall|delete
46+
- minor_version: for ex. 1.25
47+
- updatePolicy: "ALWAYS_UPDATE" by default
48+
- customization: API Server & kube proxy configuration
49+
- privateNetworkId: private network openstack UUID
50+
- privateNetworkConfiguration: true|false
51+
- defaultVrackGateway: gateway IP
52+
- kubeProxyMode: ipvs|iptables
3853

3954
## Requirements
4055

4156
- an OVHcloud Managed Kubernetes cluster
4257

43-
4458
## Instructions
4559

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

4864
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.
4965

@@ -57,8 +73,7 @@ Click on your Kubernetes cluster.
5773

5874
In the *Service* tab of the administration UI, click on *Reset your cluster*.
5975

60-
61-
### Step 2 - Choose the type of reset you want
76+
#### Step 2 - Choose the type of reset you want
6277

6378
You have two options on the reset menu, *Delete* and *Reinstall*.
6479

@@ -73,12 +88,93 @@ You can also choose the minor version of the cluster and the private network att
7388
Click on the `Confirm`{.action} button to continue.
7489

7590

76-
### Step 3 - Wait for the resetting to end
91+
#### Step 3 - Wait for the resetting to end
7792

7893
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:
7994

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

97+
### Reset a Kubernetes cluster through the API
98+
99+
#### The API Explorer
100+
101+
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.
102+
103+
Log in to the API Explorer using your OVHcloud NIC handle.
104+
105+
![Log in to the API Explorer](images/kubernetes-quickstart-api-ovh-com-001.png){.thumbnail}
106+
107+
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:
108+
109+
![Kubernetes section of the API Explorer](images/kubernetes-quickstart-api-ovh-com-002.png){.thumbnail}
110+
111+
#### API endpoints
112+
113+
- Reset a Kubernetes cluster:
114+
115+
> [!api]
116+
>
117+
> @api {POST} /cloud/project/{serviceName}/kube/{kubeId}/reset
118+
>
119+
120+
**Input:**
121+
```json
122+
{
123+
"name": "my-test-cluster",
124+
"updatePolicy": "ALWAYS_UPDATE",
125+
"version": "1.25"
126+
}
127+
```
128+
129+
**Result:**
130+
```json
131+
null
132+
```
133+
134+
By default, if you don't specify it, the `workerNodesPolicy` option will be equivalent to `delete`. If you don't want your Nodes deleted but reinstalled instead, you have to specify `"workerNodesPolicy": "reinstall"`.
135+
136+
> [!primary]
137+
>
138+
> 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.
139+
140+
- Check the Kubernetes cluster is resetting:
141+
142+
> [!api]
143+
>
144+
> @api {GET} /cloud/project/{serviceName}/kube/{kubeId}
145+
>
146+
147+
**Result:**
148+
```json
149+
{
150+
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
151+
"region": "GRA5",
152+
"name": "my-test-cluster",
153+
"url": "xxxxxx.xx.gra.k8s.ovh.net",
154+
"nodesUrl": "xxxxxx.nodes.c1.gra.k8s.ovh.net",
155+
"version": "1.25.4-2",
156+
"nextUpgradeVersions": [],
157+
"kubeProxyMode": "iptables",
158+
"customization": {
159+
"apiServer": {
160+
"admissionPlugins": {
161+
"enabled": [
162+
"AlwaysPullImages",
163+
"NodeRestriction"
164+
],
165+
"disabled": []
166+
}
167+
}
168+
},
169+
"status": "REDEPLOYING",
170+
"updatePolicy": "ALWAYS_UPDATE",
171+
"isUpToDate": true,
172+
"controlPlaneIsUpToDate": true,
173+
"privateNetworkId": null,
174+
"createdAt": "2023-03-21T10:53:35Z",
175+
"updatedAt": "2023-03-22T09:16:34Z"
176+
}
177+
```
82178

83179
## Go further
84180

0 commit comments

Comments
 (0)