From 39ec30cca9007c377c48b4389cb4e024224f21f3 Mon Sep 17 00:00:00 2001 From: Trekkie Coder Date: Tue, 24 Sep 2024 00:18:55 +0900 Subject: [PATCH] gh-87 Fix for k8s flannel incluster with multus cicd --- cicd/k8s-flannel-incluster-multus/config.sh | 4 ++++ cicd/k8s-flannel-incluster-multus/node_scripts/master.sh | 1 + cicd/k8s-flannel-incluster-multus/node_scripts/worker.sh | 4 ---- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cicd/k8s-flannel-incluster-multus/config.sh b/cicd/k8s-flannel-incluster-multus/config.sh index 5970158c4..c3f8aa0d6 100755 --- a/cicd/k8s-flannel-incluster-multus/config.sh +++ b/cicd/k8s-flannel-incluster-multus/config.sh @@ -40,6 +40,10 @@ sudo sysctl net.ipv4.conf.vboxnet1.arp_accept=1 #vagrant ssh master -c 'kubectl apply -f /vagrant/yaml/udp_fullnat.yml' 2> /dev/null #vagrant ssh master -c 'kubectl apply -f /vagrant/yaml/sctp_fullnat.yml' 2> /dev/null +#Create multus services +vagrant ssh master -c 'kubectl apply -f /vagrant/multus/multus-pod.yml' 2> /dev/null +vagrant ssh master -c 'kubectl apply -f /vagrant/multus/multus-service.yml' 2> /dev/null + for((i=1; i<=60; i++)) do fin=1 diff --git a/cicd/k8s-flannel-incluster-multus/node_scripts/master.sh b/cicd/k8s-flannel-incluster-multus/node_scripts/master.sh index c971e90a3..25df78cbc 100755 --- a/cicd/k8s-flannel-incluster-multus/node_scripts/master.sh +++ b/cicd/k8s-flannel-incluster-multus/node_scripts/master.sh @@ -63,3 +63,4 @@ kubectl wait pod --all --for=condition=Ready --namespace=kube-flannel --timeout= kubectl apply -f /vagrant/multus/multus-vlan.yml sleep 60 kubectl apply -f /vagrant/yaml/loxilb.yaml +kubectl apply -f /vagrant/yaml/kube-loxilb.yaml diff --git a/cicd/k8s-flannel-incluster-multus/node_scripts/worker.sh b/cicd/k8s-flannel-incluster-multus/node_scripts/worker.sh index 08d1ebd35..bb97d8f75 100755 --- a/cicd/k8s-flannel-incluster-multus/node_scripts/worker.sh +++ b/cicd/k8s-flannel-incluster-multus/node_scripts/worker.sh @@ -24,10 +24,6 @@ kubectl label node $(hostname -s) node-role.kubernetes.io/worker=worker kubectl wait pod --all --for=condition=Ready --namespace=kube-system --timeout=240s >> /dev/null 2>&1 || true kubectl wait pod --all --for=condition=Ready --namespace=default --timeout=240s >> /dev/null 2>&1 || true kubectl wait pod --all --for=condition=Ready --namespace=kube-flannel --timeout=240s >> /dev/null 2>&1 || true -kubectl apply -f /vagrant/yaml/kube-loxilb.yaml -kubectl apply -f /vagrant/multus/multus-pod.yml -sleep 60 -kubectl apply -f /vagrant/multus/multus-service.yml EOF