mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2024-09-29 04:07:30 +02:00
update the readme file
This commit is contained in:
parent
9a1659ad54
commit
6f8118de4d
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
hosts.ini
|
|
12
README.md
12
README.md
@ -23,7 +23,13 @@ Master and nodes must have passwordless SSH access
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Add the system information gathered above into a file called `hosts.ini` in the same directory as this README file. There is a template in the `inventory` directory. For example:
|
First create a new dirctory based on the `sample` directory within the `inventory` directory:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp -R inventory/sample inventory/my-cluster
|
||||||
|
```
|
||||||
|
|
||||||
|
Second, edit `inventory/my-cluster/hosts.ini` to mactch the system information gathered above. For example:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
[master]
|
[master]
|
||||||
@ -37,10 +43,12 @@ master
|
|||||||
node
|
node
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If needed, you can also edit `inventory/my-cluster/group_vars/all.yml` to match your environment.
|
||||||
|
|
||||||
Start provisioning of the cluster using the following command:
|
Start provisioning of the cluster using the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ansible-playbook site.yml
|
ansible-playbook site.yml -i inventory/my-cluster/hosts.ini
|
||||||
```
|
```
|
||||||
|
|
||||||
## Kubeconfig
|
## Kubeconfig
|
||||||
|
0
inventory/my-cluster/hosts.ini
Normal file
0
inventory/my-cluster/hosts.ini
Normal file
12
inventory/sample/hosts.ini
Normal file
12
inventory/sample/hosts.ini
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[master]
|
||||||
|
192.168.1.26
|
||||||
|
|
||||||
|
[node]
|
||||||
|
192.168.1.34
|
||||||
|
192.168.1.39
|
||||||
|
192.168.1.16
|
||||||
|
192.168.1.32
|
||||||
|
|
||||||
|
[k3s_cluster:children]
|
||||||
|
master
|
||||||
|
node
|
Loading…
Reference in New Issue
Block a user