d1egoaz / k8s-local-ops

Mi local Kubernetes cluster experiments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

High-level view of my cluster’s current state

graph TD;
    raspberryPi[Raspberry Pi 5] --> microK8s[MicroK8s];
    microK8s --> cluster[(Kubernetes Cluster)];
    cluster --> localStorage[Local Storage Addon];
    cluster --> homeAssistant[Home Assistant];
    homeAssistant --> hacs[hacs Addon] ;
    cluster --> nodeRed[Node Red];
    cluster --> homeBridge[Home Bridge];

    classDef hardware fill:#4caf50,color:#fff;
    classDef k8s fill:#326ce5,color:#fff;
    classDef pending fill:#ff9800,color:#fff;
    classDef addon fill:#f9a825,color:#fff;

    class raspberryPi hardware;
    class microK8s,cluster k8s;
    class localStorage,hacs addon;
    class piholeOrAdguard pending;
Loading

Local Storage Directory (on my machine)

/var/snap/microk8s/common/default-storage/default-microk8s-pvc-pvc-8ac1224e-2c0d-4a0a-85c8-21c39b6f1d4d

To get the subdirectories per component in local storage, make sure you mount the volume with subPath, for example:

volumeMounts:
- name: pvc
  mountPath: /homebridge
  subPath: homebridge

Current subdirectories

/var/snap/microk8s/common/default-storage/default-microk8s-pvc-pvc-8ac1224e-2c0d-4a0a-85c8-21c39b6f1d4d
$ tree -L 1
.
├── hass
├── homebridge
└── nodered

URLs

Connect from my machine to microk8s

mkdir ~/.kube
scp d1egoaz@192.168.42.23:/var/snap/microk8s/current/credentials/client.config ~/.kube/config
kubectl config use-context microk8s-cluster

About

Mi local Kubernetes cluster experiments