Skip to content

brettinternet/cluster

Repository files navigation

K8s Cluster

Lint

Features

Usage

Setup and usage is inspired heavily by this homelab gitops template and the k8s-at-home community. You can find similar setups with the k8s at home search. Historical revisions of this repository had rootless Podman containers deployed with ansible as systemd units, and a single-node docker compose orchestration before that.

Looking for a simpler devops experience? Checkout my docker deployment at brettinternet/homelab.

Setup

Dependencies

Install go-task

Install dependencies and setup environment:

task init

Provision

Then, provision your infrastructure:

task ansible:{init,list,ping,setup,install,status}

DNS and Tunnel

Setup a Cloudflare Tunnel.

cloudflared tunnel login
cloudflared tunnel create cluster

Add the tunnel's credentials.json to the value in cloudflared-secret and tunnel ID to cluster-secrets.sops.yaml.

Add a Cloudflare API token with these permissions to the value in external-dns-secret.

  • Zone - DNS - Edit
  • Account - Cloudflare Tunnel - Read

Deploy

Kubernetes

Verify flux can be installed. Then, push changes to remote repo and install.

task flux:{verify,install}

Push latest to repo - you can use the wip.sh script for that with task wip.

task flux:reconcile
task kubernetes:resources

Most deployments in this repo use an app-template chart with these configuration options.

About

A small self-hosted kubernetes cluster on the shelf in my office

Topics

Resources

Stars

Watchers

Forks

Languages