This commit is contained in:
James Turland 2023-11-22 14:41:18 +00:00
parent fb753dbc14
commit 05b86c9413
2 changed files with 12 additions and 12 deletions

View File

@ -11,10 +11,11 @@ spec:
k8sServicePort: 6443 k8sServicePort: 6443
cni: cni:
chainingMode: "none" chainingMode: "none"
# Configure IPAM/PodCIDR tunnelProtocol: "vxlan"
ipam: routingMode: "tunnel"
mode: cluster-pool ipam:
operator: mode: cluster-pool
clusterPoolIPv4PodCIDRList: operator:
- "<lb-network>" clusterPoolIPv4PodCIDRList:
clusterPoolIPv4MaskSize: 27 - "<lb-network>"
clusterPoolIPv4MaskSize: 27

View File

@ -132,9 +132,8 @@ mv config.yaml /etc/rancher/rke2/config.yaml
echo 'export KUBECONFIG=/etc/rancher/rke2/rke2.yaml' >> ~/.bashrc ; echo 'export PATH=${PATH}:/var/lib/rancher/rke2/bin' >> ~/.bashrc ; echo 'alias k=kubectl' >> ~/.bashrc ; source ~/.bashrc ; echo 'export KUBECONFIG=/etc/rancher/rke2/rke2.yaml' >> ~/.bashrc ; echo 'export PATH=${PATH}:/var/lib/rancher/rke2/bin' >> ~/.bashrc ; echo 'alias k=kubectl' >> ~/.bashrc ; source ~/.bashrc ;
curl -LJO https://raw.githubusercontent.com/JamesTurland/JimsGarage/main/Kubernetes/RKE2-Cilium/rke2-cilium-config.yaml curl -LJO https://raw.githubusercontent.com/JamesTurland/JimsGarage/main/Kubernetes/RKE2-Cilium/rke2-cilium-config.yaml
sudo cat rke2-cilium-config.yaml | sed 's/<KUBE_API_SERVER_IP>/'$master1'/g' > rke2-cilium-config.yaml cat rke2-cilium-config.yaml | sed 's/<KUBE_API_SERVER_IP>/'$master1'/g' | sed 's/<lb-network>/'$lbrange'/g' > rke2-cilium-config-update.yaml
sudo cat rke2-cilium-config.yaml | sed 's/<lb-network>/'$lbrange'/g' > rke2-cilium-config.yaml cp rke2-cilium-config-update.yaml /var/lib/rancher/rke2/server/manifests/rke2-cilium-config.yaml
cp rke2-cilium-config.yaml /var/lib/rancher/rke2/server/manifests/rke2-cilium-config.yaml
curl -sfL https://get.rke2.io | sh - curl -sfL https://get.rke2.io | sh -
systemctl enable rke2-server.service systemctl enable rke2-server.service
@ -175,8 +174,8 @@ for newnode in "${masters[@]}"; do
echo "disable-kube-proxy: \"true\"" >> /etc/rancher/rke2/config.yaml echo "disable-kube-proxy: \"true\"" >> /etc/rancher/rke2/config.yaml
curl -LJO https://raw.githubusercontent.com/JamesTurland/JimsGarage/main/Kubernetes/RKE2-Cilium/rke2-cilium-config.yaml curl -LJO https://raw.githubusercontent.com/JamesTurland/JimsGarage/main/Kubernetes/RKE2-Cilium/rke2-cilium-config.yaml
sudo cat rke2-cilium-config.yaml | sed 's/<KUBE_API_SERVER_IP>/'$master1'/g' > /var/lib/rancher/rke2/server/manifests/rke2-cilium-config.yaml cat rke2-cilium-config.yaml | sed 's/<KUBE_API_SERVER_IP>/'$master1'/g' | sed 's/<lb-network>/'$lbrange'/g' > rke2-cilium-config-update.yaml
sudo cat /var/lib/rancher/rke2/server/manifests/rke2-cilium-config.yaml | sed 's/<lb-network>/'$lbrange'/g' > /var/lib/rancher/rke2/server/manifests/rke2-cilium-config.yaml cp rke2-cilium-config-update.yaml /var/lib/rancher/rke2/server/manifests/rke2-cilium-config.yaml
curl -sfL https://get.rke2.io | sh - curl -sfL https://get.rke2.io | sh -
systemctl enable rke2-server.service systemctl enable rke2-server.service