@@ -5,9 +5,56 @@ inherit:
5
5
file : steps-configure-kubectl-namespace.yaml
6
6
ref : configure-kubectl-namespace
7
7
---
8
- title : " Copy the highlighted fields of this |onprem| resource ."
8
+ title : " Delete the |k8s-statefulset| that manages your |onprem| Pods ."
9
9
stepnum : 2
10
10
level : 4
11
+ ref : delete-sts
12
+ content : |
13
+
14
+ In this tutorial, you update the StatefulSet that manages the |onprem|
15
+ Pods in your |k8s| cluster.
16
+
17
+ You must first delete the |onprem| StatefulSet so that |k8s| can apply
18
+ the updates that Local Mode requires.
19
+
20
+ a. Find the name of your |onprem| StatefulSet:
21
+
22
+ .. code-block:: sh
23
+
24
+ kubectl get statefulsets
25
+
26
+ The entry in the response that matches the
27
+ :opsmgrkube:`metadata.name` of your
28
+
29
+ Your |onprem| StatefulSet is the entry in the response that matches
30
+ the :opsmgrkube:`metadata.name` in your |onprem| resource
31
+ definition.
32
+
33
+ .. code-block:: sh
34
+ :copyable: false
35
+ :emphasize-lines: 3
36
+
37
+ kubectl get statefulsets -n mongodb
38
+ NAME READY AGE
39
+ ops-manager-localmode 2/2 2m31s
40
+ ops-manager-localmode-db 3/3 4m46s
41
+
42
+ #. Delete the |onprem| StatefulSet:
43
+
44
+ .. warning::
45
+
46
+ Ensure that you include the ``--cascade=false`` flag when you
47
+ delete your |onprem| StatefulSet. If you don't include this
48
+ flag, |k8s| also deletes your |onprem| Pods.
49
+
50
+ .. code-block:: sh
51
+
52
+ kubectl delete statefulset --cascade=false <ops-manager-statefulset>
53
+
54
+ ---
55
+ title : " Copy the highlighted fields of this |onprem| resource."
56
+ stepnum : 3
57
+ level : 4
11
58
ref : copy-k8s-example
12
59
content : |
13
60
@@ -30,7 +77,7 @@ content: |
30
77
31
78
---
32
79
title : " Paste the copied example section into your existing |onprem| resource."
33
- stepnum : 3
80
+ stepnum : 4
34
81
level : 4
35
82
ref : paste-k8s-example
36
83
content : |
@@ -39,27 +86,105 @@ content: |
39
86
specification into the appropriate location in your resource file.
40
87
---
41
88
title : " Save your |onprem| config file."
42
- stepnum : 4
89
+ stepnum : 5
43
90
level : 4
44
91
ref : save-object-spec
45
92
46
93
---
47
94
title : " Apply changes to your |onprem| deployment."
48
- stepnum : 5
95
+ stepnum : 6
49
96
level : 4
50
97
ref : apply-changes-om-k8s
51
98
content : |
52
99
53
- Invoke the following ``kubectl`` command on the filename of the
54
- |onprem| resource definition:
100
+ a. Invoke the following ``kubectl`` command on the filename of the
101
+ |onprem| resource definition:
55
102
56
- .. code-block:: sh
103
+ .. code-block:: sh
104
+
105
+ kubectl apply -f <opsmgr-resource>.yaml
106
+
107
+ #. |k8s| creates a new |onprem| StatefulSet when you apply the changes
108
+ to your |onprem| resource definition. Before proceeding to the next
109
+ step, run the following command to ensure that the |onprem| StatefulSet
110
+ exists:
111
+
112
+ .. code-block:: sh
57
113
58
- kubectl apply -f <opsmgr-resource>.yaml
114
+ kubectl get statefulsets
115
+
116
+ The new |onprem| StatefulSet should show 0 members ready:
117
+
118
+ .. code-block:: sh
119
+ :copyable: false
120
+ :emphasize-lines: 3
121
+
122
+ kubectl get statefulsets -n mongodb
123
+ NAME READY AGE ops-manager-localmode 0/2 2m31s
124
+ ops-manager-localmode-db 3/3 4m46s
125
+
126
+ ---
127
+ title : " In a rolling fashion, delete your old |onprem| Pods."
128
+ stepnum : 7
129
+ level : 4
130
+ ref : delete-old-om-pods
131
+ content : |
132
+
133
+ a. List the |onprem| Pods in your |k8s| cluster:
134
+
135
+ .. code-block:: sh
136
+
137
+ kubectl get pods
138
+
139
+ #. Delete one |onprem| Pod:
140
+
141
+ .. code-block:: sh
142
+
143
+ kubectl delete pod <om-pod-0>
144
+
145
+ #. |k8s| recreates the |onprem| Pod you deleted. Continue to get the
146
+ status of the new Pod until it is ready:
147
+
148
+ .. code-block:: sh
149
+
150
+ kubectl get pods
151
+
152
+
153
+ The output looks like the following when the new Pod is
154
+ initializing:
155
+
156
+ .. code-block:: sh
157
+ :copyable: false
158
+ :emphasize-lines: 3
159
+
160
+ NAME READY STATUS RESTARTS AGE
161
+ mongodb-enterprise-operator-5648d4c86-k5brh 1/1 Running 0 5m24s
162
+ ops-manager-localmode-0 0/1 Running 0 0m55s
163
+ ops-manager-localmode-1 1/1 Running 0 5m45s
164
+ ops-manager-localmode-db-0 1/1 Running 0 5m19s
165
+ ops-manager-localmode-db-1 1/1 Running 0 4m54s
166
+ ops-manager-localmode-db-2 1/1 Running 0 4m12s
167
+
168
+ The output looks like the following when the new Pod is ready:
169
+
170
+ .. code-block:: sh
171
+ :copyable: false
172
+ :emphasize-lines: 4
173
+
174
+ NAME READY STATUS RESTARTS AGE
175
+ mongodb-enterprise-operator-5648d4c86-k5brh 1/1 Running 0 5m24s
176
+ ops-manager-localmode-0 1/1 Running 0 3m55s
177
+ ops-manager-localmode-1 1/1 Running 0 5m45s
178
+ ops-manager-localmode-db-0 1/1 Running 0 5m19s
179
+ ops-manager-localmode-db-1 1/1 Running 0 4m54s
180
+ ops-manager-localmode-db-2 1/1 Running 0 4m12s
181
+
182
+ #. Repeat Steps **b** and **c** until you've deleted all of your
183
+ |onprem| Pods and confirmed that all of the new Pods are ready.
59
184
60
185
---
61
186
title : " Track the status of your |onprem| instance."
62
- stepnum : 6
187
+ stepnum : 8
63
188
level : 4
64
189
ref : track-k8s-instance
65
190
content : |
@@ -90,7 +215,7 @@ content: |
90
215
title : " Download the MongoDB installation archive to your local machine."
91
216
level : 4
92
217
ref : download-mdb-archive
93
- stepnum : 7
218
+ stepnum : 9
94
219
content : |
95
220
96
221
The installers that you download depend on the environment to which
@@ -152,7 +277,7 @@ content: |
152
277
title : " Copy the MongoDB installation archive to the |onprem| Persistent Volume for each |onprem| :opsmgrkube:`replica <spec.replicas>` you deployed."
153
278
level : 4
154
279
ref : copy-mdb-archive
155
- stepnum : 8
280
+ stepnum : 10
156
281
content : |
157
282
158
283
The commands that you use depend on the environment to which you
@@ -258,7 +383,7 @@ content: |
258
383
title : " Deploy a MongoDB Database Resource."
259
384
level : 4
260
385
ref : deploy-mdb-resource
261
- stepnum : 9
386
+ stepnum : 11
262
387
content : |
263
388
264
389
a. If you have not done so already, complete the following
0 commit comments