K3s & Kilo

Nov 18, 2022

Oracle Cloud is experiencing a network layer issue caused by VxLAN

Uninstallation

k3s-uninstall.sh
k3s-agent-uninstall.sh
sudo iptables -F && sudo iptables -t nat -F && sudo iptables -t mangle -F && sudo iptables -X && sudo iptables -L

Installation

curl -sfL https://get.k3s.io | sh -
k3s kubectl get node
sudo cat /var/lib/rancher/k3s/server/node-token
sudo cat /etc/rancher/k3s/k3s.yaml
vim ~/.kube/config
# insecure-skip-tls-verify: true
curl -sfL https://get.k3s.io | K3S_URL=https://10.0.0.134:6443 K3S_TOKEN=mynodetoken sh -
sudo kubectl get node -w
sudo kubectl apply -f config/eternalelf_tls_cert.yaml
# skip
cat cloudflare.pem | base64 -w 0
cat cloudflare.key | base64 -w 0
rsync -avzP data_registry/ [email protected]:data_registry

Kilo

curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--tls-san EXTERNAL_IP --node-external-ip EXTERNAL_IP" sh -

sudo cat /var/lib/rancher/k3s/server/node-token
sudo cat /etc/rancher/k3s/k3s.yaml
insecure-skip-tls-verify: true

kko annotate nodes HOSTNAME_A kilo.squat.ai/force-endpoint=EXTERNAL_IP:51821
kko annotate nodes HOSTNAME_B kilo.squat.ai/force-endpoint=EXTERNAL_IP:51821
kko annotate nodes HOSTNAME_C kilo.squat.ai/force-endpoint=EXTERNAL_IP:51821

kko annotate nodes HOSTNAME_A kilo.squat.ai/location="jp"
kko annotate nodes HOSTNAME_B kilo.squat.ai/location="jp"
kko annotate nodes HOSTNAME_C kilo.squat.ai/location="jp"

ExecStart=/usr/local/bin/k3s \
    server \
        '--tls-san' \
        'EXTERNAL_IP' \
        '--node-externaluninstall-ip' \
        'EXTERNAL_IP'

sudo systemctl daemon-reload
sudo systemctl restart k3s.service

kko apply -f https://raw.githubusercontent.com/squat/kilo/main/manifests/crds.yaml
kko apply -f kilo-k3s.yaml

[back]