1
+ ---
2
+ title : If you haven't done so already, deploy a replica with the |k8s-op-short|.
3
+ stepnum : 1
4
+ level : 4
5
+ ref : pre-deploy-replicaset
6
+ content : |
7
+
8
+ Follow the instructions to :ref:` deploy a replica set
9
+ <deploy-replica-set>`. To simplify the configuration, don't enable
10
+ |tls| with the :setting:`spec.security.tls.enabled` setting.
11
+
12
+ ---
13
+ title : " If you already deployed a replica set with the |k8s-op-short| with |tls| enabled, remove the |csrs| for each host in your deployment."
14
+ level : 4
15
+ ref : remove-tls-existing-replicasets
16
+ stepnum : 2
17
+ optional : true
18
+ content : |
19
+ a. Invoke the following command to retrieve the |csrs| for each host:
20
+
21
+ .. code-block:: sh
22
+
23
+ kubectl get csr
24
+
25
+ The command's output resembles the following:
26
+
27
+ .. literalinclude:: /includes/code-examples/responses/k8s-cert-output.sh
28
+ :language: sh
29
+ :copyable: false
30
+ :start-after: START-output-k8s-rs-tls-csrs-approved
31
+ :end-before: END-output-k8s-rs-tls-csrs-approved
32
+
33
+ #. Repeat the following command for each host in your deployment to
34
+ remove the |csrs|:
35
+
36
+ .. code-block:: none
37
+
38
+ kubectl delete my-secure-rs-0.mongodb
39
+
40
+ .. important::
41
+
42
+ Remove only the |tls| |csrs|. Don't remove X.509 or any other
43
+ |csrs|.
44
+ ---
1
45
title : Create a NodePort for each |k8s-pod|.
2
46
level : 4
3
- stepnum : 1
47
+ stepnum : 3
4
48
ref : k8s-ext-rs-create-nodeports
5
49
content : |
6
50
@@ -15,7 +59,7 @@ content: |
15
59
---
16
60
title : Discover the dynamically assigned NodePorts.
17
61
level : 4
18
- stepnum : 2
62
+ stepnum : 4
19
63
ref : k8s-ext-rs-discover-nodeports
20
64
content : |
21
65
@@ -30,16 +74,13 @@ content: |
30
74
<my-replica-set>-svc ClusterIP None <none> 27017/TCP 38m
31
75
32
76
NodePorts range from 30000 to 32767, inclusive.
33
-
34
77
---
35
78
title : " Open your replica set resource |yaml| file."
36
79
level : 4
37
- stepnum : 3
80
+ stepnum : 5
38
81
ref : open-replset-resource
39
- content : |
40
-
41
82
---
42
- stepnum : 4
83
+ stepnum : 6
43
84
ref : copy-k8s-example-rs
44
85
source :
45
86
file : steps-source-deploy-k8s-resource.yaml
@@ -60,15 +101,14 @@ replacement:
60
101
61
102
.. literalinclude:: /includes/code-examples/yaml-files/example-replica-set.yaml
62
103
:language: yaml
63
- :start-after: START-horizon-addcert-replset-lower
64
- :end-before: END-horizon-addcert-replset-lower
104
+ :start-after: START-horizon-addcert-replset-random-ports
105
+ :end-before: END-horizon-addcert-replset-random-ports
65
106
:linenos:
66
107
:lineno-start: 15
67
108
:emphasize-lines: 1-8
68
-
69
109
---
70
110
level : 4
71
- stepnum : 5
111
+ stepnum : 7
72
112
ref : paste-k8s-example-rs
73
113
source :
74
114
file : steps-source-deploy-k8s-resource.yaml
@@ -79,26 +119,29 @@ replacement:
79
119
---
80
120
title : " Change the highlighted settings to your preferred values."
81
121
level : 4
82
- stepnum : 6
122
+ stepnum : 8
83
123
ref : change-replset-resource
84
124
content : |
85
125
86
126
.. include:: /includes/list-tables/resource-keys-split-horizons.rst
87
127
88
128
---
89
- title : Add the ports for external connectivity .
129
+ title : Confirm the external hostnames and NodePort values in your replica set resource .
90
130
level : 4
91
- stepnum : 7
92
- ref : k8s-ext-rs-update-ports
131
+ stepnum : 9
132
+ ref : k8s-ext-rs-confirm-hostnames
93
133
content : |
94
134
95
- Set the ports to the NodePort values that you set for the
96
- ``example-website`` connectivity setting.
135
+ Confirm that the external hostnames in the
136
+ :setting:`spec.connectivity.replicaSetHorizons` setting are correct .
97
137
98
138
External hostnames should match the |dns| names of |k8s| worker
99
139
nodes. These can be *any* nodes in the |k8s| cluster. |k8s-nodes| do
100
140
internal routing if the pod is run on another node.
101
141
142
+ Set the ports in :setting:`spec.connectivity.replicaSetHorizons` to
143
+ the NodePort values that you discovered.
144
+
102
145
.. example::
103
146
104
147
.. literalinclude:: /includes/code-examples/yaml-files/example-replica-set.yaml
@@ -109,15 +152,9 @@ content: |
109
152
:lineno-start: 15
110
153
:emphasize-lines: 6-8
111
154
112
- .. note::
113
-
114
- You may need to delete each |k8s-pod|, then change the horizon
115
- values, and then reapply. |k8s-op-short| then reconfigures the
116
- horizons.
117
-
118
155
---
119
156
level : 4
120
- stepnum : 8
157
+ stepnum : 10
121
158
ref : save-object-spec-rs
122
159
source :
123
160
file : steps-source-deploy-k8s-resource.yaml
@@ -126,28 +163,47 @@ replacement:
126
163
k8sResource : :term:`replica set`
127
164
---
128
165
level : 4
129
- stepnum : 9
130
- ref : start -k8s-deployment-rs
166
+ stepnum : 11
167
+ ref : restart -k8s-deployment-rs
131
168
source :
132
169
file : steps-source-deploy-k8s-resource.yaml
133
170
ref : restart-k8s-deployment
134
171
replacement :
135
172
k8sResource : :term:`replica set`
136
173
k8sResourceType : replica-set
137
174
---
175
+ stepnum : 12
138
176
level : 4
139
- stepnum : 10
140
- ref : track-k8s-deployment-rs
177
+ ref : check-k8s-deployment-rs-tls
141
178
source :
142
179
file : steps-source-deploy-k8s-resource.yaml
143
- ref : track-k8s-deployment-basic
180
+ ref : check-k8s-deployment
181
+ ---
182
+ stepnum : 13
183
+ level : 4
184
+ ref : get-csrs-rs-tls
185
+ source :
186
+ file : steps-source-deploy-k8s-resource.yaml
187
+ ref : get-csrs
144
188
replacement :
145
- k8sResource : :term:`replica set`
146
-
189
+ k8sResource : replica set
190
+ startTag : START-output-k8s-rs-tls-csrs
191
+ endTag : END-output-k8s-rs-tls-csrs
192
+ ---
193
+ stepnum : 14
194
+ level : 4
195
+ ref : approve-csrs-rs-tls
196
+ source :
197
+ file : steps-source-deploy-k8s-resource.yaml
198
+ ref : approve-host-csrs
199
+ replacement :
200
+ k8sResource : replica set
201
+ startTag : START-input-k8s-rs-csrs
202
+ endTag : END-input-k8s-rs-csrs
147
203
---
148
204
title : Test the connection to the replica set.
149
205
level : 4
150
- stepnum : 11
206
+ stepnum : 15
151
207
ref : k8s-ext-rs-test-conn
152
208
content : |
153
209
0 commit comments