Short overview of this repository and how to use it.
- .gitignore
- Readme.md
- ansible/
- exp/
- exp/new.kubeconfig
- immich/
- exp/immich/.env
- exp/immich/docker-compose.yml
- [exp/immich/hwaccel.ml (1).yml](exp/immich/hwaccel.ml (1).yml)
- [exp/immich/hwaccel.transcoding (1).yml](exp/immich/hwaccel.transcoding (1).yml)
- exp/immich/prometheus.yml
- exp/immich/library/
- exp/immich/postgres/
- exp/listmonk/compose.yaml
- n8n/
- pihole/
- kube/
This repo contains:
- Ansible playbooks to provision and configure a MicroK8s-based home lab and related services (ansible/ansible-initial-setup.yaml).
- Kubernetes manifests for services intended to run on the cluster (kube/).
-
Review variables:
-
Run the initial setup playbook (example):
- ansible-playbook -i ansible/hosts ansible/ansible-initial-setup.yaml -e @ansible/vars.yml
Notes:
- The initial playbook installs snapd and MicroK8s, enables addons, and prepares master/worker join tokens. See ansible/ansible-initial-setup.yaml for details.
- Generated join tokens are produced on the master and then applied to workers by the playbook.
-
After provisioning:
- Use the kubeconfig at exp/new.kubeconfig or
microk8s configto interact with the cluster. - Deploy the manifests in kube/ (for example
kubectl apply -f kube/immich.yaml).
- Use the kubeconfig at exp/new.kubeconfig or
- Add or update users: ansible/ansible-setup-user.yaml
- Restore data or persistent storage: ansible/ansible-restore-data.yaml
- Inspect the playbook that sets up cloudflared services and systemd units: ansible/ansible-initial-setup.yaml
- The initial playbook waits for MicroK8s readiness and enables addons like dns, storage, metallb, ingress, dashboard and metrics-server. See the addon list in ansible/ansible-initial-setup.yaml.
- Cloudflared tunnel configuration and systemd service files are created by the ansible playbook. Ensure
tunnel1_id,tunnel2_id, and other cloudflared-related variables are set in ansible/vars.yml before running thecloudflaredtag. - Use
ansible-playbook --tags microk8s,jointo focus on cluster install/join flow.
- If MicroK8s is not ready, check the output of
microk8s status --wait-readyon the target host(s). - For join failures, inspect the generated join command captured by the master play and available in host vars after running the playbook. Inspect ansible/ansible-initial-setup.yaml to see how the join command is extracted.
- Add more Kubernetes manifests under
kube/and apply them against the cluster. - Add or modify Ansible tasks in
ansible/to extend provisioning logic.