Files
openstack-helm/roles/deploy-env/files/kubeadm_config.yaml.j2
Vladimir Kozhukalov 27b59c6df6 [deploy-env] Setup vxlan overlay before k8s deployment
Sometimes multinode nodesets consist of nodes
with private IPs from different L2 segments. So they can
not communicate with each other using their IPs
assigned to their gateway interfaces.

This PR sets up VXLAN overlay using nodes inventory public
IPs (those IPs used by zuul to get access to nodes).
So nodes are convinced they are in the same L2 segment.

We can use this overlay for internal K8s communication.
For this we have to disable overlay setup in a CNI implementation
(Calico, Cilium, etc.) and use the overlay interface for internal
Openstack communication.

Also:
- Upgrade Kubeadm config API version to kubeadm.k8s.io/v1beta4
- Ignore single cpu kubeadm errors. By default Kubeadm requires
  at least 2 cpus on nodes.

Change-Id: I34663de277951135c44607f093f8f1f93eafab86
Signed-off-by: Vladimir Kozhukalov <kozhukalov@gmail.com>
2025-07-09 09:58:03 -05:00

39 lines
935 B
Django/Jinja

---
apiVersion: kubeproxy.config.k8s.io/v1alpha1
kind: KubeProxyConfiguration
mode: ipvs
ipvs:
strictARP: true
...
---
apiVersion: kubeadm.k8s.io/v1beta4
kind: ClusterConfiguration
networking:
serviceSubnet: "{{ kubeadm.service_cidr }}" # --service-cidr
podSubnet: "{{ kubeadm.pod_network_cidr }}" # --pod-network-cidr
dnsDomain: "cluster.local"
...
---
apiVersion: kubeadm.k8s.io/v1beta4
kind: InitConfiguration
nodeRegistration:
criSocket: unix:///run/containerd/containerd.sock
taints: []
ignorePreflightErrors:
- NumCPU
localAPIEndpoint:
{% if overlay_network_setup %}
advertiseAddress: "{{ overlay_network_prefix }}{{ (groups['all'] | sort).index(groups['k8s_control_plane'][0]) + 1 }}"
{% endif %}
bindPort: 6443
...
---
apiVersion: kubeadm.k8s.io/v1beta4
kind: JoinConfiguration
nodeRegistration:
criSocket: unix:///run/containerd/containerd.sock
taints: []
ignorePreflightErrors:
- NumCPU
...