mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
120 lines
4.7 KiB
Plaintext
120 lines
4.7 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * microshift_networking/microshift-disconnected-network-config.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="microshift-disconnected-host-network-config_{context}"]
|
|
= Configuring the networking settings for fully disconnected hosts
|
|
|
|
To configure the networking settings for running {microshift-short} on a fully disconnected host, you must prepare the host, update the networking configuration, then restart to apply the new settings. All commands are executed from the host CLI.
|
|
|
|
.Prerequisites
|
|
* RHEL 9 or newer.
|
|
* {microshift-short} 4.16 or newer.
|
|
* Access to the host CLI.
|
|
* A valid IP address chosen to avoid both internal and potential future external IP conflicts when running {microshift-short}.
|
|
* {microshift-short} networking settings are set to defaults.
|
|
|
|
[IMPORTANT]
|
|
====
|
|
The following procedure is for use cases in which access to the {microshift-short} node is not required after devices are deployed in the field. There is no remote node access after the network connection is removed.
|
|
====
|
|
|
|
.Procedure
|
|
|
|
. Add a fake IP address to the loopback interface by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ IP="10.44.0.1" <1>
|
|
$ sudo nmcli con add type loopback con-name stable-microshift ifname lo ip4 ${IP}/32
|
|
----
|
|
<1> The fake IP address used in this example is “10.44.0.1”.
|
|
+
|
|
[NOTE]
|
|
====
|
|
Any valid IP works if it avoids both internal {microshift-short} and potential future external IP conflicts. This can be any subnet that does not collide with the {microshift-short} node subnet or is be accessed by other services on the device.
|
|
====
|
|
|
|
. Configure the DNS interface to use the local name server by setting modifying the settings to ignore automatic DNS and reset it to the local name server:
|
|
+
|
|
.. Bypass the automatic DNS by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ sudo nmcli conn modify stable-microshift ipv4.ignore-auto-dns yes
|
|
----
|
|
+
|
|
.. Point the DNS interface to use the local name server:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ sudo nmcli conn modify stable-microshift ipv4.dns "10.44.1.1"
|
|
----
|
|
|
|
. Get the hostname of the device by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ NAME="$(hostnamectl hostname)"
|
|
----
|
|
|
|
. Add an entry for the hostname of the node in the `/etc/hosts` file by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ echo "$IP $NAME" | sudo tee -a /etc/hosts >/dev/null
|
|
----
|
|
|
|
. Update the {microshift-short} configuration file by adding the following YAML snippet to `/etc/microshift/config.yaml`:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
sudo tee /etc/microshift/config.yaml > /dev/null <<EOF
|
|
node:
|
|
hostnameOverride: $(echo $NAME)
|
|
nodeIP: $(echo $IP)
|
|
EOF
|
|
----
|
|
|
|
. {microshift-short} is now ready to use the loopback device for intra-node communications. Finish preparing the device for offline use.
|
|
|
|
.. If the device currently has a NIC attached, disconnect the device from the network.
|
|
.. Shut down the device and disconnect the NIC.
|
|
.. Restart the device for the offline configuration to take effect.
|
|
|
|
. Restart the {microshift-short} host to apply the configuration changes by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ sudo systemctl reboot <1>
|
|
----
|
|
<1> This step restarts the node. Wait for the greenboot health check to report the system healthy before implementing verification.
|
|
|
|
.Verification
|
|
|
|
At this point, network access to the {microshift-short} host has been severed. If you have access to the host terminal, you can use the host CLI to verify that the node has started in a stable state.
|
|
|
|
. Verify that the {microshift-short} node is running by entering the following commands:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig
|
|
$ sudo -E oc get pods -A
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
NAMESPACE NAME READY STATUS RESTARTS AGE
|
|
kube-system csi-snapshot-controller-74d566564f-66n2f 1/1 Running 0 1m
|
|
openshift-dns dns-default-dxglm 2/2 Running 0 1m
|
|
openshift-dns node-resolver-dbf5v 1/1 Running 0 1m
|
|
openshift-ingress router-default-8575d888d8-xmq9p 1/1 Running 0 1m
|
|
openshift-ovn-kubernetes ovnkube-master-gcsx8 4/4 Running 1 1m
|
|
openshift-ovn-kubernetes ovnkube-node-757mf 1/1 Running 1 1m
|
|
openshift-service-ca service-ca-7d7c579f54-68jt4 1/1 Running 0 1m
|
|
openshift-storage topolvm-controller-6d777f795b-bx22r 5/5 Running 0 1m
|
|
openshift-storage topolvm-node-fcf8l 4/4 Running 0 1m
|
|
----
|