Removing unclean k3s nodes from an etcd cluster

To remove a k3s node, that hasn’t been removed from the etcd cluster cleanly, get the etcdctl tool as described. It’s easier to download it on a control-plane node, as you will need the etcd certificates to connect to etcd. etcdctl --cert /var/lib/rancher/k3s/server/tls/etcd/server-client.crt --key /var/lib/rancher/k3s/server/tls/etcd/server-client.key --endpoints --cacert /var/lib/rancher/k3s/server/tls/etcd/server-ca.crt member list etcdctl --cert /var/lib/rancher/k3s/server/tls/etcd/server-client.crt --key /var/lib/rancher/k3s/server/tls/etcd/server-client.key --endpoints --cacert /var/lib/rancher/k3s/server/tls/etcd/server-ca.crt member remove <nodeid>

September 12, 2023

Automated Docker container updates with compose and python3

import os import docker import subprocess client = docker.from_env() compose_paths = [] for container in client.containers.list(): if "com.docker.compose.project.working_dir" in container.labels: if "updater.skip" in container.labels: print(f"Skipping {container.labels['com.docker.compose.project.working_dir']}") else: if container.labels['com.docker.compose.project.working_dir'] not in compose_paths: compose_paths.append(container.labels['com.docker.compose.project.working_dir']) for path in compose_paths: try:['pwd'], cwd=path) p =['docker', 'compose', 'pull'], cwd=path) p.check_returncode() p =['docker', 'compose', 'up', '-d'], cwd=path) p.check_returncode() except: raise

May 17, 2023

Pass Nvidia GPUs to Plex running in Docker

Hardware My NAS is a low-end x64 box which was already outdated, when I bought its core components. It features an AMD E-350 CPU and 4GB RAM and it just refuses to POST with 8GB of RAM. But I also added 1x 120GB SAMSUNG 830 SSD to host the root filesystem 2x 8TB WDC WD80EFZZ-68B 2x 3TB WDC WD30EZRZ-00Z 1x Nvidia Quadro P600 with 2GB VRAM I got the card for cheap on Ebay and setup Plex to use it for transcoding....

September 8, 2022

Customize desktop links on your Linux box

Problem I am currently setting up i3wm again and Google Chrome doesn’t correctly recognise the password-store type, which for me is “gnome”. Seahorse acts as frontend for it. Fix cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications sed -i "s#/usr/bin/google-chrome-stable#/usr/bin/google-chrome-stable --password-store=gnome#g" ~/.local/share/applications/google-chrome.desktop update-desktop-database ~/.local/share/applications Start Google Chrome again and you’re set. Notes Keep in mind, that you need to start it using a launcher like Rofi. Launching google-chrome from a terminal will not consider our modified ....

June 22, 2022

Hello World.

This is the first post.

June 1, 2022