From e1a0298eb8f19a77f6dbc67c53e567296afce283 Mon Sep 17 00:00:00 2001 From: Techno Tim Date: Thu, 26 May 2022 15:32:25 -0500 Subject: [PATCH] Upgrade kube-vpi; improve settings; better reset (#31) * fix(k3s): upgrade k3s + kube-vip * chore(github): update template * chore(docs): Updated README * fix(ansible): Reboot as part of reset * fix(kube-vip): improve settings * chore(lint): fix * chore(lint): fix --- .github/ISSUE_TEMPLATE.md | 3 +++ README.md | 10 +++++++--- inventory/sample/group_vars/all.yml | 2 +- roles/k3s/master/templates/vip.yaml.j2 | 8 ++++---- roles/reset/tasks/main.yml | 13 +++++++++++++ 5 files changed, 28 insertions(+), 8 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index c88b008..6444065 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -4,13 +4,16 @@ ## Expected Behavior + ## Current Behavior ## Steps to Reproduce + + 1. 2. 3. diff --git a/README.md b/README.md index 493ce96..d6dda55 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,10 @@ scp debian@master_ip:~/.kube/config ~/.kube/config See the commands [here](https://docs.technotim.live/posts/k3s-etcd-ansible/#testing-your-cluster). +### Troubleshooting + +Be sure to see [this post](https://github.com/techno-tim/k3s-ansible/discussions/20) on how to troubleshoot common problems + ### 🔷 Vagrant You may want to kickstart your k3s cluster by using Vagrant to quickly build you all needed VMs with one command. @@ -109,6 +113,6 @@ This repo is really standing on the shoulders of giants. To all those who have Thanks to these repos for code and ideas: -* [k3s-io/k3s-ansible](https://github.com/k3s-io/k3s-ansible) -* [geerlingguy/turing-pi-cluster](https://github.com/geerlingguy/turing-pi-cluster) -* [212850a/k3s-ansible](https://github.com/212850a/k3s-ansible) +- [k3s-io/k3s-ansible](https://github.com/k3s-io/k3s-ansible) +- [geerlingguy/turing-pi-cluster](https://github.com/geerlingguy/turing-pi-cluster) +- [212850a/k3s-ansible](https://github.com/212850a/k3s-ansible) diff --git a/inventory/sample/group_vars/all.yml b/inventory/sample/group_vars/all.yml index fc8ba16..2b1e7f7 100644 --- a/inventory/sample/group_vars/all.yml +++ b/inventory/sample/group_vars/all.yml @@ -22,7 +22,7 @@ extra_server_args: "--no-deploy servicelb --no-deploy traefik" extra_agent_args: "" # image tag for kube-vip -kube_vip_tag_version: "v0.4.3" +kube_vip_tag_version: "v0.4.4" # image tag for metal lb metal_lb_speaker_tag_version: "v0.12.1" diff --git a/roles/k3s/master/templates/vip.yaml.j2 b/roles/k3s/master/templates/vip.yaml.j2 index 118b403..36609f1 100644 --- a/roles/k3s/master/templates/vip.yaml.j2 +++ b/roles/k3s/master/templates/vip.yaml.j2 @@ -43,15 +43,15 @@ spec: - name: vip_ddns value: "false" - name: svc_enable - value: "true" + value: "false" - name: vip_leaderelection value: "true" - name: vip_leaseduration - value: "5" + value: "15" - name: vip_renewdeadline - value: "3" + value: "10" - name: vip_retryperiod - value: "1" + value: "2" - name: address value: {{ apiserver_endpoint }} image: ghcr.io/kube-vip/kube-vip:{{ kube_vip_tag_version }} diff --git a/roles/reset/tasks/main.yml b/roles/reset/tasks/main.yml index 1547c4d..afb7710 100644 --- a/roles/reset/tasks/main.yml +++ b/roles/reset/tasks/main.yml @@ -23,6 +23,9 @@ - /var/lib/kubelet - /run/netns - /var/lib/rancher/k3s + - /var/lib/kubelet/pods + - /var/lib/kubelet/plugins + - /run/netns/cni- loop_control: loop_var: mounted_fs @@ -35,9 +38,19 @@ - "{{ systemd_dir }}/k3s.service" - "{{ systemd_dir }}/k3s-node.service" - /etc/rancher/k3s + - /run/k3s + - /run/flannel + - /etc/rancher/ - /var/lib/kubelet - /var/lib/rancher/k3s + - /var/lib/rancher/ + - /usr/local/bin/k3s + - /var/lib/cni/ - name: daemon_reload systemd: daemon_reload: yes + +- name: Reboot and wait for node to come back up + reboot: + reboot_timeout: 3600