Skip to content

Commit eaac3a6

Browse files
authored
Update air-gapped-deployment.rst
1 parent b19eb48 commit eaac3a6

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

source/deployment-guide/server/air-gapped-deployment.rst

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ A private container registry securely stores the Docker images necessary for air
116116
.. tab:: Linux
117117

118118
(Ubuntu) Set up a private Debian package mirror
119-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
119+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
120120
We will use Aptly to create a local mirror, although you can also use other options such as debmirror.
121121

122122
1. **Install Aptly** (on an internet-connected machine):
@@ -159,15 +159,15 @@ A private container registry securely stores the Docker images necessary for air
159159
160160
7. **Client configuration:** Configure apt to use your local mirror:
161161

162-
.. code-block:: bash
162+
.. code-block:: bash
163163
164-
cat > /etc/apt/sources.list << EOF
165-
deb http://mirror.example.com/debian bullseye main contrib non-free
166-
EOF
164+
cat > /etc/apt/sources.list << EOF
165+
deb http://mirror.example.com/debian bullseye main contrib non-free
166+
EOF
167167
168168
169169
(RHEL/CentOS) Set up a private RHEL package mirror
170-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
170+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
171171
We will use reprosync for a local mirror.
172172
173173
1. **Install required tools** (on an internet-connected RHEL system):
@@ -238,7 +238,7 @@ A private container registry securely stores the Docker images necessary for air
238238
.. tab:: Kubernetes
239239
240240
Set up a self-hosted private container registry
241-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
241+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
242242
243243
1. **Install Docker Registry**:
244244
@@ -266,7 +266,7 @@ A private container registry securely stores the Docker images necessary for air
266266
267267
b. Run the registry with TLS:
268268
269-
.. code-block:: bash
269+
.. code-block:: bash
270270
271271
docker run -d -p 5000:5000 --restart=always --name registry \
272272
-v /mnt/registry:/var/lib/registry \
@@ -276,51 +276,51 @@ A private container registry securely stores the Docker images necessary for air
276276
registry:2
277277
278278
Configure Kubernetes to use private image registries
279-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
279+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
280280
281281
When using Kubernetes in an air-gapped environment, you need to configure it to use your private registry.
282282
283283
1. **Create a kubernetes secret for registry authentication**:
284284
285-
.. code-block:: bash
285+
.. code-block:: bash
286286
287-
kubectl create secret docker-registry regcred \
288-
--docker-server=registry.example.com:5000 \
289-
--docker-username=your_username \
290-
--docker-password=your_password \
291-
287+
kubectl create secret docker-registry regcred \
288+
--docker-server=registry.example.com:5000 \
289+
--docker-username=your_username \
290+
--docker-password=your_password \
291+
292292
293293
2. **Reference the secret in pod specifications**:
294294
295-
.. code-block:: yaml
295+
.. code-block:: yaml
296296
297-
apiVersion: v1
298-
kind: Pod
299-
metadata:
300-
name: mattermost-pod
301-
spec:
302-
containers:
303-
- name: mattermost
304-
image: registry.example.com:5000/mattermost/mattermost-enterprise-edition:latest
305-
imagePullSecrets:
306-
- name: regcred
297+
apiVersion: v1
298+
kind: Pod
299+
metadata:
300+
name: mattermost-pod
301+
spec:
302+
containers:
303+
- name: mattermost
304+
image: registry.example.com:5000/mattermost/mattermost-enterprise-edition:latest
305+
imagePullSecrets:
306+
- name: regcred
307307
308308
3. **For Helm deployments**, specify the registry in ``values.yaml``:
309309
310-
.. code-block:: yaml
310+
.. code-block:: yaml
311311
312-
image:
313-
repository: registry.example.com:5000/mattermost/mattermost-enterprise-edition
314-
tag: latest
315-
pullPolicy: IfNotPresent
312+
image:
313+
repository: registry.example.com:5000/mattermost/mattermost-enterprise-edition
314+
tag: latest
315+
pullPolicy: IfNotPresent
316316
317-
imagePullSecrets:
318-
- name: regcred
317+
imagePullSecrets:
318+
- name: regcred
319319
320320
.. tab:: Docker
321321
322322
Set up a self-hosted private container registry
323-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
323+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
324324
325325
1. **Install Docker Registry**:
326326
@@ -348,7 +348,7 @@ A private container registry securely stores the Docker images necessary for air
348348
349349
b. Run the registry with TLS:
350350
351-
.. code-block:: bash
351+
.. code-block:: bash
352352
353353
docker run -d -p 5000:5000 --restart=always --name registry \
354354
-v /mnt/registry:/var/lib/registry \
@@ -358,7 +358,7 @@ A private container registry securely stores the Docker images necessary for air
358358
registry:2
359359
360360
Configure Docker to use private image registries
361-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
361+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
362362
363363
Configure Docker on all hosts to trust and use your private registry.
364364

0 commit comments

Comments
 (0)