Skip to content

Commit e3b3410

Browse files
JuliaMongojwilliams-mongo
authored andcommitted
(DOCSP-13671) Prod notes troubleshooting, invalid DNS in TLS certs (#547)
* (DOCSP-13671) Prod notes troubleshooting, invalid DNS in TLS certs * Renamed one file, added info, per Raj * Include copy review from NL
1 parent 0150bdb commit e3b3410

12 files changed

+74
-11
lines changed

conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
source_constants = {
6060
'version': version,
6161
'k8s-op-short': 'Kubernetes Operator',
62-
'k8s-api-version': 'v1.20',
62+
'k8s-api-version': 'v1.21',
6363
'aagent': 'MongoDB Agent or legacy Automation Agent',
6464
'aagents': 'MongoDB Agents or legacy Automation Agents',
6565
'mdbagent': 'MongoDB Agent',

source/includes/check-resource-status.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ command:
66
kubectl get mdb <resource-name> -o yaml -w
77
88
The ``-w`` flag means "watch". With the "watch" flag set, the output
9-
refreshes immediately when something changes until the status phase
9+
refreshes immediately when the configuration changes until the status phase
1010
achieves the ``Running`` state.
1111

1212
See :doc:`/reference/troubleshooting` for information about the resource

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@
1414
.. include:: /includes/prereqs/pem-file-description.rst
1515

1616
.. include:: /includes/prereqs/custom-ca-prereqs-naming-conventions.rst
17+
18+
.. admonition:: About the Domain Names in certificates
19+
20+
.. include:: /includes/prereqs/pem-file-domain-name.rst

source/includes/prereqs/pem-file-description.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ To create the |pem| file, concatenate the |tls| certificate and the
22
Private Key. An example of a |pem| file would resemble:
33

44
.. code-block:: text
5+
:copyable: false
56
67
-----BEGIN CERTIFICATE-----
78
...
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Each certificate should include a valid Domain Name.
2+
3+
For each replica set or sharded cluster member, the Common Name, also
4+
known as the Domain Name, for that member's certificate must match
5+
the |fqdn| of the POD on which this cluster member
6+
is deployed.
7+
8+
The |fqdn| name in each certificate has the following syntax:
9+
``pod-name.service-name.namespace.svc.cluster.local``. This name is
10+
different for each Pod hosting a member of the replica set or a
11+
sharded cluster.
12+
13+
For example, for a member of a replica set deployed on a Pod with
14+
the name ``rs-mongos-0-0``, in the |k8s-op-short| service
15+
named ``mongo-0`` that is created in the default ``mongodb``
16+
namespace, the |fqdn| is:
17+
18+
.. code-block:: sh
19+
20+
rs-mongos-0-0.mongo-0.mongodb.svc.cluster.local

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ level: 4
281281
ref: apply-changes-k8s-deployment
282282
content: |
283283
284-
Invoke the following |k8s| command to updated your
284+
Invoke the following |k8s| command to update your
285285
{{k8sResource}}:
286286
287287
.. code-block:: sh

source/index.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,6 @@ optimal performance.
5757
/specification
5858
Release Notes </release-notes>
5959
Production Notes </reference/production-notes>
60+
/reference/troubleshooting
6061
Known Issues </reference/known-issues>
6162
MongoDB Community Kubernetes Operator <https://github.com/mongodb/mongodb-kubernetes-operator>

source/reference.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ Reference
2424
:ref:`k8s-exclusive-settings`
2525
Review settings that only the |k8s-op-short| can set.
2626

27-
:ref:`k8s-troubleshooting`
28-
Find solutions to |k8s| issues.
29-
3027
:ref:`k8s-support-lifecycle`
3128
Review the EOL dates for |k8s-op-short| versions.
3229

@@ -42,7 +39,6 @@ Reference
4239
/reference/k8s-operator-specification
4340
/reference/operator-settings
4441
/reference/k8s-op-exclusive-settings
45-
/reference/troubleshooting
4642
/reference/support-lifecycle
4743
/third-party-licenses
4844

source/reference/production-notes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ Certificate Authority. To learn more, see
529529
</tasks/tls/managing-tls-in-a-cluster/>`.
530530

531531
The default |tls| mode is ``requireTLS``. You can customize it using the
532-
the :setting:`spec.additionalMongodConfig.net.ssl.mode` configuration
532+
:setting:`spec.additionalMongodConfig.net.ssl.mode` configuration
533533
parameter, as shown in the following abbreviated example.
534534

535535
.. code-block:: yaml

source/reference/troubleshooting.txt

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ invoke one of the following commands:
3535

3636
.. note::
3737

38-
The ``opsManager`` controller watches the database resources
38+
The |com| controller watches the database resources
3939
defined in the following settings:
4040

4141
- :opsmgrkube:`spec.backup.opLogStores`
@@ -581,8 +581,8 @@ policy through the :opsmgr:`API </reference/api/controlled-features/update-contr
581581

582582
.. _k8s-debug-failed container:
583583

584-
Debugging a Failing Container
585-
-----------------------------
584+
Debug a Failing Container
585+
-------------------------
586586

587587
A container might fail with an error that results in |k8s| restarting
588588
that container in a loop.
@@ -622,3 +622,39 @@ commands. This requires you to prevent the container from restarting.
622622

623623
kubectl exec -it <pod-name> bash
624624

625+
Verify Corrrectness of Domain Names in TLS Certificates
626+
-------------------------------------------------------
627+
628+
A MongoDB replica set or sharded cluster may fail to reach
629+
the ``READY`` state if the |tls| certificate is invalid.
630+
631+
When you :ref:`configure TLS
632+
<secure-tls>` for MongoDB replica sets or sharded clusters, verify
633+
that you specify a valid certificate.
634+
635+
If you don't specify the correct Domain Name for each |tls| certificate,
636+
the |k8s-op-short| logs may contain an error message similar to the
637+
following, where ``foo.svc.local`` is the incorrectly-specified Domain
638+
Name for the cluster member's Pod:
639+
640+
.. code-block:: sh
641+
:copyable: false
642+
643+
TLS attempt failed : x509: certificate is valid for foo.svc.local,
644+
not mongo-0-0.mongo-0.mongodb.svc.cluster.local
645+
646+
.. include:: /includes/prereqs/pem-file-domain-name.rst
647+
648+
To check whether you have correctly configured |tls| certificates:
649+
650+
1. Run:
651+
652+
.. code-block:: sh
653+
654+
kubectl logs -f <pod_name>
655+
656+
2. Check for |tls|-related messages in the |k8s-op-short| log files.
657+
658+
To learn more about |tls| certificate requirements, see
659+
:ref:`TLS prerequisites <secure-tls-prerequisites>`.
660+

0 commit comments

Comments
 (0)