initial commit
This commit is contained in:
58
group_vars/all.yml
Normal file
58
group_vars/all.yml
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
k3s_version: v1.24.4+k3s1
|
||||
ansible_user: administrator
|
||||
systemd_dir: /etc/systemd/system
|
||||
|
||||
# Set your timezone
|
||||
system_timezone: "America/Chicago"
|
||||
|
||||
# interface which will be used for flannel
|
||||
flannel_iface: "eth0"
|
||||
|
||||
# apiserver_endpoint is virtual ip-address which will be configured on each master
|
||||
apiserver_endpoint: "192.168.20.120"
|
||||
|
||||
# k3s_token is required masters can talk together securely
|
||||
k3s_token: "{{ lookup('env','k3s_token') }}"
|
||||
|
||||
# The IP on which the node is reachable in the cluster.
|
||||
# Here, a sensible default is provided, you can still override
|
||||
# it for each of your hosts, though.
|
||||
k3s_node_ip: '{{ ansible_facts[flannel_iface]["ipv4"]["address"] }}'
|
||||
|
||||
# Disable the taint manually by setting: k3s_master_taint = false
|
||||
k3s_master_taint: "{{ true if groups['node'] | default([]) | length >= 1 else false }}"
|
||||
|
||||
# these arguments are recommended for servers as well as agents:
|
||||
extra_args: >-
|
||||
--flannel-iface={{ flannel_iface }}
|
||||
--node-ip={{ k3s_node_ip }}
|
||||
|
||||
# change these to your liking, the only required are: --disable servicelb, --tls-san {{ apiserver_endpoint }}
|
||||
extra_server_args: >-
|
||||
{{ extra_args }}
|
||||
{{ '--node-taint node-role.kubernetes.io/master=true:NoSchedule' if k3s_master_taint else '' }}
|
||||
--tls-san {{ apiserver_endpoint }}
|
||||
--disable servicelb
|
||||
--disable traefik
|
||||
--kube-controller-manager-arg bind-address=0.0.0.0
|
||||
--kube-proxy-arg metrics-bind-address=0.0.0.0
|
||||
--kube-scheduler-arg bind-address=0.0.0.0
|
||||
--etcd-expose-metrics true
|
||||
--kubelet-arg containerd=/run/k3s/containerd/containerd.sock
|
||||
extra_agent_args: >-
|
||||
{{ extra_args }}
|
||||
--kubelet-arg node-status-update-frequency=5s
|
||||
|
||||
# image tag for kube-vip
|
||||
kube_vip_tag_version: "v0.5.0"
|
||||
|
||||
# image tag for metal lb
|
||||
metal_lb_speaker_tag_version: "v0.13.5"
|
||||
metal_lb_controller_tag_version: "v0.13.5"
|
||||
|
||||
# metallb ip range for load balancer
|
||||
metal_lb_ip_range: "192.168.20.130-192.168.20.140"
|
||||
|
||||
username: "user"
|
||||
userpassword: '$6$ml9etuD2RAvybIAl$xGbh95q5PIrZQxhXBRR8oHQZcb510vhDxBsdwkBBxSo6IzOfS0WkbYDUgyuu4cvczJes19c.EJjfjO2ROoRsx1'
|
||||
1
group_vars/ansible.pub
Normal file
1
group_vars/ansible.pub
Normal file
@@ -0,0 +1 @@
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDTYqag8OKcV6kIitn3Axlyi3Xr9EeybG10wlglw34fYF0pY+OERy7zZKEju4ijZzQ7eWNlcXLYSorm5Tngkvnz4vbM4b9R7gZjTV9drSGDo0BLkMXNuSTrKwGeokcNkxh+HZcWSK4/SE5zPzvkPj1UvmAgQ4P4N79mqPe5/9gAvdrlUWEtuqVdEHc/FMk4kEZsRu4lg58KoghNCRYMYHOyd1rbHsuWpX5NumPxnosWG22jzqj46rUWEXvA7MrCGGbUDlk5+/h7Bvw4O8nGZLEo/qyaYvChTBj/UqYYBssC4VlW/SNJB1yfrklqdtcknmFVJBi174cQtzZDXOerwneh8/+t7wWpcxkWscxYrwdJspzAU/NGk02xDPaG4F1mdgZ6HIZCQAaw/EbaNbiuU+bhdngEIHUvVmdiy4T09FWIWuJxO6FnAiVIU5K8LpqGLTFp7kjOwAczdQ+KVojm/1A5W/ZoTE/y3Ni1fVaOJFCxSgU7qiKAm7hb2ZXvznNgryc=
|
||||
14
group_vars/hosts.ini
Normal file
14
group_vars/hosts.ini
Normal file
@@ -0,0 +1,14 @@
|
||||
[master]
|
||||
192.168.20.121
|
||||
192.168.20.122
|
||||
192.168.20.123
|
||||
|
||||
[node]
|
||||
192.168.20.124
|
||||
192.168.20.125
|
||||
192.168.20.126
|
||||
|
||||
[k3s_cluster:children]
|
||||
master
|
||||
node
|
||||
|
||||
6
group_vars/requirements.yml
Normal file
6
group_vars/requirements.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
collections:
|
||||
- name: ansible.utils
|
||||
- name: community.general
|
||||
- name: ansible.posix
|
||||
- name: kubernetes.core
|
||||
Reference in New Issue
Block a user