Skip to content

Commit e4d8f69

Browse files
ChrisThePCGeekThePCGeek
andauthored
update path/note (#123)
* add cmd to update initramfs * fixed inventory path * added ssh password note Co-authored-by: ThePCGeek <[email protected]>
1 parent c21ca23 commit e4d8f69

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

_posts/2022-03-19-k3s-etcd-ansible.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Next, you'll want to copy the `sample` directory within the `inventory` director
3030
cp -R inventory/sample inventory/my-cluster
3131
```
3232

33-
Next, edit the `inventory/hosts.ini` to match your systems. DNS works here too.
33+
Next, edit the `inventory/my-cluster/hosts.ini` to match your systems. DNS works here too.
3434

3535
```ini
3636
[master]
@@ -47,22 +47,24 @@ master
4747
node
4848
```
4949

50-
Edit `inventory/group_vars/all.yml` to your liking. See comments inline.
50+
Edit `inventory/my-cluster/group_vars/all.yml` to your liking. See comments inline.
5151

5252
Start provisioning of the cluster using the following command:
5353

5454
```bash
55-
ansible-playbook site.yml -i inventory/hosts.ini
55+
ansible-playbook site.yml -i inventory/my-cluster/hosts.ini
5656
```
5757

58-
After deployment control plane will be accessible via virtual ip address which is defined in `inventory/group_vars/all.yml` as `apiserver_endpoint`
58+
**note: add --ask-pass --ask-become-pass if you are using password SSH login**
59+
60+
After deployment control plane will be accessible via virtual ip address which is defined in `inventory/my-cluster/group_vars/all.yml` as `apiserver_endpoint`
5961

6062
## Removing
6163

6264
To remove k3s from the nodes
6365

6466
```bash
65-
ansible-playbook reset.yml -i inventory/hosts.ini
67+
ansible-playbook reset.yml -i inventory/my-cluster/hosts.ini
6668
```
6769

6870
## kube config
@@ -74,7 +76,7 @@ scp debian@master_ip:~/.kube/config ~/.kube/config
7476

7577
## Testing your cluster
7678

77-
Be sure you can ping your VIP defined in `inventory/group_vars/all.yml` as `apiserver_endpoint`
79+
Be sure you can ping your VIP defined in `inventory/my-cluster/group_vars/all.yml` as `apiserver_endpoint`
7880

7981
```bash
8082
ping 192.168.30.222
@@ -106,7 +108,7 @@ kubectl apply -f example/service.yml
106108
```
107109

108110

109-
Check service and be sure it has an IP from metal lb as defined in `inventory/group_vars/all.yml`
111+
Check service and be sure it has an IP from metal lb as defined in `inventory/my-cluster/group_vars/all.yml`
110112

111113
```bash
112114
kubectl describe service nginx

0 commit comments

Comments
 (0)