LIST

gitea on homeserver

app service deployment db secret db config disable registration DISABLE_REGISTRATION db service deployment secret 1password config backup cron nginx http ssh -> failed could https://stackoverflow.com/questions/71789156/how-to-redirect-ssh-requests-in-nginx sudo mkdir -p /opt/gitea/tmp /data/gitea/gitea /opt/gitea/db-data /data/backups/gitea sudo chown tjen:tjen -R /opt/gitea /data/gitea /data/backups/gitea sudo find /opt/gitea -type d -exec sudo chmod 755 {} + sudo find /data/gitea -type d -exec sudo chmod 755 {} + sudo find /data/backups/gitea -type d -exec sudo chmod 755 {} + tree /{data,opt,data/backups}/gitea gitea ssh failure port forward straight to gitea 2224:22 worked port forward to nginx 2224:224 did not work (where nginx was stream{} configured to pass to gitea:22) for some reason, nmap on homeserver also did not show port 2224 open (earlier it did show 2222 open, when I was trying with that port…)

January 1, 2025

analyze & fix coredns issue network

logs from nginx show [emerg] host not found in upstream plex in /etc/nginx/conf.d/ssl.conf others also show unable to find ip for service names reboot all failed kube-system stuff kgp -n kube-system kdelp ... troubleshoot dns stuff src: https://forums.rancher.com/t/k3s-dns-resolution-failure/39091 kubectl run -it --rm --restart=Never busybox --image=busybox:1.28 -- nslookup kubernetes.default for p in $(kubectl get pods --namespace=kube-system -l k8s-app=kube-dns -o name); do kubectl logs --namespace=kube-system $p; done fix coredns by rebooting it so coredns is having issues let’s reboot it...

October 16, 2024

homeserver 1password kubernetes operator

install 1password connect server https://developer.1password.com/docs/connect/get-started/?deploy=kubernetes&method=1password-com#manual-step-2-deploy-1password-connect-server Step 1: Create a Secrets Automation workflow https://my.1password.eu/developer-tools/directory create a connect server save 1password-credentials.json save connect token (skip) Step 2: Deploy 1Password Connect Server skip in favour of installing together with operator helm repo add 1password https://1password.github.io/connect-helm-charts/ helm install connect 1password/connect --set-file connect.credentials=1password-credentials.json Kubernetes Operator https://developer.1password.com/docs/k8s/k8s-operator/?deployment-type=helm helm repo add 1password https://1password.github.io/connect-helm-charts/ helm install connect 1password/connect --set-file connect.credentials=1password-credentials.json --set operator.create=true --set operator.token.value=OP_CONNECT_TOKEN usage 1password: vaults/pet....

September 6, 2024

test kubernetes cronjob manualy

src: https://www.craftypenguins.net/blog/how-to-trigger-a-kubernetes-cronjob-manually/ kubectl create job --from=cronjob/<name of cronjob> <name of job> kgcj NAME SCHEDULE SUSPEND ACTIVE LAST SCHEDULE AGE fireflyiii-db-backup 0 3 * * * False 0 8h 2d18h cloudbackup 0 4 * * * False 0 5m9s kubectl create job --from=cronjob/cloudbackup cloudbackup-test

July 30, 2024

kubectl force delete pod

kubectl delete pods coredns-6799fbcd5-m5jq2 -n kube-system –grace-period=0 –force src: https://stackoverflow.com/questions/35453792/pods-stuck-in-terminating-status

June 23, 2024

debugging network k3s

Analysis kgp -> showing nginx crashbackoffloop kl nginx-7bf7bd99c5-cw8vl -> showing no DNS resolution https://stackoverflow.com/questions/73297599/coredns-running-status-but-not-become-ready kubectl run -it test-nginx-svc --image=nginx -- bash curl http://:8080 curl http://nginx-service:8080 cat /etc/resolv.conf kgpa -> showing coredns pod not up –> dns is not working delete coredns kubectl delete –namespace kube-system pod coredns-6799fbcd5-m5jq2 delete nginx (to trigger redeploy instead of waiting for the crashloopbackoff) kubectl delete pod nginx-7bf7bd99c5-cw8vl

June 1, 2024

dockerx build for multi arch builds

first problem: docker image with wrong arch ➜ helloworld-go git:(main) kubectl describe pod helloworld-go Name: helloworld-go-586857689f-7dtxb Namespace: default ... Containers: helloworld-go: Container ID: containerd://2a812fef1c5961108c94b15aa7232d459c783b6fa35d697491d13e3097116e3e Image: docker.io/tjenwellens/helloworld-go:latest Image ID: docker.io/tjenwellens/helloworld-go@sha256:21f452f905d1453d914641ad98fd23d36282ccab688a1ea123689584699051ce ... Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 30s default-scheduler Successfully assigned default/helloworld-go-586857689f-7dtxb to homeserver Normal Pulled 5s (x3 over 30s) kubelet Container image "docker.io/tjenwellens/helloworld-go:latest" already present on machine Normal Created 5s (x3 over 30s) kubelet Created container helloworld-go Normal Started 5s (x3 over 30s) kubelet Started container helloworld-go Warning BackOff 0s (x4 over 29s) kubelet Back-off restarting failed container helloworld-go in pod helloworld-go-586857689f-7dtxb_default(67ed7a01-671a-4a64-a64f-9fc04fb0c65d) originally there was something in the events which made me google k3s readyness probe failedconnection refused...

May 24, 2024

kubectl config merge

KUBECONFIG=~/.kube/config:$(find ~/.kube -type f -name ‘*.config’ | tr ‘\n’ ‘:’) kubectl config view –flatten > ~/.kube/config inspiration https://able8.medium.com/how-to-merge-multiple-kubeconfig-files-into-one-36fc987c2e2f

May 23, 2024

multipass k3s kubectl helm

1) Multipass and k3s https://andreipope.github.io/tutorials/create-a-cluster-with-multipass-and-k3s.html ➜ k3s git:(main) multipass find --show-unsupported Image Aliases Version Description 20.04 focal 20240430 Ubuntu 20.04 LTS 22.04 jammy 20240426 Ubuntu 22.04 LTS 23.10 mantic 20240508 Ubuntu 23.10 24.04 noble,lts 20240423 Ubuntu 24.04 LTS Blueprint Aliases Version Description anbox-cloud-appliance latest Anbox Cloud Appliance charm-dev latest A development and testing environment for charmers docker 0.4 A Docker environment with Portainer and related tools jellyfin latest Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media....

May 8, 2024

Pet-Project: StudyBooks

predecessor of mindmark

February 1, 2020