Skip to content

Commit 416d446

Browse files
committed
docs: Add registry HA procedure
Refs: #2002
1 parent 0128d84 commit 416d446

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

docs/operation/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ do not have a working MetalK8s_ setup.
2020
solutions
2121
changing_node_hostname
2222
metalk8s-utils
23+
registry_ha
2324
listening_processes
2425
troubleshooting/index
2526
sosreport

docs/operation/registry_ha.rst

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
Registry HA
2+
===========
3+
4+
To be able to run fully offline, MetalK8s comes with its own registry serving
5+
all necessary images used by its containers.
6+
This registry container sits on the Bootstrap node.
7+
8+
With a highly available registry, container images are served by multiple
9+
nodes, which means the Bootstrap node can be lost without impacting the
10+
cluster.
11+
It allows pods to be scheduled, even if the needed images are not cached
12+
locally.
13+
14+
.. note::
15+
16+
This procedure only talk about registry HA as Bootstrap HA is not
17+
supported for the moment, so it's only a part of the Bootstrap
18+
functionnaly. Check this ticket for more informations
19+
https://github.com/scality/metalk8s/issues/2002
20+
21+
Prepare the node
22+
----------------
23+
24+
To configure a node to host a registry, a ``repository`` pod must be scheduled
25+
on it.
26+
This node must be part of the MetalK8s cluster and no specific roles or
27+
taints are needed.
28+
29+
All ISOs listed in the ``archives`` section of
30+
``/etc/metalk8s/bootstrap.yaml`` and ``/etc/metalk8s/solutions.yaml``
31+
must be copied from the Bootstrap node to the target node at exactly the same
32+
location.
33+
34+
Deploy the registry
35+
-------------------
36+
37+
Connect to the node where you want to deploy the registry and run the
38+
following salt states
39+
40+
- Prepare all the MetalK8s ISOs
41+
42+
.. parsed-literal::
43+
44+
root@node-1 $ salt-call state.sls \\
45+
metalk8s.archives.mounted \\
46+
saltenv=metalk8s-|version|
47+
48+
- If you have some solutions, prepare the solutions ISOs
49+
50+
.. parsed-literal::
51+
52+
root@node-1 $ salt-call state.sls \\
53+
metalk8s.solutions.available \\
54+
saltenv=metalk8s-|version|
55+
56+
- Deploy the registry container
57+
58+
.. parsed-literal::
59+
60+
root@node-1 $ salt-call state.sls \\
61+
metalk8s.repo.installed \\
62+
saltenv=metalk8s-|version|
63+
64+
65+
Reconfigure the container engines
66+
---------------------------------
67+
68+
Containerd must be reconfigured to add the freshly deployed registry to its
69+
endpoints and so it can still pull images in case the Bootstrap node's one is
70+
down.
71+
72+
From the Bootstrap node, run:
73+
74+
.. parsed-literal::
75+
76+
root@bootstrap $ kubectl exec -n kube-system -c salt-master \\
77+
--kubeconfig=/etc/kubernetes/admin.conf \\
78+
salt-master-bootstrap -- salt '*' state.sls \\
79+
metalk8s.container-engine saltenv=metalk8s-|version|

0 commit comments

Comments
 (0)