Network Configuration Guide
This guide covers network configuration using the OpenShift Agent-based Installation Helper tools and playbooks.
Overview
This helper repository simplifies network configuration for OpenShift Agent-based installations by providing:
- Pre-defined network configuration templates
- Ansible playbooks for network validation
- Helper scripts for common network setups
- Automated network configuration generation
Using the Network Configuration Tools
1. Define Network Configuration
Create your network configuration in your cluster’s variables file:
# cluster.yml
network_config:
api_vips:
- 192.168.70.46
app_vips:
- 192.168.70.46
machine_network_cidrs:
- 192.168.70.0/23
cluster_network_cidr: 10.128.0.0/14
cluster_network_host_prefix: 23
service_network_cidrs:
- 172.30.0.0/16
network_type: OVNKubernetes
2. Generate Network Configuration
Use the provided playbook to generate your network configuration:
cd playbooks/
ansible-playbook -e "@your-cluster-vars.yml" create-manifests.yml
3. Network Configuration Examples
Single Node OpenShift (SNO)
nodes:
- hostname: sno
interfaces:
- name: enp97s0f0
mac_address: D0:50:99:DD:58:95
networkConfig:
interfaces:
- name: enp97s0f0.70
type: vlan
state: up
vlan:
id: 70
base-iface: enp97s0f0
ipv4:
enabled: true
address:
- ip: 192.168.70.46
prefix-length: 23
Three-Node Cluster with Bonding
nodes:
- hostname: master-0
interfaces:
- name: ens3
mac_address: "52:54:00:00:00:01"
- name: ens4
mac_address: "52:54:00:00:00:02"
networkConfig:
interfaces:
- name: bond0
type: bond
state: up
link-aggregation:
mode: 802.3ad
port:
- ens3
- ens4
Network Validation
The repository provides validation tools to ensure your network configuration is correct:
# Run network validation playbook
./scripts/validate-network.sh your-cluster-vars.yml
# Verify DNS configuration
./scripts/verify-dns.sh your-cluster-name.domain
Troubleshooting
Common Issues
- VIP Configuration
# Check VIP accessibility ./scripts/check-vips.sh your-cluster-vars.yml
- Network Connectivity
# Validate node connectivity ./scripts/verify-connectivity.sh your-cluster-vars.yml
- DNS Resolution
# Verify DNS setup ./scripts/verify-dns.sh your-cluster-vars.yml