Skip to content

Commit 177e2bc

Browse files
authored
Edited content based on the information (#948)
Signed-off-by: Ranjini M N <[email protected]>
1 parent d7aa97a commit 177e2bc

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

asciidoc/guides/metallb-kube-api.adoc

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,25 @@ SSH to the first host and install the wanted distribution in cluster mode.
4040
For RKE2:
4141
[,bash]
4242
----
43-
# Export the free IP mentioned above
44-
export VIP_SERVICE_IP=<ip>
43+
# As a root user, create the /etc/rancher/rke2/config.yaml config file with the following content:
44+
45+
mkdir -p /etc/rancher/rke2/
46+
cat << EOF > /etc/rancher/rke2/config.yaml
47+
# An example of the config.yaml file for a server node:
48+
write-kubeconfig-mode: "0644"
49+
tls-san:
50+
- "${VIP_SERVICE_IP}"
51+
- "https://${VIP_SERVICE_IP}.sslip.io"
52+
EOF
4553
46-
curl -sfL https://get.rke2.io | INSTALL_RKE2_EXEC="server \
47-
--write-kubeconfig-mode=644 --tls-san=${VIP_SERVICE_IP} \
48-
--tls-san=https://${VIP_SERVICE_IP}.sslip.io" sh -
49-
54+
# Install RKE2
55+
curl -sfL https://get.rke2.io | INSTALL_RKE2_EXEC="server" sh -
56+
57+
# Enable and start the RKE2 service with the configuration specified in the config.yaml file
5058
systemctl enable rke2-server.service
5159
systemctl start rke2-server.service
5260
53-
# Fetch the cluster token:
61+
# Fetch the cluster token to be used later:
5462
RKE2_TOKEN=$(tr -d '\n' < /var/lib/rancher/rke2/server/node-token)
5563
----
5664

0 commit comments

Comments
 (0)