1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00
Files
openshift-docs/modules/agent-install-networking.adoc
2022-11-16 15:40:55 +00:00

151 lines
4.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Module included in the following assemblies:
//
// * installing/installing-with-agent-based-installer/preparing-to-install-with-agent-based-installer.adoc
:_content-type: CONCEPT
[id="agent-install-networking_{context}"]
= About networking
During the initial boot, the machines require an IP address configuration that is set either through a Dynamic Host Configuration Protocol(DHCP) server or statically by
selecting the below options. If you provide the IP address for the `rendezvousIP` field through the DHCP option, then ensure that it is for the machine's IP address that is going to be used for deployment.
This IP address is required for a node to be identified as ** node 0 **. A ** node 0 ** runs the required services for the Agent-based Installer.
== DHCP
.Preferred method: `install-config.yaml` and `agent.config.yaml`
You must specify only the value for the `rendezvousIP` field and `networkConfig` field must be left blank:
.Sample agent-config.yaml.file
[source,yaml]
----
cat > agent-config.yaml << EOF
apiVersion: v1alpha1
kind: AgentConfig
metadata:
name: sno-cluster
rendezvousIP: 192.168.111.80 <1>
----
<1> The IP address for ** node 0**.
== Static networking
.. Preferred method: `install-config.yaml` and `agent.config.yaml`
+
.Scenario-1
When you specify the value for the `rendezvousIP` and `networkConfig` fields, the `rendezvousIP` field is utilized.
+
.Sample agent-config.yaml.file
+
[source,yaml]
----
cat > agent-config.yaml << EOF
apiVersion: v1alpha1
kind: AgentConfig
metadata:
name: sno-cluster
rendezvousIP: 192.168.111.80
hosts:
- hostname: master-0
interfaces:
- name: eno1
macAddress: 00:ef:44:21:e6:a5
networkConfig:
interfaces:
- name: eno1
type: ethernet
state: up
mac-address: 00:ef:44:21:e6:a5
ipv4:
enabled: true
address:
- ip: 192.168.111.80
prefix-length: 23
----
+
.Scenario-2
When you specify the values for the `networkConfig` field, the value from the `interfaces` field is utilized. This is when there is no `rendezvousIP` field.
+
[source,yaml]
----
cat > agent-config.yaml << EOF
apiVersion: v1alpha1
kind: AgentConfig
hosts:
- hostname: master-0
interfaces:
- name: eno1
macAddress: 00:ef:44:21:e6:a5
networkConfig:
interfaces:
- name: eno1
type: ethernet
state: up
mac-address: 00:ef:44:21:e6:a5
ipv4:
enabled: true
address:
- ip: 192.168.111.80 <1>
prefix-length: 23 <2>
----
<1> The static IP address of the target bare-metal host.
<2> The static IP addresss subnet prefix for the target bare-metal host.
+
Note that the lowest value IP is utilized for the IP address of ** node 0**.
+
.. Optional method: ZTP manifests
+
The optional method of the ZTP custom resources comprises 6 custom resources; you can configure static IPs in the `NMStateConfig.yaml.file`.
+
[source,yaml]
----
apiVersion: agent-install.openshift.io/v1beta1
kind: NMStateConfig
metadata:
name: master-0
namespace: openshift-machine-api
labels:
cluster0-nmstate-label-name: cluster0-nmstate-label-value
spec:
config:
interfaces:
- name: eth0
type: ethernet
state: up
mac-address: 52:54:01:aa:aa:a1
ipv4:
enabled: true
address:
- ip: 192.168.122.2 <1>
prefix-length: 23 <2>
dhcp: false
dns-resolver:
config:
server:
- 192.168.122.1 <3>
routes:
config:
- destination: 0.0.0.0/0
next-hop-address: 192.168.122.1 <4>
next-hop-interface: eth0
table-id: 254
interfaces:
- name: "eth0" <5>
macAddress: 52:54:01:aa:aa:a1 <6>
----
<1> The static IP address of the target bare-metal host.
<2> The static IP addresss subnet prefix for the target bare-metal host.
<3> The DNS server for the target bare-metal host.
<4> Next hop address for the node traffic. This must be in the same subnet as the IP address set for the specified interface.
<5> The `interfaces` field must have the same name.
<6> The mac address of the interface.
+
Note that the lowest value IP is utilized for the IP address of ** node 0**.