Skip to content

Commit 3bf1bef

Browse files
DOCSP-21687: TLS instruction improvements (#904)
1 parent 9c8d7d4 commit 3bf1bef

10 files changed

+85
-52
lines changed

source/includes/code-examples/yaml-files/example-opsmgr.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ spec:
1212
mms.fromEmailAddr: [email protected]
1313
mms.security.allowCORS: "false"
1414
security:
15-
certsSecretPrefix: <prefix> # Optional. Text to prefix to the name of the
15+
certsSecretPrefix: <prefix> # Required. Text to prefix to the name of the
1616
# secret that contains Ops Manager's TLS
17-
# certificate. If you omit
18-
# this setting, name the secret
19-
# <metadata.name>-cert.
17+
# certificate. Name the secret
18+
# <prefix>-<metadata.name>-cert.
2019
tls:
2120
ca: "opsmgr-ca" # Optional. Name of the ConfigMap file
2221
# containing the certicate authority that
@@ -27,11 +26,10 @@ spec:
2726
members: 3
2827
version: "4.4.0-ent"
2928
security:
30-
certsSecretPrefix: <prefix> # Optional. Text to prefix to the
29+
certsSecretPrefix: <prefix> # Required. Text to prefix to the
3130
# name of the secret that contains the Application
32-
# Database's TLS certificate. If you omit
33-
# this setting, name the secret
34-
# <metadata.name>-db-cert.
31+
# Database's TLS certificate. Name the secret
32+
# <prefix>-<metadata.name>-db-cert.
3533
tls:
3634
ca: "appdb-ca" # Optional. Name of the ConfigMap file
3735
# containing the certicate authority that

source/includes/prereqs/custom-ca-prereqs-sc-tls-only.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
- Generate one |tls| certificate for each of the following components:
22

33
- Each shard in your sharded cluster. Ensure that you add |san-dns|\s for
4-
each |k8s| pod that hosts a shard member to the certificate.
4+
each |k8s| pod that hosts a shard member to the certificate.
5+
6+
In your |tls| certificates, the |san-dns|
7+
for each shard pod must use the following format:
8+
9+
.. include:: /includes/prereqs/san-format-shards.rst
510

611
- Your config servers. Ensure that you add |san-dns|\s for
712
each |k8s| pod that hosts your config servers to the certificate.
13+
14+
In your |tls| certificates, the |san-dns|
15+
for each config server pod must use the following format:
16+
17+
.. include:: /includes/prereqs/san-format-csrs.rst
818

919
- Your |mongos| instances. Ensure that you add |san-dns|\s for
1020
each |k8s| pod that hosts a |mongos| to the certificate.
1121

12-
In your |tls| certificates, the |san-dns| for each pod must use this
22+
In your |tls| certificates, the |san-dns| for each |mongos| pod must use this
1323
format:
1424

1525
.. include:: /includes/prereqs/san-format.rst

source/includes/prereqs/custom-ca-prereqs-sc-tls-x509-internal.rst

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,25 @@
44
- Generate one |tls| certificate for each of the following components:
55

66
- Each shard in your sharded cluster. Ensure that you add |san-dns|\s for
7-
each |k8s| pod that hosts a shard member to the certificate.
7+
each |k8s| pod that hosts a shard member to the certificate.
8+
9+
In your |tls| certificates, the |san-dns|
10+
for each shard pod must use the following format:
11+
12+
.. include:: /includes/prereqs/san-format-shards.rst
813

914
- Your config servers. Ensure that you add |san-dns|\s for
1015
each |k8s| pod that hosts your config servers to the certificate.
16+
17+
In your |tls| certificates, the |san-dns|
18+
for each config server pod must use the following format:
19+
20+
.. include:: /includes/prereqs/san-format-csrs.rst
1121

1222
- Your |mongos| instances. Ensure that you add |san-dns|\s for
1323
each |k8s| pod that hosts a |mongos| to the certificate.
1424

15-
In your |tls| certificates, the |san-dns| for each pod must use this
25+
In your |tls| certificates, the |san-dns| for each |mongos| pod must use this
1626
format:
1727

1828
.. include:: /includes/prereqs/san-format.rst
@@ -22,18 +32,28 @@
2232
- Generate one X.509 certificate for each of the following components:
2333

2434
- Each shard in your sharded cluster. Ensure that you add |san-dns|\s for
25-
each |k8s| pod that hosts a shard member to the certificate.
35+
each |k8s| pod that hosts a shard member to the certificate.
36+
37+
In your |tls| certificates, the |san-dns|
38+
for each shard pod must use the following format:
39+
40+
.. include:: /includes/prereqs/san-format-shards.rst
2641

2742
- Your config servers. Ensure that you add |san-dns|\s for
2843
each |k8s| pod that hosts your config servers to the certificate.
44+
45+
In your |tls| certificates, the |san-dns|
46+
for each config server pod must use the following format:
47+
48+
.. include:: /includes/prereqs/san-format-csrs.rst
2949

3050
- Your |mongos| instances. Ensure that you add |san-dns|\s for
3151
each |k8s| pod that hosts a |mongos| to the certificate.
3252

33-
In your X.509 certificates, the |san-dns| for each pod must use this
34-
format:
53+
In your |tls| certificates, the |san-dns| for each |mongos| pod must use this
54+
format:
3555

36-
.. include:: /includes/prereqs/san-format.rst
56+
.. include:: /includes/prereqs/san-format.rst
3757

3858
- You must possess the |certauth| certificate and the key that you used to
3959
sign your |tls| certificates.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. code-block:: none
2+
3+
<pod-name>.<metadata.name>-cs.<namespace>.svc.cluster.local
4+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. code-block:: none
2+
3+
<pod-name>.<metadata.name>-sh.<namespace>.svc.cluster.local
4+

source/includes/steps-deploy-k8s-opsmgr-https.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ content: |
1515
1616
.. code-block:: sh
1717
18-
kubectl create secret tls <metadata.name>-cert \
18+
kubectl create secret tls <prefix>-<metadata.name>-cert \
1919
--cert=<om-tls-cert> \
2020
--key=<om-tls-key>
2121
@@ -61,8 +61,7 @@ content: |
6161
6262
.. code-block:: sh
6363
64-
cat cert1.crt cert2.crt cert3.crt cert4.crt >> ca-pem
65-
64+
cat cert1.crt cert2.crt cert3.crt cert4.crt >> mms-ca.crt
6665
#. Create the |k8s-configmap|:
6766
6867
.. code-block:: sh
@@ -152,13 +151,10 @@ content: |
152151
| ``.security``
153152
| ``.``:opsmgrkube:`~spec.security.certsSecretPrefix`
154153
- string
155-
- *Optional*.
154+
- *Required*.
156155
157156
Text to prefix to the name of the secret that contains
158157
|onprem|\s |tls| certificates.
159-
160-
If you omit this setting, you must name the secret
161-
``<metadata.name>-cert``.
162158
- ``om-prod``
163159
164160
* - | ``spec``

source/includes/steps-source-deploy-k8s-resource.yaml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ content: |
358358
359359
.. code-block:: sh
360360
361-
kubectl create secret tls <metadata.name>-cert \
361+
kubectl create secret tls <prefix>-<metadata.name>-cert \
362362
--cert=<replica-set-tls-cert> \
363363
--key=<replica-set-tls-key>
364364
@@ -384,7 +384,7 @@ content: |
384384
385385
.. code-block:: sh
386386
387-
kubectl create secret tls <metadata.name>-agent-certs \
387+
kubectl create secret tls <prefix>-<metadata.name>-agent-certs \
388388
--cert=<agent-tls-cert> \
389389
--key=<agent-tls-key>
390390
@@ -402,7 +402,7 @@ content: |
402402
403403
.. code-block:: sh
404404
405-
kubectl create secret tls <metadata.name>-agent-certs \
405+
kubectl create secret tls <prefix>-<metadata.name>-agent-certs \
406406
--cert=<agent-tls-cert> \
407407
--key=<agent-tls-key> \
408408
--dry-run=client \
@@ -422,7 +422,7 @@ content: |
422422
.. code-block:: sh
423423
424424
425-
kubectl create secret tls <metadata.name>-cert \
425+
kubectl create secret tls <prefix>-<metadata.name>-cert \
426426
--cert=<replica-set-tls-cert> \
427427
--key=<replica-set-tls-key> \
428428
--dry-run=client \
@@ -445,7 +445,7 @@ content: |
445445
446446
.. code-block:: sh
447447
448-
kubectl create secret tls <metadata.name>-clusterfile \
448+
kubectl create secret tls <prefix>-<metadata.name>-clusterfile \
449449
--cert=<replica-set-clusterfile-tls-cert> \
450450
--key=<replica-set-clusterfile-tls-key>
451451
@@ -467,7 +467,7 @@ content: |
467467
468468
.. code-block:: sh
469469
470-
kubectl create secret tls <metadata.name>-clusterfile \
470+
kubectl create secret tls <prefix>-<metadata.name>-clusterfile \
471471
--cert=<replica-set-clusterfile-tls-cert> \
472472
--key=<replica-set-clusterfile-tls-key> \
473473
--dry-run=client \
@@ -500,11 +500,11 @@ content: |
500500
501501
.. code-block:: sh
502502
503-
kubectl -n mongodb create secret tls <metadata.name>-0-cert \
503+
kubectl -n mongodb create secret tls <prefix>-<metadata.name>-0-cert \
504504
--cert=<shard-0-tls-cert> \
505505
--key=<shard-0-tls-key>
506506
507-
kubectl -n mongodb create secret tls <metadata.name>-1-cert \
507+
kubectl -n mongodb create secret tls <prefix>-<metadata.name>-1-cert \
508508
--cert=<shard-1-tls-cert> \
509509
--key=<shard-1-tls-key>
510510
@@ -521,14 +521,14 @@ content: |
521521
522522
.. code-block:: sh
523523
524-
kubectl -n mongodb create secret tls <metadata.name>-0-cert \
524+
kubectl -n mongodb create secret tls <prefix>-<metadata.name>-0-cert \
525525
--cert=<shard-0-tls-cert> \
526526
--key=<shard-0-tls-key> \
527527
--dry-run=client \
528528
-o yaml |
529529
kubectl apply -f -
530530
531-
kubectl -n mongodb create secret tls <metadata.name>-1-cert \
531+
kubectl -n mongodb create secret tls <prefix>-<metadata.name>-1-cert \
532532
--cert=<shard-1-tls-cert> \
533533
--key=<shard-1-tls-key> \
534534
--dry-run=client \
@@ -547,7 +547,7 @@ content: |
547547
548548
.. code-block:: sh
549549
550-
kubectl -n mongodb create secret tls <metadata.name>-config-cert \
550+
kubectl -n mongodb create secret tls <prefix>-<metadata.name>-config-cert \
551551
--cert=<config-tls-cert> \
552552
--key=<config-tls-key>
553553
@@ -565,7 +565,7 @@ content: |
565565
566566
.. code-block:: sh
567567
568-
kubectl -n mongodb create secret tls <metadata.name>-config-cert \
568+
kubectl -n mongodb create secret tls <prefix>-<metadata.name>-config-cert \
569569
--cert=<config-tls-cert> \
570570
--key=<config-tls-key> \
571571
--dry-run=client \
@@ -584,7 +584,7 @@ content: |
584584
585585
.. code-block:: sh
586586
587-
kubectl -n mongodb create secret tls <metadata.name>-mongos-cert \
587+
kubectl -n mongodb create secret tls <prefix>-<metadata.name>-mongos-cert \
588588
--cert=<mongos-tls-cert> \
589589
--key=<mongos-tls-key>
590590
@@ -602,7 +602,7 @@ content: |
602602
603603
.. code-block:: sh
604604
605-
kubectl -n mongodb create secret tls <metadata.name>-mongos-cert \
605+
kubectl -n mongodb create secret tls <prefix>-<metadata.name>-mongos-cert \
606606
--cert=<mongos-tls-cert> \
607607
--key=<mongos-tls-key> \
608608
--dry-run=client \
@@ -621,11 +621,11 @@ content: |
621621
622622
.. code-block:: sh
623623
624-
kubectl -n mongodb create secret tls <metadata.name>-0-clusterfile \
624+
kubectl -n mongodb create secret tls <prefix>-<metadata.name>-0-clusterfile \
625625
--cert=<shard-0-clusterfile-tls-cert> \
626626
--key=<shard-0-clusterfile-tls-cert>
627627
628-
kubectl -n mongodb create secret tls <metadata.name>-1-clusterfile \
628+
kubectl -n mongodb create secret tls <prefix>-<metadata.name>-1-clusterfile \
629629
--cert=<shard-1-clusterfile-tls-cert> \
630630
--key=<shard-1-clusterfile-tls-cert>
631631
@@ -641,14 +641,14 @@ content: |
641641
642642
.. code-block:: sh
643643
644-
kubectl -n mongodb create secret tls <metadata.name>-0-clusterfile \
644+
kubectl -n mongodb create secret tls <prefix>-<metadata.name>-0-clusterfile \
645645
--cert=<shard-0-clusterfile-tls-cert> \
646646
--key=<shard-0-clusterfile-tls-cert> \
647647
--dry-run=client \
648648
-o yaml |
649649
kubectl apply -f -
650650
651-
kubectl -n mongodb create secret tls <metadata.name>-1-clusterfile \
651+
kubectl -n mongodb create secret tls <prefix>-<metadata.name>-1-clusterfile \
652652
--cert=<shard-1-clusterfile-tls-cert> \
653653
--key=<shard-1-clusterfile-tls-cert> \
654654
--dry-run=client \
@@ -667,7 +667,7 @@ content: |
667667
668668
.. code-block:: sh
669669
670-
kubectl -n mongodb create secret tls <metadata.name>-config-clusterfile \
670+
kubectl -n mongodb create secret tls <prefix>-<metadata.name>-config-clusterfile \
671671
--cert=<config-clusterfile-tls-cert> \
672672
--key=<config-clusterfile-tls-cert>
673673
@@ -683,7 +683,7 @@ content: |
683683
684684
.. code-block:: sh
685685
686-
kubectl -n mongodb create secret tls <metadata.name>-config-clusterfile \
686+
kubectl -n mongodb create secret tls <prefix>-<metadata.name>-config-clusterfile \
687687
--cert=<config-clusterfile-tls-cert> \
688688
--key=<config-clusterfile-tls-cert> \
689689
--dry-run=client \
@@ -702,7 +702,7 @@ content: |
702702
703703
.. code-block:: sh
704704
705-
kubectl -n mongodb create secret tls <metadata.name>-mongos-clusterfile \
705+
kubectl -n mongodb create secret tls <prefix>-<metadata.name>-mongos-clusterfile \
706706
--cert=<mongos-clusterfile-tls-cert> \
707707
--key=<mongos-clusterfile-tls-cert>
708708
@@ -718,7 +718,7 @@ content: |
718718
719719
.. code-block:: sh
720720
721-
kubectl -n mongodb create secret tls <metadata.name>-mongos-clusterfile \
721+
kubectl -n mongodb create secret tls <prefix>-<metadata.name>-mongos-clusterfile \
722722
--cert=<mongos-clusterfile-tls-cert> \
723723
--key=<mongos-clusterfile-tls-cert> \
724724
--dry-run=client \

source/includes/steps-source-deploy-om-resource.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ content: |
1010
1111
.. code-block:: sh
1212
13-
kubectl create secret tls <metadata.name>-db-cert \
13+
kubectl create secret tls <prefix>-<metadata.name>-db-cert \
1414
--cert=<appdb-tls-cert> \
1515
--key=<appdb-tls-key>
1616
@@ -85,7 +85,7 @@ content: |
8585
:copyable: false
8686
:start-after: START-secure-appdb-full
8787
:end-before: END-secure-appdb-full
88-
:emphasize-lines: 29-39
88+
:emphasize-lines: 29-37
8989
9090
.. note::
9191

source/reference/k8s/example-opsmgr-https.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spec:
1313
externalConnectivity:
1414
type: LoadBalancer
1515
security:
16-
certsSecretPrefix: <prefix> # Optional. Text to prefix
16+
certsSecretPrefix: <prefix> # Required. Text to prefix
1717
# the name of the secret that contains
1818
# Ops Manager's TLS certificate.
1919
tls:

source/tutorial/mdb-resources-arch.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,15 @@ performs the following actions to reconcile the changes:
225225

226226
- If :ref:`TLS <secure-tls>` is enabled for a replica set, the
227227
|k8s-op-short| looks for certificates provided in the
228-
``<resource-name>-cert`` secret or your :ref:`secret storage tool <k8s-set-secret-storage-tool>`.
228+
``<prefix>-<resource-name>-cert`` secret or your
229+
:ref:`secret storage tool <k8s-set-secret-storage-tool>`.
229230

230231
- If :ref:`TLS <secure-tls>` is enabled for a sharded cluster, the
231232
|k8s-op-short| looks for certificates in these secrets:
232233

233-
- ``<resource-name>-x-cert`` for each shard member.
234-
- ``<resource-name>-config-cert`` for all config servers.
235-
- ``<resource-name>-mongos-cert`` for all |mongos| instances.
234+
- ``<prefix>-<resource-name>-x-cert`` for each shard member.
235+
- ``<prefix>-<resource-name>-config-cert`` for all config servers.
236+
- ``<prefix>-<resource-name>-mongos-cert`` for all |mongos| instances.
236237
- Your :ref:`secret storage tool <k8s-set-secret-storage-tool>`.
237238

238239
- If :ref:`X.509 <create-x509-certs>` or

0 commit comments

Comments
 (0)