|
|
1 hónapja | |
|---|---|---|
| .. | ||
| README.md | 1 hónapja | |
| ansible.cfg | 1 hónapja | |
| install-k3s-master.yml | 1 hónapja | |
| install-k3s-workers.yml | 1 hónapja | |
| inventory.ini | 1 hónapja | |
| k3s-agent.service.j2 | 1 hónapja | |
| k3s.service.j2 | 1 hónapja | |
| main-playbook.yml | 1 hónapja | |
| verify-cluster.yml | 1 hónapja | |
This directory contains Ansible playbooks to install a k3s cluster with one master node and multiple worker nodes.
inventory.ini: Contains the inventory of master and worker nodesmain-playbook.yml: Main playbook that orchestrates the entire installationinstall-k3s-master.yml: Installs k3s on the master nodeinstall-k3s-workers.yml: Installs k3s agents on worker nodes and joins them to the masterverify-cluster.yml: Verifies the cluster status after installationk3s.service.j2: Template for the k3s master systemd servicek3s-agent.service.j2: Template for the k3s agent systemd serviceansible.cfg: Ansible configuration fileThe playbooks use the following variables:
master_ip: IP address of the master nodek3s_download_url: URL to download the k3s binaryk3s_token: Token for joining worker nodes to the clusterTo run the complete installation:
ansible-playbook -i inventory.ini main-playbook.yml
To run only the master installation:
ansible-playbook -i inventory.ini install-k3s-master.yml
To run only the worker installation:
ansible-playbook -i inventory.ini install-k3s-workers.yml
To verify the cluster status:
ansible-playbook -i inventory.ini verify-cluster.yml
Edit the inventory.ini file to match your environment: