Skip to content

Commit e6183a2

Browse files
jeff-allen-mongojwilliams-mongo
authored andcommitted
(DOCSP-6854): Tutorial to connect to k8s deployment from inside k8s (#83)
* (DOCSP-6854): Tutorial to connect to k8s deployment from inside k8s * Updates per Tony's feedback * Updates per Tony's feedback * small tweak per Cian's feedback * reformatting
1 parent da9fd6e commit e6183a2

File tree

5 files changed

+103
-0
lines changed

5 files changed

+103
-0
lines changed

source/connect.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
:noprevnext:
2+
3+
=================
4+
Deployment Access
5+
=================
6+
7+
.. default-domain:: mongodb
8+
9+
The following pages describe how to connect to your MongoDB
10+
resource deployed by |k8s|:
11+
12+
.. include:: /includes/toc/dfn-list-connect.rst
13+
14+
.. include:: /includes/toc/connect.rst
15+
16+
.. class:: hidden
17+
18+
.. toctree::
19+
:titlesonly:
20+
21+
/tutorial/connect-from-inside-k8s
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: "Open the :guilabel:`Topology` view for your deployment."
3+
level: 4
4+
stepnum: 1
5+
ref: open-processes-view
6+
content: |
7+
Click :guilabel:`Deployment` in the left navigation.
8+
---
9+
title: "Click :icon-mms:`ellipsis` for the deployment to which you want
10+
to connect."
11+
level: 4
12+
stepnum: 2
13+
ref: click-ellipses
14+
---
15+
title: "Click :guilabel:`Connect to this instance`."
16+
level: 4
17+
stepnum: 3
18+
ref: click-connect
19+
---
20+
title: "Copy the connection command displayed in the
21+
:guilabel:`Connect to your Deployment` dialog."
22+
level: 4
23+
stepnum: 4
24+
ref: copy-command
25+
---
26+
title: "Run the connection command in a terminal to connect to the
27+
deployment."
28+
level: 4
29+
stepnum: 5
30+
ref: run-command
31+
content: |
32+
.. example::
33+
34+
To connect to a sharded cluster resource named
35+
``shardedcluster``, you might use the following connection
36+
string:
37+
38+
.. code-block:: none
39+
:copyable: false
40+
41+
mongo --host shardedcluster-mongos-0.shardedcluster-svc.mongodb.svc.cluster.local --port 27017

source/includes/toc-connect.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
file: /tutorial/connect-from-inside-k8s
2+
description: |
3+
Connect to a MongoDB resource deployed by |k8s| from inside of
4+
the |k8s| cluster.
5+
...

source/index.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ optimal performance.
5252
Installation </installation>
5353
Database Deployment </deploy>
5454
User Management </tutorial/manage-database-users-x509>
55+
/connect
5556
/reference
5657
/specification
5758
Release Notes </release-notes>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.. _connect-from-outside-k8s:
2+
3+
====================================================
4+
Connect to a MongoDB Resource from Inside Kubernetes
5+
====================================================
6+
7+
.. default-domain:: mongodb
8+
9+
The following procedure describes how to connect to a MongoDB resource
10+
deployed by |k8s| from inside of the |k8s| cluster.
11+
12+
Considerations
13+
--------------
14+
15+
You must be able to connect to the host and port where you deployed your
16+
|k8s| resource. To learn more about connecting to your deployment, see
17+
:opsmgr:`Connect to a MongoDB Process </tutorial/connect-to-mongodb/>`.
18+
19+
Procedure
20+
---------
21+
22+
Perform the following steps in the |mms| or
23+
`Cloud Manager <docs.cloudmanager.com/current/>`__
24+
:abbr:`UI (User Interface)`, depending on where your clusters are
25+
hosted:
26+
27+
.. include:: /includes/steps/connect-from-inside-k8s.rst
28+
29+
When connecting to a resource from inside of |k8s|, the
30+
hostname to which you connect has the following form:
31+
32+
.. code-block:: sh
33+
34+
<k8s-pod-name>.<k8s-internal-service-name>.<k8s-namespace>.<cluster-name>
35+

0 commit comments

Comments
 (0)