Added verify_config.yml playbook and included it in site.yml, Updated README.md with config verifications for ip routing prefix and metal_lb_ip_range checks etc

This commit is contained in:
kip
2023-10-18 19:01:10 +02:00
parent 95b2836dfc
commit fe4407db0e
9 changed files with 218 additions and 1 deletions

View File

@@ -73,6 +73,21 @@ This requires at least k3s version `1.19.1` however the version is configurable
If needed, you can also edit `inventory/my-cluster/group_vars/all.yml` to match your environment.
#### verify routing prefixes and ip addresses in all.yml
Ensure that the ip routing prefix matches the the one from the flannel_iface (`eth0` by default) for each host.
Example `192.168.30` is the default routing prefix, and it is used in the following variables:
- apiserver_endpoint
- metal_lb_bgp_peer_address (commented by default)
- metal_lb_ip_range
Also Ensure that the apiserver_endpoint is not in the metal_lb_ip_range
For your convience The playbook site.yml verifies the above elements of the config are valid.
* Optionally to skip these verifications set, in all.yml `verify_config: false`
* Optionally to just verify the config Run
`ansible-playbook -i inventory/my-cluster/hosts.ini verify_config.yml`
* Optionally manually recover ip routing prefix based on inet and netmask from
`ansible -i inventory/my-cluster/hosts.ini --become -m shell -a 'ifconfig eth0 | grep "inet "' all`
### ☸️ Create Cluster
Start provisioning of the cluster using the following command: