# Heimdall ## Basic stuff ### Install ```shell helm install heimdall ./helm --namespace heimdall --create-namespace ``` ### Update ```shell helm -n heimdall upgrade heimdall .\helm\ ``` ### Check ```shell kubectl -n heimdall get cm,pvc,pod,svc ``` ### Tail Log ```shell kubectl -n heimdall logs -f heimdall-0 ``` ### Delete ```shell kubectl delete ns heimdall ``` ## Immigration We need to find the location for the files ### Step 1 ```shell kubectl -n heimdall get pvc data-heimdall-0 -o wide ``` Output: ``` NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS VOLUMEATTRIBUTESCLASS AGE VOLUMEMODE data-heimdall-0 Bound pvc-b84dce5e-bc04-456c-83c1-6f6f5f326040 1Gi RWO microk8s-hostpath 1m Filesystem ``` we need the volume name in this case `pvc-b84dce5e-bc04-456c-83c1-6f6f5f326040` ### Step 2 ```shell kubectl get pv pvc-b84dce5e-bc04-456c-83c1-6f6f5f326040 -o yaml ``` Output: ``` apiVersion: v1 kind: PersistentVolume metadata: ... spec: accessModes: - ReadWriteOnce capacity: storage: 1Gi claimRef: ... hostPath: path: /var/snap/microk8s/common/default-storage/heimdall-data-heimdall-0-pvc-b84dce5e-bc04-456c-83c1-6f6f5f326040 type: DirectoryOrCreate nodeAffinity: ... persistentVolumeReclaimPolicy: Delete storageClassName: microk8s-hostpath volumeMode: Filesystem status: ... ``` We need `spec -> hostPath -> path` in this case `/var/snap/microk8s/common/default-storage/heimdall-data-heimdall-0-pvc-b84dce5e-bc04-456c-83c1-6f6f5f326040` ### Step 2 Login to the old server. and use rsync, don't forget stuff like puid, pgid, file access and stuff. ```shell rsync -avz -e ssh ./ username@0.0.0.0:/var/snap/microk8s/common/default-storage/heimdall-data-heimdall-0-pvc-b84dce5e-bc04-456c-83c1-6f6f5f326040 ```