Skip to content

Commit 7b84915

Browse files
committed
Add cluster reset instructions, and drupal mention.
1 parent 8f86d79 commit 7b84915

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,41 @@ Then, you can deploy _all_ the applications configured in this repository with t
3131
Once that's done, there will be a huge variety of stuff running on your cluster, including:
3232
3333
- Prometheus, AlertManager, and Grafana - for deep insights and cluster monitoring.
34-
- TODO: Add more stuff!
34+
- Drupal - a popular open-source CMS deployed with the [Drupal Operator](https://github.com/geerlingguy/drupal-operator).
35+
36+
## Resetting the cluster
37+
38+
Especially when you're starting out with Kubernetes, but even if you're an expert, you'll likely want to blow away all the changes you've made in a cluster and start fresh. If you made a mistake, or something broke terribly, that problem goes away with the cluster. Or, if you want to make sure you've automated the entire cluster build properly, it's best practice to blow up the cluster and rebuild it from time to time.
39+
40+
Regardless of the reason, here's how to quickly wipe the cluster clean (without re-flashing all the Raspberry Pis from scratch):
41+
42+
1. In the `k3s-ansible` repository directory (which you used to set up the cluster), run:
43+
44+
```
45+
ansible-playbook -i inventory/hosts.ini reset.yml
46+
```
47+
48+
This command will likely have a few failures relating to files that can't be cleaned up until after a reboot.
49+
50+
2. Reboot the Raspberry Pis (in the same directory):
51+
52+
```
53+
ansible -i inventory/hosts.ini all -m reboot -b
54+
```
55+
56+
3. Run the reset playbook a second time, to clean up the stragglers:
57+
58+
```
59+
ansible-playbook -i inventory/hosts.ini reset.yml
60+
```
61+
62+
4. Re-install K3s on the cluster:
63+
64+
```
65+
ansible-playbook -i inventory/hosts.ini site.yml
66+
```
67+
68+
Now you can go back to the steps above under 'Usage' to set up applications inside the cluster!
3569
3670
## Author
3771

0 commit comments

Comments
 (0)