fix: prepare k3s for external cloud provider
All checks were successful
Deploy Cluster / Terraform (push) Successful in 46s
Deploy Cluster / Ansible (push) Successful in 4m4s

This commit is contained in:
2026-03-17 01:21:23 +00:00
parent 08a3031276
commit 9d2f30de32
5 changed files with 32 additions and 15 deletions

View File

@@ -3,3 +3,4 @@ k3s_version: latest
k3s_server_url: ""
k3s_token: ""
k3s_node_ip: ""
k3s_kubelet_cloud_provider_external: true

View File

@@ -16,7 +16,10 @@
INSTALL_K3S_VERSION: "{{ k3s_version if k3s_version != 'latest' else '' }}"
K3S_URL: "{{ k3s_server_url }}"
K3S_TOKEN: "{{ k3s_token }}"
command: /tmp/install-k3s.sh agent --node-ip {{ k3s_node_ip }}
command: >-
/tmp/install-k3s.sh agent
--node-ip {{ k3s_node_ip }}
{% if k3s_kubelet_cloud_provider_external | bool %}--kubelet-arg=cloud-provider=external{% endif %}
args:
creates: /usr/local/bin/k3s-agent
when: not k3s_agent_binary.stat.exists