Skip to main content

K3S Role

Install and configure a single-server k3s cluster with kube-vip.


Variables​

VariableTypeOptionsDefaultDescription
k3s_versionstring---v1.36.3+k3s1k3s install version
k3s_vip_api_endpointstring---{{ hostvars[groups['k3s'][0]]['ansible_host'] | default(groups['k3s'][0]) }}virtual IP for the API server
k3s_api_portinteger---6443API server port
k3s_tokenstring---W7hzb52sN7wpDHv2ayzQYfLz4tH2pQvpyg3vKe2iAK577bStCuruqeftKjwkd34shared cluster token for node authentication
k3s_extra_server_argsstring-----tls-san {{ k3s_vip_api_endpoint }} --flannel-backend=none --disable-network-policy --disable-helm-controller --disable metrics-server --disable servicelb --disable traefik --selinuxadditional arguments passed to k3s server
k3s_service_namestring---k3s.servicesystemd service unit name
k3s_service_statestringreloaded, restarted, started, stoppedstarteddesired state of the k3s service
k3s_service_enabledbooltrue, falsetruewhether the k3s service is enabled at boot
k3s_kube_vip_tagstring---v1.2.3kube-vip container image tag
k3s_kube_vip_ifacestring---enp6s18network interface for kube-vip
k3s_service_cidrstring---10.43.0.0/16cluster service CIDR range
k3s_cluster_cidrstring---10.42.0.0/16cluster pod CIDR range
k3s_firewalld_statestringpresent, absent, enabled, disabled, skipenableddesired state of firewall rules
k3s_firewalld_zonestring---kubernetesfirewall zone for k3s rules
k3s_manage_ciliumbooltrue, falsetruewhether to install and configure cilium
k9s_tagstring---0.51.0k9s version tag passed to the k9s role
fluxcli_tagstring---2.9.4flux CLI version tag passed to the fluxcli role
helm_tagstring---4.2.4helm version tag passed to the helm role
cilium_versionstring---1.20.1cilium chart version passed to the cilium role