Skip to content

Commit

Permalink
Updated as per comments in PR#860
Browse files Browse the repository at this point in the history
  • Loading branch information
nik-netlox committed Nov 4, 2024
1 parent 76958d0 commit 52b279c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
10 changes: 0 additions & 10 deletions cicd/k3s-flannel-loxilb-gwapi/ingress/loxilb-secret.yml

This file was deleted.

1 change: 0 additions & 1 deletion cicd/k3s-flannel-loxilb-gwapi/loxilb-ip

This file was deleted.

1 change: 0 additions & 1 deletion cicd/k3s-flannel-loxilb-gwapi/master-ip

This file was deleted.

21 changes: 20 additions & 1 deletion cicd/k3s-flannel-loxilb-gwapi/master.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
export MASTER_IP=$(ip a |grep global | grep -v '10.0.2.15' | grep '192.168.80' | awk '{print $2}' | cut -f1 -d '/')

apt-get update && apt install -y libnss3-tools
ldconfig /usr/local/lib64/ | true
mkdir certs
cd certs
wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 3 https://github.com/FiloSottile/mkcert/releases/download/v1.4.3/mkcert-v1.4.3-linux-amd64
chmod +x mkcert-v1.4.3-linux-amd64
mv mkcert-v1.4.3-linux-amd64 mkcert
mkdir loxilb.io
export CAROOT=`pwd`/loxilb.io
./mkcert -install
./mkcert loxilb.io
mv loxilb.io.pem ../server.crt
mv loxilb.io-key.pem ../server.key
cd -

curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--disable traefik --disable servicelb --node-ip=${MASTER_IP}" sh -

echo $MASTER_IP > /vagrant/master-ip
sudo cp /var/lib/rancher/k3s/server/node-token /vagrant/node-token
sudo sed -i -e "s/127.0.0.1/${MASTER_IP}/g" /etc/rancher/k3s/k3s.yaml
sudo cp /etc/rancher/k3s/k3s.yaml /vagrant/k3s.yaml
sudo kubectl create secret tls loxilb-ssl --cert server.crt --key server.key -n kube-system -o yaml --dry-run >> loxilb-secret.yml
sed -i -e 's/tls.key/server.key/g' ./loxilb-secret.yml
sed -i -e 's/tls.crt/server.crt/g' ./loxilb-secret.yml
sed -i -e 's/kubernetes.io\/tls/Opaque/g' ./loxilb-secret.yml
sudo kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.0.0/experimental-install.yaml
sudo kubectl apply -f /vagrant/kube-loxilb.yaml
sudo kubectl apply -f /vagrant/ingress/loxilb-secret.yml
sudo kubectl apply -f loxilb-secret.yml
sudo kubectl apply -f /vagrant/ingress/loxilb-ingress-deploy.yml
sudo kubectl apply -f /vagrant/gatewayclass.yaml
sudo kubectl apply -f /vagrant/gateway.yaml
Expand Down
1 change: 0 additions & 1 deletion cicd/k3s-flannel-loxilb-gwapi/node-token

This file was deleted.

0 comments on commit 52b279c

Please sign in to comment.