[{"authors":null,"categories":["Runbooks"],"content":"Tables Name Pod CIDR Service CIDR Node Mask Nodes Cluster Id Olympians 10.254.0.0/22 172.16.0.0/23 /25 4 1 Demigods 10.254.4.0/22 172.16.2.0/23 /26 5 2 Blades 10.254.6.0/22 172.16.4.0/23 /26 5 3 Microk8s 10.1.0.0/16 10.152.183.0/24 /16 1 4 ","date":1795950341,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1795950341,"objectID":"54a0ee4dd2cacb9a6461ae05acb85c14","permalink":"https://bbrietzke.github.io/post/runbooks/longform/kubernetes/","publishdate":"2026-11-29T05:05:41-06:00","relpermalink":"/post/runbooks/longform/kubernetes/","section":"post","summary":"Reference table of pod, service and node CIDRs for each of my Kubernetes clusters.","tags":["runbooks","planning"],"title":"Kubernetes Cluster Networks","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"Install for ip in \u0026#34;${ALL_NODES[@]}\u0026#34;; do echo \u0026#34;Checking disks on node: $ip\u0026#34; talosctl get disks --insecure --nodes \u0026#34;$ip\u0026#34; done export CONTROL_PLANE_IP=192.168.5.9 export WORKER_IP=( \u0026#34;192.168.5.11\u0026#34; \u0026#34;192.168.5.13\u0026#34; \u0026#34;192.168.5.17\u0026#34; \u0026#34;192.168.5.19\u0026#34; ) export ALL_NODES=( \u0026#34;192.168.5.9\u0026#34; \u0026#34;192.168.5.11\u0026#34; \u0026#34;192.168.5.13\u0026#34; \u0026#34;192.168.5.17\u0026#34; \u0026#34;192.168.5.19\u0026#34; ) export CLUSTER_NAME=demigods export CONTROL_PLANE_DISK=/dev/mmcblk0 cat \u0026lt;\u0026lt;\u0026#39;EOF\u0026#39; \u0026gt; worker-disk.yaml apiVersion: v1alpha1 kind: UnattendedInstallConfig provisioning: diskSelector: match: disk.dev_path == \u0026#34;/dev/mmcblk0\u0026#34; wipe: true EOF cat \u0026lt;\u0026lt;\u0026#39;EOF\u0026#39; \u0026gt; network.yaml apiVersion: v1alpha1 kind: KubeNetworkConfig podSubnets: - 10.254.0.0/22 serviceSubnets: - 172.16.0.0/23 EOF cat \u0026lt;\u0026lt;\u0026#39;EOF\u0026#39; \u0026gt; patch.yaml apiVersion: v1alpha1 kind: KubeFlannelCNIConfig $patch: delete --- apiVersion: v1alpha1 kind: KubeProxyConfig enabled: false EOF talosctl gen config $CLUSTER_NAME \\ https://$CONTROL_PLANE_IP:6443 --install-disk $CONTROL_PLANE_DISK \\ --config-patch-control-plane @patch.yaml \\ --config-patch @network.yaml \\ --config-patch-worker @worker-disk.yaml talosctl apply-config --insecure --nodes $CONTROL_PLANE_IP --file controlplane.yaml for ip in \u0026#34;${WORKER_IP[@]}\u0026#34;; do echo \u0026#34;Applying config to worker node: $ip\u0026#34; talosctl apply-config --insecure --nodes \u0026#34;$ip\u0026#34; --file worker.yaml done talosctl --talosconfig=./talosconfig config endpoints $CONTROL_PLANE_IP talosctl bootstrap --nodes $CONTROL_PLANE_IP --talosconfig=./talosconfig talosctl kubeconfig --nodes $CONTROL_PLANE_IP --talosconfig=./talosconfig talosctl --nodes $CONTROL_PLANE_IP --talosconfig=./talosconfig health for ip in \u0026#34;${WORKER_IP[@]}\u0026#34;; do echo \u0026#34;Wiping drives for: $ip\u0026#34; talosctl wipe disk sdb --nodes \u0026#34;$ip\u0026#34; --drop-partition --talosconfig=./talosconfig talosctl wipe disk sdc --nodes \u0026#34;$ip\u0026#34; --drop-partition --talosconfig=./talosconfig done for ip in \u0026#34;${ALL_NODES[@]}\u0026#34;; do echo \u0026#34;Getting Network Evidence for: $ip\u0026#34; talosctl get links -n \u0026#34;$ip\u0026#34; --talosconfig=./talosconfig done Install Calico kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.33.0/manifests/v3_projectcalico_org.yaml kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.33.0/manifests/tigera-operator.yaml curl -O https://raw.githubusercontent.com/projectcalico/calico/v3.33.0/manifests/custom-resources-bpf.yaml vi custom-resources-bpf.yaml # add kubeletVolumePluginPath: None and change ip addresses Install Cilium Upgrade for ip in \u0026#34;${ALL_NODES[@]}\u0026#34;; do talosctl upgrade --nodes \u0026#34;$ip\u0026#34; --talosconfig=./talosconfig \\ --image factory.talos.dev/metal-installer/b22f0791ed97b450dc8227df064cf32c9350c3b059aa247b7b398830012126dd:v1.14.5 done Reboot Nodes for ip in \u0026#34;${ALL_NODES[@]}\u0026#34;; do talosctl reboot --nodes \u0026#34;$ip\u0026#34; --talosconfig=./talosconfig done Gracefully Reset for ip in \u0026#34;${ALL_NODES[@]}\u0026#34;; do talosctl reset --nodes \u0026#34;$ip\u0026#34; --talosconfig=./talosconfig \\ --system-labels-to-wipe STATE --system-labels-to-wipe EPHEMERAL \\ --graceful=false done ","date":1795595549,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1795595549,"objectID":"d76150cd45c6047becbbf865ccde7fb9","permalink":"https://bbrietzke.github.io/post/kube/extras/talos_demigods/","publishdate":"2026-11-25T02:32:29-06:00","relpermalink":"/post/kube/extras/talos_demigods/","section":"post","summary":"Building the Raspberry Pi \"demigods\" Talos cluster: install, Calico or Cilium, upgrades, reboots and resets.","tags":["kubernetes"],"title":"Talos: The Demigods Cluster","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"Install for ip in \u0026#34;${ALL_NODES[@]}\u0026#34;; do echo \u0026#34;Checking disks on node: $ip\u0026#34; talosctl get disks --insecure --nodes \u0026#34;$ip\u0026#34; done export CONTROL_PLANE_IP=192.168.3.9 export WORKER_IP=( \u0026#34;192.168.3.11\u0026#34; \u0026#34;192.168.3.13\u0026#34; \u0026#34;192.168.3.17\u0026#34; ) export ALL_NODES=( \u0026#34;192.168.3.9\u0026#34; \u0026#34;192.168.3.11\u0026#34; \u0026#34;192.168.3.13\u0026#34; \u0026#34;192.168.3.17\u0026#34; ) export CLUSTER_NAME=olympians export CONTROL_PLANE_DISK=/dev/nvme0n1 cat \u0026lt;\u0026lt;\u0026#39;EOF\u0026#39; \u0026gt; worker-disk.yaml apiVersion: v1alpha1 kind: UnattendedInstallConfig provisioning: diskSelector: match: disk.dev_path == \u0026#34;/dev/sda\u0026#34; wipe: true EOF cat \u0026lt;\u0026lt;\u0026#39;EOF\u0026#39; \u0026gt; network.yaml apiVersion: v1alpha1 kind: KubeNetworkConfig podSubnets: - 10.254.0.0/22 serviceSubnets: - 172.16.0.0/23 EOF cat \u0026lt;\u0026lt;\u0026#39;EOF\u0026#39; \u0026gt; patch.yaml apiVersion: v1alpha1 kind: KubeFlannelCNIConfig $patch: delete --- apiVersion: v1alpha1 kind: KubeProxyConfig enabled: false EOF talosctl gen config $CLUSTER_NAME \\ https://$CONTROL_PLANE_IP:6443 --install-disk $CONTROL_PLANE_DISK \\ --config-patch-control-plane @patch.yaml \\ --config-patch @network.yaml \\ --config-patch-worker @worker-disk.yaml talosctl apply-config --insecure --nodes $CONTROL_PLANE_IP --file controlplane.yaml for ip in \u0026#34;${WORKER_IP[@]}\u0026#34;; do echo \u0026#34;Applying config to worker node: $ip\u0026#34; talosctl apply-config --insecure --nodes \u0026#34;$ip\u0026#34; --file worker.yaml done talosctl --talosconfig=./talosconfig config endpoints $CONTROL_PLANE_IP talosctl bootstrap --nodes $CONTROL_PLANE_IP --talosconfig=./talosconfig talosctl kubeconfig --nodes $CONTROL_PLANE_IP --talosconfig=./talosconfig talosctl --nodes $CONTROL_PLANE_IP --talosconfig=./talosconfig health for ip in \u0026#34;${WORKER_IP[@]}\u0026#34;; do echo \u0026#34;Wiping drives for: $ip\u0026#34; talosctl wipe disk sdb --nodes \u0026#34;$ip\u0026#34; --drop-partition --talosconfig=./talosconfig talosctl wipe disk sdc --nodes \u0026#34;$ip\u0026#34; --drop-partition --talosconfig=./talosconfig done Install Calico kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.33.0/manifests/v3_projectcalico_org.yaml kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.33.0/manifests/tigera-operator.yaml curl -O https://raw.githubusercontent.com/projectcalico/calico/v3.33.0/manifests/custom-resources-bpf.yaml vi custom-resources-bpf.yaml # add kubeletVolumePluginPath: None and change ip addresses Install Cilium Upgrade for ip in \u0026#34;${ALL_NODES[@]}\u0026#34;; do talosctl upgrade --nodes \u0026#34;$ip\u0026#34; --talosconfig=./talosconfig \\ --image factory.talos.dev/metal-installer/b22f0791ed97b450dc8227df064cf32c9350c3b059aa247b7b398830012126dd:v1.14.5 done Reboot Nodes for ip in \u0026#34;${ALL_NODES[@]}\u0026#34;; do talosctl reboot --nodes \u0026#34;$ip\u0026#34; --talosconfig=./talosconfig done Gracefully Reset for ip in \u0026#34;${ALL_NODES[@]}\u0026#34;; do talosctl reset --nodes \u0026#34;$ip\u0026#34; --talosconfig=./talosconfig \\ --system-labels-to-wipe STATE --system-labels-to-wipe EPHEMERAL \\ --graceful=true --reboot=true done ","date":1795473526,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1795473526,"objectID":"97b2df923f3e433c5d7dcefef8a805a9","permalink":"https://bbrietzke.github.io/post/kube/extras/talos_olympians/","publishdate":"2026-11-23T16:38:46-06:00","relpermalink":"/post/kube/extras/talos_olympians/","section":"post","summary":"Building the bare-metal \"olympians\" Talos cluster: install, Calico or Cilium, upgrades, reboots and resets.","tags":["kubernetes"],"title":"Talos: The Olympians Cluster","type":"post"},{"authors":null,"categories":["Runbooks"],"content":"This is to document how to handle installs and upgrade inside a Kubernetes cluster using tools such as kustomize and helm.\nComponents A component is an install application inside Kubernetes. It may have dependencies on other components, or other components may depend on it.\nA component may have multiple sub-components available to it. These sub-components may be optional, or represent alternate configurations available to the component.\nEach component is installed via helm or kustomize, not both. Each install should represent a semi-permanent state that the component should exist in.\n","date":1795436591,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1795436591,"objectID":"a382f03ff715842ab9029775e85ef3fb","permalink":"https://bbrietzke.github.io/post/runbooks/longform/kubernetes_components/","publishdate":"2026-11-23T06:23:11-06:00","relpermalink":"/post/runbooks/longform/kubernetes_components/","section":"post","summary":"Approach for installing and upgrading Kubernetes components with Helm or Kustomize.","tags":["runbooks","planning"],"title":"Managing Kubernetes Components","type":"post"},{"authors":null,"categories":["Runbooks"],"content":"I need to create a bare-metal kubernetes cluster. It will consistent of four physical machines, three workers and one control-plane. The control-plane node is named zeus, while the worker nodes are known as hera, hades and ares.\nNetworking There will be two network adapters per machine.\nOne network will be private to kubernetes and will be there only to allow the kubernetes traffic to pass to other kubernetes nodes. This network will be designated the k8s0 network.\nThe other network will be there for normal network traffic directed at and for receiving traffic from the other nodes on the network. This network will be designated the lan0 network.\nThe worker machines also have a third network adapter in them. In this scenerio they will not be used.\nThe k8s0 network will have the network of 192.168.254.0/26. The lan0 network will be 192.168.3.0/24. The lan0 network also hosts dhcp for the other machines on the network.\nDNS and the default gateway for the lan0 network will be 192.168.3.1. There will not be a DNS or a default gateway for the k8s0 network.\nHosts The machines and IP addresses will be laid out as so:\nMachine Name Last Octet k8s0 MAC lan0 MAC Role Storage Node ZEUS .9 e8:ff:1e:dc:94:00 00:e0:4c:f9:9f:b8 Control Plane false ARES .11 98:b7:85:23:34:1f 98:b7:85:23:34:1e Worker true HADES .13 98:b7:85:23:2d:01 98:b7:85:23:2d:00 Worker true HERA .17 98:b7:85:23:34:4b 98:b7:85:23:34:4a Worker true The first three octets of the network have been identified above. The only thing that will vary between machines during installation will the the last octet and that octet will be the same on both network adapters for that machine to make host identification easy. These addresses will be statically mapped in the netplan.\nif the lan0 network matches the MAC address and IP, do not hard code the IP address through netplan, since that is configured through DHCP. The k8s0 network will need to be hard coded. If the lan0 network does not match, the scripts should stop processing to allow things to be fixed.\nEach machine will have Ubuntu 26.04.1 installed on them.\nThere should be a check to make sure the host machines are fully updated with OS updates. If they are not, then the scripts should update them with all operating system upgrades before proceeding.\nStorage Drives /dev/sdb and /dev/sdc should be scrubbed and wiped of all partitions and contents in preperation for the installations for those nodes that are marked with storage node equals true.\nThe storage should be configured to use Rook.io/Cephfs on the emptied disks. Please see these prerequisites. Do not includes scripts to install rook/ceph, that will be done later by hand.\nKubernetes Versions Kubernetes should be set to the lastest and greatest ( 1.37.2 ), kube-VIP should use 1.3.1 and Cilium should use 1.20.5.\nKube-VIP The control panel will run KUBEVIP to broadcast a virtual IP for the control plane. This address will be 192.168.3.5. It will only broadcast this address on the lan0 network. KUBEVIP should only be used to broadcast the control plane ip address, not provide an IP for any load balancers\nCIDR Blocks For Kubernetes itself, the Pod CIDR will be 10.254.0.0/22. The services CIDR will be 172.16.0.0/23. Each node will get a /25 CIDR from the above Pod CIDR block.\nLabels Each node will need to be marked with topology.kubernetes.io/zone of a value of olympians. The topology.kubernetes.io/region for each node will need to be HOME. The app.kubernetes.io/managed-by for each node should have a value of ansible.\nNetworking The preferred CNI is Cilium and should be installed right after the control plane node comes up. It should live as it’s own script. Keep in mind that we are using a different pod CIDR that what Cilium expects and the installation script will need to be automatically changed to reflect that and prevent any conflicts.\nThe cluster id for Cilium should be one ( 1 ).\nThe Load Balancer IP Pool should start at 192.168.3.200 and have five IP addresses.\nThe Cilium client CLI should be installed on the control plane.\nSpecifics What is needed is an Ansible playbook that will setup the cluster. This include validating the network, configuring the storage specifics if the node is a storage node.\nIf the role is control plane, then that node should automatically create a kubernetes cluster. It will then need to automatically create a Cilium CNI networking topology with the correct CIDR blocks as dictated above.\nIf the role is worker, it will need set it self up and then join the Kubernetes network that the control plane created.\nThere should be a simple way to rollback the installation, removing Kubernetes from the machines in case of a reset.\nThere should be a Makefile for executing the workflow. It should include commands for individual steps if something needs to be re-ran.\nAdditional commands are acceptable as long as the order of operations is provided in the README documentation.\nDocumentation will need to be provided, including a summary of what …","date":1795431303,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1795431303,"objectID":"7a96c689855c52efbc753dd2d6d45cb4","permalink":"https://bbrietzke.github.io/post/runbooks/longform/kube_olympians/","publishdate":"2026-11-23T04:55:03-06:00","relpermalink":"/post/runbooks/longform/kube_olympians/","section":"post","summary":"Design plan for the four-node bare-metal \"olympians\" Kubernetes cluster: hosts, dual networks and roles.","tags":["runbooks","planning"],"title":"Bare-Metal Kubernetes: The Olympians","type":"post"},{"authors":null,"categories":["Runbooks"],"content":"I would like to create a five-node Kubernetes network out of a series of Raspberry Pis. This arrangment of devices is to allow for learning and managing Kubernetes in a small form factor with ARM64 processors.\nThe machines are named after mythological demigods. This convention is because these are single-board computing devices and not fully-fledged computing resources.\nThe Demigods Hosts The devices are laid out as such:\nMachine Name Last Octet Role Storage Node RAM MAC Addr. Hercules .9 Control Plane false 8Gb 88:A2:9E:29:ED:25 Achilles .11 Worker true 16Gb 2c:cf:67:c7:86:d2 Perseus .13 Worker true 16Gb 88:a2:9e:00:07:d2 Helen .17 Worker true 16Gb 2C:CF:67:E4:89:EB Aenes .19 Worker true 16Gb 88:A2:9E:7A:3B:62 Networking There will be one network that is routed behind an OpenWRT router. This is done to maintain network integrity and isolation.\nThe network address itself is 192.168.5.0/26. The default gateway and DNS server will be 192.168.5.1. The name for this network will be k8s0.\nThe hosts themselves are assigned addresses based on statically mapped DHCP addresses.\nThe address last octets from .50 to .59 will be DHCP addresses assigned to transient resources.\nKubernetes Cluster Overall The cluster name will be demigods. Please use this for all contexts and naming conventions.\nThe version of Kubernetes to be installed is 1.37.2.\nThere will need to be labels applied to each node. The topology.kubernetes.io/region will need to be HOME and the topology.kubernetes.io/zone will need to be DEMIGODS. The app.kubernetes.io/managed-by for each node should have a value of ansible.\nVersions Kubernetes should be set to the lastest and greatest ( 1.37.2 ), kube-VIP should use 1.3.1 and Cilium should use 1.20.5.\nNetworking The overall pod network will be 10.254.4.0/22 with each node receiving a /26 network. The service CIDR will be 172.16.2.0/23.\nThere will be a KUBE-VIP installation on the control plane that will serve at 192.168.5.5. Kube-VIP should be installed at the lastest and greatest version of v1.3.1.\nThe CNI installed should be Cilium at version 3.33.0.\nStorage Each device marked as a storage node has a drive at /dev/nvme0n1. This device will need to scrubbed and wiped of all partitions in preparation for the installation of Rook/Ceph. Each node will need the prerequistes for Rook/Ceph to be installed and readied.\nSpecifics What is needed is a number of scripts, one for each host that will set that node up as a kubernetes capable machine, setup the networking and configure the storage specifications if the node is a storage node.\nIf the role is control plane, then that node should automatically create a kubernetes cluster. It will then need to automatically create a calico CNI networking topology with the correct CIDR blocks as dictated above.\nIf the role is worker, it will need set it self up and then join the Kubernetes network that the control plane created.\nAdditional scripts are acceptable as long as the order of operations is provided in the README documentation.\nDocumentation will need to be provided, including a summary of what will be happening, the order that the scripts will need to be run in.\n","date":1795429827,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1795429827,"objectID":"9cd8f3767664f1a3610b682ddb108717","permalink":"https://bbrietzke.github.io/post/runbooks/longform/kube_demigods/","publishdate":"2026-11-23T04:30:27-06:00","relpermalink":"/post/runbooks/longform/kube_demigods/","section":"post","summary":"Design plan for the five-node Raspberry Pi \"demigods\" Kubernetes cluster: hosts, networking and roles.","tags":["runbooks","planning"],"title":"Kubernetes on Raspberry Pis: The Demigods","type":"post"},{"authors":null,"categories":["MicroK8s"],"content":"Setting up a Kubernetes cluster is one thing, but being able to interact with it effectively is another. This runbook configures user access to MicroK8s and installs essential tools like kubectl and k9s to make cluster management straightforward and efficient.\nOverview This runbook configures a non-root user for MicroK8s access and installs the necessary command-line tools for cluster management. It covers adding the user to the microk8s group, configuring kubectl access, and installing k9s for an enhanced terminal-based UI. After completion, you’ll be able to manage your MicroK8s cluster without using sudo and have powerful tools at your disposal.\nPrerequisites A MicroK8s installation on a Linux system A non-root user account with sudo privileges Internet connectivity to download binaries wget installed Steps First we need to add your user to the microk8s group and configure kubectl access: sudo usermod -a -G microk8s $USER sudo mkdir -p ~/.kube sudo chown -R $USER ~/.kube sudo microk8s config \u0026gt; ~/.kube/config \u0026gt; **NOTE:** You must log out and log back in for the group membership to take effect. Install kubectl. Download the latest stable version: curl -LO \u0026#34;https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl\u0026#34; sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl rm kubectl Install k9s for a terminal-based UI to manage your cluster. You can check the k9s download page for the latest version. wget https://github.com/derailed/k9s/releases/download/v0.51.0/k9s_linux_amd64.deb sudo dpkg -i k9s_linux_amd64.deb rm k9s_linux_amd64.deb NOTE: If dpkg reports missing dependencies, run: sudo apt-get install -f\nTroubleshooting Permission denied errors If you get permission errors after adding yourself to the microk8s group:\n# Verify group membership groups kubectl connection refused # Verify MicroK8s is running microk8s status # Regenerate the config if needed sudo microk8s config \u0026gt; ~/.kube/config # Check config file permissions ls -la ~/.kube/config k9s cannot connect to cluster # Verify kubectl works first kubectl get nodes # Check kubeconfig location echo $KUBECONFIG # If empty, k9s should use ~/.kube/config by default # Explicitly set it if needed: export KUBECONFIG=~/.kube/config kubectl command not found # Verify installation which kubectl # Check if /usr/local/bin is in your PATH echo $PATH # If not, add to your ~/.bashrc or ~/.bash_profile: export PATH=$PATH:/usr/local/bin Completion and Verification After completing these steps, verify your setup:\n# Verify you\u0026#39;re in the microk8s group (after logging out/in) groups | grep microk8s # Check MicroK8s status microk8s status # Verify kubectl access kubectl get nodes kubectl get pods -A # Verify kubectl version kubectl version --client # Launch k9s k9s # Press :q to quit k9s You should see your MicroK8s node listed and be able to navigate the k9s interface.\nContacts Appendix References MicroK8s Documentation kubectl Documentation k9s Documentation kubectl Installation Guide Optional: Enable kubectl autocompletion # For bash echo \u0026#39;source \u0026lt;(kubectl completion bash)\u0026#39; \u0026gt;\u0026gt; ~/.bashrc echo \u0026#39;alias k=kubectl\u0026#39; \u0026gt;\u0026gt; ~/.bashrc echo \u0026#39;complete -o default -F __start_kubectl k\u0026#39; \u0026gt;\u0026gt; ~/.bashrc # For zsh echo \u0026#39;source \u0026lt;(kubectl completion zsh)\u0026#39; \u0026gt;\u0026gt; ~/.zshrc echo \u0026#39;alias k=kubectl\u0026#39; \u0026gt;\u0026gt; ~/.zshrc echo \u0026#39;complete -o default -F __start_kubectl k\u0026#39; \u0026gt;\u0026gt; ~/.zshrc Changelog 2025/12/26 - Initial Version 2026/11/21 - Updated k9s version ","date":1795303029,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1795303029,"objectID":"670d868a43674538927c22f416616fb6","permalink":"https://bbrietzke.github.io/post/microk8s/02_user/","publishdate":"2026-11-21T17:17:09-06:00","relpermalink":"/post/microk8s/02_user/","section":"post","summary":"Configuring a non-root user and command-line tools to manage a MicroK8s cluster.","tags":["kubernetes","microk8s"],"title":"MicroK8s User Setup","type":"post"},{"authors":null,"categories":["MicroK8s"],"content":"microk8s is a distribution of kubernetes that is compact and easy to use. It’s designed to run on the “edge”, which can be a developer laptop, a server at a remote office or on a VPS somewhere.\nOverview Installation is simple if you are using a recent form of Ubuntu. Other distro’s might have additional steps in order to setup.\nPrerequisites sudo privileges Network access to download packages A recent version of Ubuntu (i.e. 24.04.3 LTS). Steps Execute the snap command:\nsudo apt install -y snapd sudo snap install microk8s --classic --channel=latest/stable The channel can be changed to something different depending on your needs.\nTroubleshooting Wrong channel You can always view available channels with: snap info microk8s Completion and Verification You can view the status of the install and services with: microk8s status --wait-ready Contacts Appendix References MicroK8s Official Documentation MicroK8s GitHub Repository Snap Documentation Kubernetes Documentation Changelog 2025/12/15 - Initial Version ","date":1795289528,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1795289528,"objectID":"925c124086d0fce2e5b88c4f3605f325","permalink":"https://bbrietzke.github.io/post/microk8s/01_installation/","publishdate":"2026-11-21T13:32:08-06:00","relpermalink":"/post/microk8s/01_installation/","section":"post","summary":"Installing MicroK8s on Ubuntu with snap.","tags":["kubernetes","microk8s"],"title":"Installing microK8s","type":"post"},{"authors":null,"categories":["Linux"],"content":"Let’s build a few different kinds of RAID arrays and then use them.\nI’m not going to go into detail about what RAID is or the different levels, since there is plenty of documentation out there already. These are the commands to set up software RAID for Linux and the general workflow to follow.\nDo we have any now? Let’s double‑check the current RAID state.\ncat /proc/mdstat Which Devices? Insert the new drives into the machine. You should know what they come up as, but if you don’t, try:\nlsblk That should give you a list of all the block devices on the system and where they are being used. Some of them may not make sense at first glance, but you should see the ones you just added. If needed, run the command and copy down the results. Then insert the drives and execute it again.\nI will be using the following devices:\n/dev/sda /dev/sdb /dev/sdc /dev/sdd Create the Arrays! RAID 0 We’ll start with RAID 0, which allows us to use all the drives as one big (though not redundant) block device.\nsudo mdadm --create --verbose /dev/md0 \\ --level=raid0 --raid-devices=4 \\ /dev/sda /dev/sdb /dev/sdc /dev/sdd RAID 1 Simple mirroring. The easiest to use, a decent redundancy package, and not all that wasteful.\nsudo mdadm --create --verbose /dev/md1 \\ --level=raid1 --raid-devices=2 \\ /dev/sda /dev/sdb RAID 5 Probably the best all‑around choice. It gives the best use of capacity and good performance.\nsudo mdadm --create --verbose /dev/md0 \\ --level=raid5 --raid-devices=4 \\ /dev/sda /dev/sdb /dev/sdc /dev/sdd Create the FileSystem sudo mkfs -t ext4 /dev/md0 Mounting You should have these drives come up every time you want to use them, so add the entries to /etc/fstab.\nFirst, obtain the UUID of the array.\nsudo blkid /dev/md0 Take the UUID and add the following line to /etc/fstab (adjust the mount point and options as needed):\nUUID=69f26dbf-0a08-4d3b-9a02-eb5c60a10d65 /srv ext4 defaults 0 0 Then run:\nsudo systemctl daemon-reload sudo mount -a and the array should appear at the desired location.\nUpdate Configuration sudo mdadm --detail --scan | sudo tee -a /etc/mdadm/mdadm.conf Then update the initramfs so that the RAID arrays are recognised at boot:\nsudo update-initramfs -u ","date":1795008913,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1795008913,"objectID":"e6fc1ffbb8ac27af1095bfc2df5d8e17","permalink":"https://bbrietzke.github.io/post/linux/raid_setup/","publishdate":"2026-11-18T07:35:13-06:00","relpermalink":"/post/linux/raid_setup/","section":"post","summary":"Creating, formatting and mounting Linux software RAID arrays with mdadm.","tags":["linux"],"title":"RAID Arrays","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"Install helm repo add harbor https://helm.goharbor.io helm repo update helm show values harbor/harbor \u0026gt; values.yaml helm upgrade --install harbor harbor/harbor \\ --namespace harbor \\ --create-namespace \\ -f values.yaml ","date":1794925100,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1794925100,"objectID":"7572d0862f5291bafed0d2e363049b17","permalink":"https://bbrietzke.github.io/post/kube/harbor/","publishdate":"2026-11-17T08:18:20-06:00","relpermalink":"/post/kube/harbor/","section":"post","summary":"Installing the Harbor container registry with Helm.","tags":["kubernetes"],"title":"Harbor","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"Storage can be a pain.\nThere are a lot of options out there, most of which I haven’t explored. I settled on Rook for my bare-metal cluster.\nSnapshots Snapshots are great to have prior to migration or if you want to move something to dev from a production PVC. It’s not hard to setup, but it is confusing to get right.\ngit clone https://github.com/kubernetes-csi/external-snapshotter/ cd external-snapshotter git checkout release-8.2 kubectl kustomize client/config/crd | kubectl create -f - kubectl -n kube-system kustomize deploy/kubernetes/snapshot-controller | kubectl create -f - git clone --single-branch --branch v1.21.2 https://github.com/rook/rook.git cd rook/deploy/examples kubectl create -f crds.yaml -f common.yaml -f csi-operator.yaml kubectl create -f operator.yaml -f cluster.yaml kubectl get crd | grep snapshot.storage.k8s.io kubectl get pods -A | grep snapshot-controller ","date":1794876624,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1794876624,"objectID":"9846ecb253fd98b193b6ae5229b5b0f6","permalink":"https://bbrietzke.github.io/post/kube/30_storage/","publishdate":"2026-11-16T18:50:24-06:00","relpermalink":"/post/kube/30_storage/","section":"post","summary":"Setting up CSI volume snapshots and Rook storage for persistent volumes.","tags":["kubernetes"],"title":"Kubernetes Storage","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"Kubernetes is a big deal, and is something that I enjoy using.\nI have decided to document my kubernetes setup so that other folks can follow along and see what I have going on, and maybe learn a thing or two along the way. It is also documented because I tend to rebuild the mess every couple of months and I usually forget something along the way!\nOrder of Operations Installation Local Setup Add Worker Node Load Balancer Traefik Storage Prometheus Certificate Manager Extras Scheduling on the Control Plane ","date":1794770852,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1794770852,"objectID":"fc85066b05a04d59903cacc6e6f143b5","permalink":"https://bbrietzke.github.io/post/kube/overview/","publishdate":"2026-11-15T13:27:32-06:00","relpermalink":"/post/kube/overview/","section":"post","summary":"Introduction to my Kubernetes setup and the order to follow the build guides in.","tags":["kubernetes"],"title":"Kubernetes: Overview","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"Documentation\nInstall curl -skSL https://raw.githubusercontent.com/kubernetes-csi/csi-driver-iscsi/master/deploy/install-driver.sh | bash -s master -- ","date":1793677150,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1793677150,"objectID":"a163f66836d42e9197e88b33d9dd0d30","permalink":"https://bbrietzke.github.io/post/kube/install_iscsi_driver/","publishdate":"2026-11-02T21:39:10-06:00","relpermalink":"/post/kube/install_iscsi_driver/","section":"post","summary":"Installing the Kubernetes iSCSI CSI driver.","tags":["kubernetes"],"title":"Installing the iSCSI CSI Driver","type":"post"},{"authors":null,"categories":["Linux"],"content":"iSCSI is typically used when you need fast, block‑level storage for workloads such as databases. It isn’t usually something you’d attach to a consumer desktop.\nStarting with iSCSI I prefer to run on Ubuntu, so I’m using the current LTS (24.04.3) for this guide. The server is named vault.\nFirst, update the system:\nsudo apt update \u0026amp;\u0026amp; sudo apt -y full-upgrade Next, create the parent directories:\nsudo mkdir -p /srv/iscsi Install the iSCSI target sudo apt install -y targetcli-fb Create shared image files Create some backing files that can be used as targets. Optionally, you can use disk partitions or LVM volumes.\nsudo dd if=/dev/zero of=/srv/iscsi/disk00.img bs=1 count=0 seek=10G # Creates a 10GB image file sudo dd if=/dev/zero of=/srv/iscsi/disk01.img bs=1 count=0 seek=10G # Creates a 10GB image file sudo dd if=/dev/zero of=/srv/iscsi/disk02.img bs=1 count=0 seek=50G # Creates a 50GB image file sudo dd if=/dev/zero of=/srv/iscsi/disk03.img bs=1 count=0 seek=50G # Creates a 50GB image file sudo dd if=/dev/zero of=/srv/iscsi/disk04.img bs=1 count=0 seek=50G # Creates a 50GB image file sudo dd if=/dev/zero of=/srv/iscsi/disk05.img bs=1 count=0 seek=50G # Creates a 50GB image file The image files start out small and grow as data is written to them. Be careful not to over‑provision the system, as it becomes a single point of failure for anything that uses iSCSI.\nMount on loopback and format new drives (optional) sudo losetup -f /srv/iscsi/disk00.img sudo losetup -a sudo mkfs.ext4 /dev/loopX # replace X with the loop device returned by losetup -a sudo losetup -d /dev/loopX Or format all of them in one shot:\nfor image in /srv/iscsi/*.img; do sudo losetup -f \u0026#34;$image\u0026#34; sudo mkfs.ext4 /dev/loop1 sudo losetup -d /dev/loop1 done Configure the iSCSI target using TargetCLI sudo targetcli Inside the shell, follow the steps below to create a backstore from the disk images you created.\ncd /backstores/fileio create disk00 /srv/iscsi/disk00.img create disk01 /srv/iscsi/disk01.img create disk02 /srv/iscsi/disk02.img create disk03 /srv/iscsi/disk03.img create disk04 /srv/iscsi/disk04.img create disk05 /srv/iscsi/disk05.img Create the actual LUNs:\ncd /iscsi create iqn.2025-11.com.example:storage cd iqn.2025-11.com.example:storage/tpg1/luns create /backstores/fileio/disk00 create /backstores/fileio/disk01 create /backstores/fileio/disk02 create /backstores/fileio/disk03 create /backstores/fileio/disk04 create /backstores/fileio/disk05 To enable authentication:\ncd ../ set attribute generate_node_acls=1 set attribute demo_mode_write_protect=0 set attribute authentication=1 set auth userid=your_username set auth password=your_secret_password To restrict iSCSI to specific addresses:\ncd iqn.2025-11.com.example:storage/tpg1/portals delete 0.0.0.0:3260 create 10.0.0.5:3260 To save the configuration:\ncd / saveconfig exit Verification / validation sudo targetcli ls Setup firewall sudo ufw allow 3260/tcp Bonus - Scripting targetcli sudo targetcli \u0026#34;/backstores/fileio create disk00 /srv/iscsi/disk00.img\u0026#34; sudo targetcli \u0026#34;/backstores/fileio create disk01 /srv/iscsi/disk01.img\u0026#34; sudo targetcli \u0026#34;/backstores/fileio create disk02 /srv/iscsi/disk02.img\u0026#34; sudo targetcli \u0026#34;/backstores/fileio create disk03 /srv/iscsi/disk03.img\u0026#34; sudo targetcli \u0026#34;/backstores/fileio create disk04 /srv/iscsi/disk04.img\u0026#34; sudo targetcli \u0026#34;/backstores/fileio create disk05 /srv/iscsi/disk05.img\u0026#34; sudo targetcli \u0026#34;/iscsi create iqn.2026-01.io.faultycloud:storage\u0026#34; sudo targetcli \u0026#34;/iscsi/iqn.2026-01.io.faultycloud:storage/tpg1/luns create /backstores/fileio/disk00\u0026#34; sudo targetcli \u0026#34;/iscsi/iqn.2026-01.io.faultycloud:storage/tpg1/luns create /backstores/fileio/disk01\u0026#34; sudo targetcli \u0026#34;/iscsi/iqn.2026-01.io.faultycloud:storage/tpg1/luns create /backstores/fileio/disk02\u0026#34; sudo targetcli \u0026#34;/iscsi/iqn.2026-01.io.faultycloud:storage/tpg1/luns create /backstores/fileio/disk03\u0026#34; sudo targetcli \u0026#34;/iscsi/iqn.2026-01.io.faultycloud:storage/tpg1/luns create /backstores/fileio/disk04\u0026#34; sudo targetcli \u0026#34;/iscsi/iqn.2026-01.io.faultycloud:storage/tpg1/luns create /backstores/fileio/disk05\u0026#34; sudo targetcli \u0026#34;/iscsi/iqn.2026-01.io.faultycloud:storage/tpg1 set attribute generate_node_acls=1\u0026#34; sudo targetcli \u0026#34;/iscsi/iqn.2026-01.io.faultycloud:storage/tpg1 set attribute demo_mode_write_protect=0\u0026#34; sudo targetcli \u0026#34;/iscsi/iqn.2026-01.io.faultycloud:storage/tpg1 set attribute authentication=1\u0026#34; sudo targetcli \u0026#34;/iscsi/iqn.2026-01.io.faultycloud:storage/tpg1 set auth userid=your_username\u0026#34; sudo targetcli \u0026#34;/iscsi/iqn.2026-01.io.faultycloud:storage/tpg1 set auth password=your_secret_password\u0026#34; sudo targetcli \u0026#34;/iscsi set discovery_auth enable=1\u0026#34; sudo targetcli \u0026#34;/iscsi set discovery_auth userid=your_discovery_username\u0026#34; sudo targetcli \u0026#34;/iscsi set discovery_auth password=your_discovery_password\u0026#34; sudo targetcli \u0026#34;saveconfig\u0026#34; ","date":1793625504,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1793625504,"objectID":"c3e64bf4840edd129854fcd4c8ec9e0f","permalink":"https://bbrietzke.github.io/post/linux/network_storage_iscsi/","publishdate":"2026-11-02T07:18:24-06:00","relpermalink":"/post/linux/network_storage_iscsi/","section":"post","summary":"Setting up an iSCSI target on Ubuntu with targetcli for block-level network storage.","tags":["linux"],"title":"Network Attached Storage – iSCSI","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"It’s hard to build modern applications without a database. I prefer PostgreSQL and this is the operator that will help setup a clustered PostgreSQL installation in Kubernetes\nInstallation kubectl apply --server-side -f \\ https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.30/releases/cnpg-1.30.1.yaml The Actual Cluster You will want to use a good and fast network attached storage to keep database performance high. I’m using iSCI here.\nkubectl create namespace db --- apiVersion: v1 kind: Namespace metadata: name: db --- apiVersion: postgresql.cnpg.io/v1 kind: Cluster metadata: name: cluster00 namespace: db spec: instances: 3 postgresql: parameters: shared_buffers: \u0026#34;256MB\u0026#34; storage: size: 200G storageClass: iscsi-static resources: requests: memory: \u0026#34;512Mi\u0026#34; cpu: 500m limits: memory: \u0026#34;2048Mi\u0026#34; cpu: 2000m To create a role and a database, you will need to also create a secret to hold the password for the role.\n--- apiVersion: v1 kind: Secret type: kubernetes.io/basic-auth metadata: name: pqsql-secret-application-name labels: cnpg.io/reload: \u0026#34;true\u0026#34; data: username: YXBwLW5hbWU= password: YWxsZWdvcnk= Now let’s create a role and a database:\n--- apiVersion: postgresql.cnpg.io/v1 kind: DatabaseRole metadata: name: role-application-name spec: cluster: name: postgresql name: app-name comment: \u0026#34;Descriptive Application Name\u0026#34; login: true superuser: false createdb: false databaseRoleReclaimPolicy: retain inRoles: - pg_monitor passwordSecret: name: pqsql-secret-application-name --- apiVersion: postgresql.cnpg.io/v1 kind: Database metadata: name: application-db spec: name: application-name owner: app-name cluster: name: postgresql extensions: - name: vector ensure: present ","date":1793552355,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1793552355,"objectID":"8a424f2b448e4c2cbe2991b28947735c","permalink":"https://bbrietzke.github.io/post/kube/cnpg/","publishdate":"2026-11-01T10:59:15-06:00","relpermalink":"/post/kube/cnpg/","section":"post","summary":"Running a clustered PostgreSQL database in Kubernetes with the CloudNativePG operator.","tags":["kubernetes"],"title":"Cloud Native PostgreSQL","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"Dealing with TLS certificates is a pain in butt!\nThis document is just a reshash/shorten view with my specific configuration. You can find the full documentation over at cert-manager.io.\nInstallation Helm They have an OCI chart for installation. You can get the values for it by:\nhelm show values oci://quay.io/jetstack/charts/cert-manager \u0026gt; values.yaml Then review the values.yaml. Here is mine:\n--- crds: enabled: true enableCertificateOwnerRef: true affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: node-role.kubernetes.io/control-plane operator: Exists tolerations: - key: node-role.kubernetes.io/control-plane operator: Equal effect: NoSchedule config: gatewayAPI: enabled: true prometheus: enabled: true servicemonitor: enabled: false Then install with:\nhelm upgrade -i -n cert-manager --create-namespace -f values.yaml cert-manager oci://quay.io/jetstack/charts/cert-manager Go over verify section on the official docs to make sure it’s working.\nConfiguration You have to create issuers per namespace that will actually create and distribute the certificates. It’s one of those resources that you created when you installed the helm charts.\nSelf-Signed I created self-signed certificates for my namespaces just because.\nHere is an example CRD:\n--- apiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: name: dev-selfsigned-issuer namespace: default spec: selfSigned: {} Here are the ClusterIssuers for Let’s Encrypt:\n--- apiVersion: v1 kind: Secret metadata: name: cloudflare-api-token-secret namespace: cert-manager type: Opaque stringData: api-token: YOUR_CLOUDFLARE_API_TOKEN_HERE --- apiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: name: letsencrypt-dns01 spec: acme: # The ACME server URL for Let\u0026#39;s Encrypt production server: https://acme-v02.api.letsencrypt.org/directory # Email address used for ACME registration and expiration notifications email: you@yourdomain.com # Name of a secret used to store the ACME account private key privateKeySecretRef: name: letsencrypt-dns01-account-key # Enable the DNS-01 challenge provider solvers: - dns01: cloudflare: apiTokenSecretRef: name: cloudflare-api-token-secret key: api-token Requesting a Certificate It’s of course another yaml document:\napiVersion: cert-manager.io/v1 kind: Certificate metadata: name: yourdomain-cert namespace: default # Change to the namespace where your app/ingress runs spec: secretName: yourdomain-tls-secret issuerRef: name: letsencrypt-dns01 kind: ClusterIssuer dnsNames: - \u0026#34;yourdomain.com\u0026#34; - \u0026#34;*.yourdomain.com\u0026#34; Using the Certificate Manager with Ingress The certificates are mostly used by your ingress controllers to prove that the domain is valid and encrypt the communications between the origin and the client. I’m sure that can be used else where, but this is the scenerio that I use them for.\nYou will need to modify the ingress resource defination to be similiar to:\n... kind: Ingress metadata: namespace: dev annotation: cert-manager.io/issuer: dev-selfsigned-issuer ... The namespace must match the name of the issuer for that namespace.\nUsing the Certificate Manager with the Gateway API I found these docs over here.\napiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: not-important annotations: cert-manager.io/issuer: dev-selfsigned-issuer # \u0026lt;-- is important and points to your issuer spec: ... listeners: - name: https hostname: yourdomain.net port: 443 protocol: HTTPS allowedRoutes: namespaces: from: Same tls: mode: Terminate certificateRefs: - name: yourdomain-net-tls # \u0026lt;-- where the certificate is saved at as a secret and as a certificate Using with Traefik Gateway Assuming you are using the helm chart for traefik ( like we did ), you can add then update your chart after cert-manager is up and running.\ngateway: enabled: true annotations: cert-manager.io/issuer: letsencrypt-dns01 listeners: web: port: 8000 protocol: HTTP namespacePolicy: from: Same websecure: port: 8443 protocol: HTTPS namespacePolicy: from: Same certificateRefs: - name: \u0026#34;traefik-default\u0026#34; And then you need to issue a certificate:\n--- apiVersion: cert-manager.io/v1 kind: Certificate metadata: name: traefik-default namespace: traefik spec: secretName: traefik-default issuerRef: name: letsencrypt-dns01 kind: ClusterIssuer dnsNames: - \u0026#34;yourdomain.com\u0026#34; - \u0026#34;*.yourdomain.com\u0026#34; ","date":1793542039,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1793542039,"objectID":"d04a0785bde45039c185f561d8989e1f","permalink":"https://bbrietzke.github.io/post/kube/50_certmanager/","publishdate":"2026-11-01T08:07:19-06:00","relpermalink":"/post/kube/50_certmanager/","section":"post","summary":"Installing cert-manager with Helm and configuring it to issue TLS certificates.","tags":["kubernetes"],"title":"Managing Certificates in Kubernetes","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"Install export CONTROL_PLANE_IP=192.168.5.30 export WORKER_IP=(\u0026#34;192.168.5.35\u0026#34; \u0026#34;192.168.5.36\u0026#34; \u0026#34;192.168.5.37\u0026#34; \u0026#34;192.168.5.38\u0026#34;) export CLUSTER_NAME=pi-burnetes export DISK_NAME=/dev/mmcblk0 cat \u0026lt;\u0026lt;\u0026#39;EOF\u0026#39; \u0026gt; patch.yaml apiVersion: v1alpha1 kind: KubeFlannelCNIConfig $patch: delete EOF talosctl gen config $CLUSTER_NAME \\ https://$CONTROL_PLANE_IP:6443 --install-disk $DISK_NAME \\ --config-patch-control-plane @patch.yaml talosctl apply-config --insecure --nodes $CONTROL_PLANE_IP --file controlplane.yaml talosctl --talosconfig=./talosconfig config endpoints $CONTROL_PLANE_IP talosctl bootstrap --nodes $CONTROL_PLANE_IP --talosconfig=./talosconfig talosctl kubeconfig --nodes $CONTROL_PLANE_IP --talosconfig=./talosconfig talosctl --nodes $CONTROL_PLANE_IP --talosconfig=./talosconfig health for ip in \u0026#34;${WORKER_IP[@]}\u0026#34;; do echo \u0026#34;Applying config to worker node: $ip\u0026#34; talosctl apply-config --insecure --nodes \u0026#34;$ip\u0026#34; --file worker.yaml done for ip in \u0026#34;${WORKER_IP[@]}\u0026#34;; do talosctl wipe disk nvme0n1 --nodes \u0026#34;$ip\u0026#34; --drop-partition --talosconfig=./talosconfig done Install Calico kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.33.0/manifests/v3_projectcalico_org.yaml kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.33.0/manifests/tigera-operator.yaml curl -O https://raw.githubusercontent.com/projectcalico/calico/v3.33.0/manifests/custom-resources-bpf.yaml vi custom-resources-bpf.yaml # add kubeletVolumePluginPath: None and change ip addresses Longhorn drive configuration export WORKER_IP=(\u0026#34;192.168.5.35\u0026#34; \u0026#34;192.168.5.36\u0026#34; \u0026#34;192.168.5.37\u0026#34; \u0026#34;192.168.5.38\u0026#34;) cat \u0026lt;\u0026lt;\u0026#39;EOF\u0026#39; \u0026gt; disk-patch.yaml apiVersion: v1alpha1 kind: UserVolumeConfig name: longhorn provisioning: diskSelector: match: disk.transport == \u0026#39;nvme\u0026#39; \u0026amp;\u0026amp; !system_disk grow: false maxSize: 100% EOF for ip in \u0026#34;${WORKER_IP[@]}\u0026#34;; do talosctl patch machineconfig --nodes \u0026#34;$ip\u0026#34; --patch @disk-patch.yaml --talosconfig=./talosconfig talosctl reboot --nodes \u0026#34;$ip\u0026#34; --talosconfig=./talosconfig done Upgrade export ALL_NODES=(\u0026#34;192.168.5.30\u0026#34; \u0026#34;192.168.5.35\u0026#34; \u0026#34;192.168.5.36\u0026#34; \u0026#34;192.168.5.37\u0026#34; \u0026#34;192.168.5.38\u0026#34;) for ip in \u0026#34;${ALL_NODES[@]}\u0026#34;; do talosctl upgrade --nodes \u0026#34;$ip\u0026#34; --talosconfig=./talosconfig \\ --image factory.talos.dev/metal-installer/b22f0791ed97b450dc8227df064cf32c9350c3b059aa247b7b398830012126dd:v1.14.5 done Reboot Nodes export ALL_NODES=(\u0026#34;192.168.5.30\u0026#34; \u0026#34;192.168.5.35\u0026#34; \u0026#34;192.168.5.36\u0026#34; \u0026#34;192.168.5.37\u0026#34; \u0026#34;192.168.5.38\u0026#34;) for ip in \u0026#34;${ALL_NODES[@]}\u0026#34;; do talosctl reboot --nodes \u0026#34;$ip\u0026#34; --talosconfig=./talosconfig done Gracefully Reset export ALL_NODES=(\u0026#34;192.168.5.38\u0026#34; \u0026#34;192.168.5.37\u0026#34; \u0026#34;192.168.5.36\u0026#34; \u0026#34;192.168.5.35\u0026#34; \u0026#34;192.168.5.30\u0026#34;) for ip in \u0026#34;${ALL_NODES[@]}\u0026#34;; do talosctl reset --nodes \u0026#34;$ip\u0026#34; --graceful=true --reboot=true --talosconfig=./talosconfig done ","date":1793475712,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1793475712,"objectID":"0d185f6d2435c0394724f3b96eeefd26","permalink":"https://bbrietzke.github.io/post/kube/extras/talos_setup/","publishdate":"2026-10-31T14:41:52-05:00","relpermalink":"/post/kube/extras/talos_setup/","section":"post","summary":"Bootstrapping a Talos Linux cluster with talosctl, plus Calico, Longhorn disks, upgrades and resets.","tags":["kubernetes"],"title":"Talos Linux Setup","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"helm repo add longhorn https://charts.longhorn.io helm repo update helm install longhorn longhorn/longhorn --namespace longhorn-system --create-namespace --version 1.13.0 ","date":1793440582,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1793440582,"objectID":"342cd27d1ac284efbbe6757c489e53f6","permalink":"https://bbrietzke.github.io/post/kube/longhorn/","publishdate":"2026-10-31T04:56:22-05:00","relpermalink":"/post/kube/longhorn/","section":"post","summary":"Installing Longhorn distributed block storage with Helm.","tags":["kubernetes"],"title":"Longhorn Storage","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo update helm show values prometheus-community/kube-prometheus-stack \u0026gt; values.yaml helm upgrade -i prometheus prometheus-community/kube-prometheus-stack --namespace monitoring --create-namespace -f values.yaml ","date":1793049395,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1793049395,"objectID":"f310e89a147e931417d9f5b12d7e52e5","permalink":"https://bbrietzke.github.io/post/kube/40_prometheus/","publishdate":"2026-10-26T16:16:35-05:00","relpermalink":"/post/kube/40_prometheus/","section":"post","summary":"Installing the kube-prometheus-stack Helm chart for cluster monitoring.","tags":["kubernetes"],"title":"Prometheus on Kubernetes","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"Install helm repo add traefik https://traefik.github.io/charts \u0026amp;\u0026amp; \\ helm repo update Get Values helm show values traefik/traefik \u0026gt; values.yaml Install kubectl apply --server-side -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.6.3/standard-install.yaml helm upgrade -i --namespace traefik -f values.yaml traefik traefik/traefik --create-namespace My Values File --- affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: node-role.kubernetes.io/control-plane operator: Exists tolerations: - key: \u0026#34;node-role.kubernetes.io/control-plane\u0026#34; operator: \u0026#34;Equal\u0026#34; effect: \u0026#34;NoSchedule\u0026#34; providers: kubernetesGateway: enabled: true kubernetesIngress: enabled: false kubernetesCRD: enabled: false ingressClass: enabled: false isDefaultClass: false api: dashboard: false ","date":1792957130,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1792957130,"objectID":"cdde0ecb5402f50ab0b731689a2db3a8","permalink":"https://bbrietzke.github.io/post/kube/20_traefik/","publishdate":"2026-10-25T14:38:50-05:00","relpermalink":"/post/kube/20_traefik/","section":"post","summary":"Deploying Traefik with Helm and the Gateway API, including my values file.","tags":["kubernetes"],"title":"Traefik Setup","type":"post"},{"authors":null,"categories":["Linux"],"content":"So, in my youth ( many years ago ) I worked with a telecom company that sold properitery phone systems. This was back in the day before VOIP, so you had to run cable and all that jazz. Thankfully, you don’t have to do that much anymore.\nInstallation Prerequistes # Create user and group sudo groupadd --system asterisk sudo useradd -s /sbin/nologin --system -g asterisk asterisk # Install dependencies sudo apt update \u0026amp;\u0026amp; sudo apt upgrade -y sudo apt install -y build-essential wget curl git subversion libncurses5-dev libssl-dev libedit-dev libxml2-dev uuid-dev \\ libsqlite3-dev libjansson-dev libcurl4-openssl-dev libspeexdsp-dev pkg-config libsrtp2-dev Get the Asterisk’s Software cd /usr/src/ sudo wget https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-22-current.tar.gz sudo tar -xvzf asterisk-22-current.tar.gz cd asterisk-22.*/ Asterisk Dependencies and Configuration sudo ./contrib/scripts/install_prereq install sudo ./configure --with-jansson-bundled sudo make menuselect sudo make -j$(nproc) sudo make install sudo make samples sudo make config sudo ldconfig sudo sed -i \u0026#39;s/#AST_USER=\u0026#34;asterisk\u0026#34;/AST_USER=\u0026#34;asterisk\u0026#34;/\u0026#39; /etc/default/asterisk sudo sed -i \u0026#39;s/#AST_GROUP=\u0026#34;asterisk\u0026#34;/AST_GROUP=\u0026#34;asterisk\u0026#34;/\u0026#39; /etc/default/asterisk # adjust folder permissions sudo chown -R asterisk:asterisk /var/run/asterisk sudo chown -R asterisk:asterisk /etc/asterisk /var/lib/asterisk /var/log/asterisk /var/spool/asterisk /usr/lib/asterisk Adjust SYSTEMD nonsense sudo systemctl edit asterisk --full [Service] User=asterisk Group=asterisk Start the Service sudo systemctl enable asterisk sudo systemctl start asterisk sudo systemctl status asterisk sudo asterisk -rvvv Voice Agent Stuff sudo apt update \u0026amp;\u0026amp; sudo apt -y install python3.14-venv python3 venv .venv source .benv/bin/activate pip install faster-whisper websockets requests piper-tts numpy aiohttp ","date":1792582944,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1792582944,"objectID":"85c3f3ece75605d2187a943bef541708","permalink":"https://bbrietzke.github.io/post/linux/asterisk-pbx/","publishdate":"2026-10-21T06:42:24-05:00","relpermalink":"/post/linux/asterisk-pbx/","section":"post","summary":"Building and installing the Asterisk open source PBX from source on Ubuntu.","tags":["linux"],"title":"Asterisk Open Source PBX","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"The Redis operator is a pretty handy operator to have around considering that Redis is a pretty popular piece of software\nThe complete documentation can be (found over here)[https://github.com/OT-CONTAINER-KIT/redis-operator].\nInstallation Setup the helm chart.\nhelm repo add redis-ot https://ot-container-kit.github.io/helm-charts/ Install the operator.\nhelm upgrade -i redis-operator redis-ot/redis-operator --namespace redis-system --create-namespace Create a Redis instance I’ve only create standalone instances for individual namespaces. I haven’t tried to work through a cluster installation or how that would work.\nHere is an example of a stand alone instance example.\napiVersion: redis.redis.opstreelabs.in/v1beta2 kind: Redis metadata: name: redis-example namespace: default spec: kubernetesConfig: image: quay.io/opstree/redis:v7.15 imagePullPolicy: IfNotPresent storage: volumeClaimTemplate: spec: storageClassName: standard accessModes: [\u0026#34;ReadWriteOnce\u0026#34;] resources: requests: storage: 1Gi podSecurityContext: runAsUser: 1000 fsGroup: 1000 This will setup a redis instance and services to point to the instance.\n","date":1792413298,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1792413298,"objectID":"9b3d3b9bcd3652529f3ce268418cc9fe","permalink":"https://bbrietzke.github.io/post/kube/redis-operator/","publishdate":"2026-10-19T07:34:58-05:00","relpermalink":"/post/kube/redis-operator/","section":"post","summary":"Installing the OT-Container-Kit Redis operator and creating a standalone Redis instance.","tags":["kubernetes"],"title":"Redis Operator","type":"post"},{"authors":null,"categories":["Runbooks"],"content":"I wish to have a python trading bot that deals with crypto-currencies, in particular Ethereum. The bot should be able to have multiple algorithms associated with it in a Strategy design pattern. There should also be a database ( with it’s own strategy pattern ) to allow for tracking of transactions, money earned and fees.\nThere should be a paper-trading mode in addition to a live-mode.\nThe primary broker will be CoinBase, though this should be in and of itself a strategy pattern to allow for the paper-trading mode and possibly other brokers.\nConfiguration All configuration should be done through environment variables with logical defaults if a value is not provided.\nAlgorithms The first algorithm strategy should be a simple RSI pattern.\nData should be gathered on an interval. Preffered interval are 15 seconds, 30 seconds, 1 minute, 5 minutes, 15 minutes, 30 minutes and 1 hour.\nExtras There should be a stop-loss escape hatch.\nThere should be a Prometheus endpoint that tracks crypto-currency price, the current RSI, whether or not we are in a position, the available funds on hand, the amount of crypto purchased and the equity.\nPresentation of data should be a strategy as well. I can very well see this having a either web or TUI front end besides a simple log output. This front-end should allow for manual purchases as well as manual selling options.\nKubernetes This bot will run inside a Kubernetes environment. We will need a docker file that will build a container that can be pushed to a repository and then pulled into a Kubernetes cluster for execution.\nThere will need to be liveness and readyness checks. The ready-ness check should include a check to make sure that we can talk with the broker API ( either coinbase or others as part of the broker strategy ) to make sure we are getting data.\n","date":1791985340,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1791985340,"objectID":"d9cd3c239a853d8f92f2001f2723899c","permalink":"https://bbrietzke.github.io/post/runbooks/longform/pythontradingbot/","publishdate":"2026-10-14T08:42:20-05:00","relpermalink":"/post/runbooks/longform/pythontradingbot/","section":"post","summary":"Requirements for a pluggable Python crypto trading bot with paper trading, Prometheus metrics and Kubernetes deployment.","tags":["runbooks","planning"],"title":"Python Trading Bot","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"ubuntu-drivers devices sudo ubuntu-drivers install \u0026amp;\u0026amp; sudo reboot nvidia-smi Nvidia Operator Documentation\nhelm install --wait gpu-operator -n gpu-operator --create-namespace \\ oci://nvcr.io/nvidia/cloud-native-charts/gpu-operator --version=v26.7.1 kubectl get nodes -o json \\ | jq \u0026#39;.items[] | select(.status.allocatable[\u0026#34;nvidia.com/gpu\u0026#34;] != null) | {name: .metadata.name, gpus: .status.allocatable[\u0026#34;nvidia.com/gpu\u0026#34;]}\u0026#39; ","date":1791929912,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1791929912,"objectID":"b83ee220b642c7ea4268dc693f7df484","permalink":"https://bbrietzke.github.io/post/kube/extras/nvidia_on_ubuntu/","publishdate":"2026-10-13T17:18:32-05:00","relpermalink":"/post/kube/extras/nvidia_on_ubuntu/","section":"post","summary":"Installing NVIDIA drivers on Ubuntu and the NVIDIA GPU Operator so Kubernetes can schedule GPUs.","tags":["kubernetes"],"title":"NVIDIA Drivers on Ubuntu","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"--- affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: node-role.kubernetes.io/control-plane operator: Exists tolerations: - key: \u0026#34;node-role.kubernetes.io/control-plane\u0026#34; operator: \u0026#34;Equal\u0026#34; effect: \u0026#34;NoSchedule\u0026#34; providers: kubernetesGateway: enabled: true kubernetesIngress: enabled: false kubernetesCRD: enabled: false ingressClass: enabled: false isDefaultClass: false api: dashboard: false ports: web: http: redirections: entryPoint: to: websecure scheme: https permanent: true gateway: enabled: true annotations: cert-manager.io/cluster-issuer: letsencrypt-dns01 listeners: web: port: 8000 protocol: HTTP hostname: \u0026#34;faultycloud.xyz\u0026#34; namespacePolicy: from: Selector selector: matchExpressions: - key: kubernetes.io/metadata.name operator: In values: - monitoring - traefik web-wildcard: port: 8000 protocol: HTTP hostname: \u0026#34;*.faultycloud.xyz\u0026#34; namespacePolicy: from: Selector selector: matchExpressions: - key: kubernetes.io/metadata.name operator: In values: - monitoring - traefik websecure: port: 8443 protocol: HTTPS hostname: \u0026#34;faultycloud.xyz\u0026#34; mode: Terminate certificateRefs: - name: faultycloud-xyz-tls namespacePolicy: from: Selector selector: matchExpressions: - key: kubernetes.io/metadata.name operator: In values: - monitoring - traefik websecure-wildcard: port: 8443 protocol: HTTPS hostname: \u0026#34;*.faultycloud.xyz\u0026#34; mode: Terminate certificateRefs: - name: faultycloud-xyz-tls namespacePolicy: from: Selector selector: matchExpressions: - key: kubernetes.io/metadata.name operator: In values: - monitoring - traefik ","date":1791921439,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1791921439,"objectID":"e7b3abae41f2921d58fe775041eb3340","permalink":"https://bbrietzke.github.io/post/kube/extras/traefik_and_certmanager/","publishdate":"2026-10-13T14:57:19-05:00","relpermalink":"/post/kube/extras/traefik_and_certmanager/","section":"post","summary":"Traefik Helm values for Gateway API routing with TLS certificates from cert-manager.","tags":["kubernetes"],"title":"Traefik and Cert-Manager","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"Certificate Manager as a Certificate Authority Add the following yaml after installing certManager:\n--- apiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: name: selfsigned-bootstrap spec: selfSigned: {} --- apiVersion: cert-manager.io/v1 kind: Certificate metadata: name: homelab-ca namespace: cert-manager # must be cert-manager\u0026#39;s namespace for a ClusterIssuer spec: isCA: true commonName: homelab-ca secretName: homelab-ca duration: 87600h # 10 years privateKey: algorithm: ECDSA size: 256 issuerRef: name: selfsigned-bootstrap kind: ClusterIssuer --- apiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: name: homelab-ca spec: ca: secretName: homelab-ca The export the ca.crt from the homelab-ca secret and trust it on your host machines. It will then validate as a, well, validate certificate and everything will work just dandy. See! I said dandy!\nSelf Signed Certificate Here is a generic Self-Signed Certificate\napiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: name: selfsigned spec: selfSigned: {} ","date":1791145714,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1791145714,"objectID":"1a53fc33cb00918467198c4636c87d23","permalink":"https://bbrietzke.github.io/post/kube/extras/certmanager_certificate_authority/","publishdate":"2026-10-04T15:28:34-05:00","relpermalink":"/post/kube/extras/certmanager_certificate_authority/","section":"post","summary":"Configuring cert-manager as a homelab certificate authority and issuing self-signed certificates.","tags":["kubernetes"],"title":"Certificate Manager Issuers and Challenges","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"This is for a single host installation. I’ll include instructions for adding an additional host down the line if you are so inclined.\nI have consolidated a number of different documents, mostly for the troubleshooting.\nSetup This is for installation on an Ubuntu 24.04 LTS machine. I would recommend a machine with at least 8GiB of RAM, 16GiB of hard drive space and at least two cores. The more the better things will run and the more stuff you can cram into Kubernetes.\nMake sure your server is up to date before we get started.\nsudo apt update \u0026amp;\u0026amp; sudo apt full-upgrade -y Step By Step Step One: Disable Swap Kubeadm will complain if swap is enabled, so let’s disable able that.\nsudo swapoff -a Step Two: Kernel Parameters There are some parameters that need to be tuned in the linux kernel for Kubernetes to work properly.\nsudo tee /etc/modules-load.d/containerd.conf \u0026lt;\u0026lt; EOF overlay br_netfilter EOF sudo tee /etc/sysctl.d/kubernetes.conf \u0026lt;\u0026lt; EOF net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 net.ipv4.ip_forward = 1 net.ipv6.conf.all.forwarding = 1 EOF sudo modprobe overlay \u0026amp;\u0026amp; sudo modprobe br_netfilter \u0026amp;\u0026amp; sudo sysctl --system Step Three: Container Runtime Installation Let’s install containerd.\nsudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/docker.gpg \u0026amp;\u0026amp; \\ sudo add-apt-repository -y \u0026#34;deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\u0026#34; \u0026amp;\u0026amp; \\ sudo apt update \u0026amp;\u0026amp; \\ sudo apt install -y containerd.io Need to have a configuration file for containerd. Luckily, we can generate one.\ncontainerd config default | sudo tee /etc/containerd/config.toml \u0026gt;/dev/null 2\u0026gt;\u0026amp;1 sudo sed -i \u0026#39;s/SystemdCgroup \\= false/SystemdCgroup \\= true/g\u0026#39; /etc/containerd/config.toml Then we’ll need to enable and restart containerd.\nsudo systemctl enable containerd runc \u0026amp;\u0026amp; \\ sudo systemctl restart containerd Step Four: Kubernetes Runtime Installation This will install kubernetes 1.34 to be installed on the machine. At the time of writing, it is the most current version.\ncurl -fsSL https://pkgs.k8s.io/core:/stable:/v1.37/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg \u0026amp;\u0026amp; \\ echo \u0026#34;deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.37/deb/ /\u0026#34; | sudo tee /etc/apt/sources.list.d/kubernetes.list \u0026amp;\u0026amp; \\ sudo apt update \u0026amp;\u0026amp; \\ sudo apt install -y kubelet kubeadm kubectl Step Five: Kubeadm Execution Now for the part that we’ve all been waiting for! The prerequisites are in place so now it’s time to get kubernetes up and running.\nsudo kubeadm init --apiserver-advertise-address=192.168.1.230 --pod-network-cidr=10.250.0.0/16 --service-cidr=172.16.0.0/24 This will take a little while to run.\nStep Six: Tool Configuration Once the installation is complete, you will need to configure kubectl. Execute the following:\nmkdir -p $HOME/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config This will copy the configuration to your home directory. This will allow you to use kubectl from anywhere on the system.\nStep Seven: Remove the Taints This is a single node system, which means that it’s also running as a control panel. Normally, kubernetes doesn’t want additional pods on the control panel, which makes for an interesting catch-22. Thankfully, we can fix that.\nkubectl taint nodes --all node-role.kubernetes.io/control-plane- Step Eight: Container Networking In order for the node to become ready, it will need networking installed. For simple, one node installs I personally think Calico is perfectly reasonable.\nwget https://raw.githubusercontent.com/projectcalico/calico/v3.31.3/manifests/calico.yaml sed -i \u0026#39;s|# - name: CALICO_IPV4POOL_CIDR|- name: CALICO_IPV4POOL_CIDR|\u0026#39; calico.yaml sed -i \u0026#39;s|# value: \u0026#34;192.168.0.0/16\u0026#34;| value: \u0026#34;10.250.0.0/16\u0026#34;|\u0026#39; calico.yaml grep -A1 CALICO_IPV4POOL_CIDR calico.yaml kubectl apply -f calico.yaml It will take a little bit for the networking jitters to settle.\nStep Nine: Does it work? Let’s pull up the cluster information\nkubectl cluster-info Do all nodes show READY?\nkubectl get nodes -o wide What do the pods look like?\nkubectl get pods -o wide -A Step Ten: Install Something! You can also create a very basic nginx deployment just to see if things work.\nkubectl apply -f https://gist.githubusercontent.com/bbrietzke/c59b6132c37ea36f9b84f1fee701a642/raw/952524cec7892e9db350fc62773c32ddfd9ab867/kubernetes-test.yaml Then:\nopen http://kubernetes-host.local:30081/ And you should see a website in the browser of your choice.\n","date":1790694290,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1790694290,"objectID":"f7c2acf49bc40b6b4ea923db18372221","permalink":"https://bbrietzke.github.io/post/kube/00_installation/","publishdate":"2026-09-29T10:04:50-05:00","relpermalink":"/post/kube/00_installation/","section":"post","summary":"Step-by-step install of a single-node Kubernetes cluster on Ubuntu 24.04 with kubeadm and containerd.","tags":["kubernetes"],"title":"Installing Kubernetes","type":"post"},{"authors":null,"categories":["Linux"],"content":"So you have Prometheus, the next step is AlertManager, which will notify you when an something goes awry.\nAlertManager? The Alertmanager handles alerts sent by client applications such as the Prometheus server. It takes care of deduplicating, grouping, and routing them to the correct receiver integration such as email, PagerDuty, or OpsGenie. It also takes care of silencing and inhibition of alerts.\nPrerequisites A machine that can run Ubuntu 22.04 ( or other LTS ).\nYou should also have basic administrative knowledge and an account that has sudo access on the above box.\nInstallation Update the system sudo apt update \u0026amp;\u0026amp; sudo apt -y upgrade Create the AlertManager User Account sudo groupadd --system alertmanager sudo useradd -s /sbin/nologin --system -g alertmanager alertmanager Create Directories These are for configuration files and libraries.\nsudo mkdir /etc/alertmanager sudo mkdir /var/lib/alertmanager Install AlertManager Now for the fun part!\n// https://prometheus.io/download/#alertmanager wget https://github.com/prometheus/alertmanager/releases/download/v0.34.1/alertmanager-0.34.1.linux-amd64.tar.gz tar zvxf alertmanager*.tar.gz cd alertmanager*/ sudo mv alertmanager /usr/local/bin sudo mv amtool /usr/local/bin sudo chown alertmanager:alertmanager /usr/local/bin/alertmanager sudo chown alertmanager:alertmanager /usr/local/bin/amtool sudo chown alertmanager:alertmanager /var/lib/alertmanager sudo mv alertmanager.yml /etc/alertmanager cd .. rm -rf alert* Run at Startup sudo nano /etc/systemd/system/alertmanager.service with\n[Unit] Description=AlertManager Wants=network-online.target After=network-online.target [Service] User=alertmanager Group=alertmanager Type=simple ExecStart=/usr/local/bin/alertmanager \\ --config.file /etc/alertmanager/alertmanager.yml \\ --storage.path=/var/lib/alertmanager [Install] WantedBy=multi-user.target sudo systemctl daemon-reload sudo systemctl enable alertmanager sudo systemctl start alertmanager sudo systemctl status alertmanager ","date":1790284250,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1790284250,"objectID":"84eb53a6c63432c79ad5c0ec44f747ec","permalink":"https://bbrietzke.github.io/post/linux/alertmanager/","publishdate":"2026-09-24T16:10:50-05:00","relpermalink":"/post/linux/alertmanager/","section":"post","summary":"Installing Prometheus Alertmanager on Ubuntu as a systemd service to route alert notifications.","tags":["linux"],"title":"Systems and Application Notifications with Alert Manager","type":"post"},{"authors":null,"categories":["Linux"],"content":"Figuring out what’s going on when something breaks can be difficult, so having the right tooling can make a big difference. Prometheus is one such tool. With proper tuning and configuration, it can even alert you before a failure occurs.\nIt also makes pretty graphs—everyone loves good visualisations!\nWhat is Prometheus? Prometheus is a free and open‑source monitoring solution that collects and records metrics from servers, containers, and applications. It provides a flexible query language (PromQL) and powerful visualisation tools, and includes an alerting mechanism that sends notifications when needed.\nPrerequisites A machine capable of running Ubuntu 22.04 (or any other LTS release). Basic administrative knowledge and an account with sudo access on that machine. Installation Update the system sudo apt update \u0026amp;\u0026amp; sudo apt -y upgrade Create the Prometheus user account sudo groupadd --system prometheus sudo useradd -s /sbin/nologin --system -g prometheus prometheus Create directories These directories will hold Prometheus’s configuration files and data store.\nsudo mkdir /etc/prometheus sudo mkdir /var/lib/prometheus Install Prometheus Note: The following steps install the latest LTS tarball of Prometheus (as of this writing). You can download a different release from the official site: https://prometheus.io/download/#prometheus.\nwget https://github.com/prometheus/prometheus/releases/download/v3.14.0/prometheus-3.14.0.linux-amd64.tar.gz tar zvxf prometheus*.tar.gz cd prometheus*/ sudo mv prometheus /usr/local/bin sudo mv promtool /usr/local/bin sudo chown prometheus:prometheus /usr/local/bin/prometheus sudo chown prometheus:prometheus /usr/local/bin/promtool sudo mv prometheus.yml /etc/prometheus sudo chown prometheus:prometheus /etc/prometheus sudo chown -R prometheus:prometheus /var/lib/prometheus cd .. rm -rf prom* Configuring The full configuration guide is available here: https://prometheus.io/docs/prometheus/latest/configuration/configuration/. It walks through almost every option, though the wording can be confusing. Below is a simple, real‑world example of a prometheus.yml file that demonstrates typical usage.\n# my global config global: scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. # scrape_timeout is set to the global default (10s). # Alertmanager configuration alerting: alertmanagers: - static_configs: - targets: - alertmanager:9093 # Load rules once and periodically evaluate them according to the global \u0026#39;evaluation_interval\u0026#39;. rule_files: # - \u0026#34;first_rules.yml\u0026#34; # - \u0026#34;second_rules.yml\u0026#34; # A scrape configuration containing exactly one endpoint to scrape: # Here it\u0026#39;s Prometheus itself. scrape_configs: # The job name is added as a label `job=\u0026lt;job_name\u0026gt;` to any timeseries scraped from this config. - job_name: \u0026#34;prometheus\u0026#34; static_configs: - targets: [\u0026#34;localhost:9090\u0026#34;] labels: groups: \u0026#39;monitors\u0026#39; - job_name: \u0026#39;servers\u0026#39; static_configs: - targets: - \u0026#39;atlas.faultycloud.lan:9182\u0026#39; - \u0026#39;coeus.faultycloud.lan:9182\u0026#39; - \u0026#39;gaia.faultycloud.lan:9182\u0026#39; - \u0026#39;hyperion.faultycloud.lan:9182\u0026#39; labels: groups: \u0026#39;win2022\u0026#39; - job_name: \u0026#39;gitlab\u0026#39; static_configs: - targets: - \u0026#39;192.168.1.253:9090\u0026#39; labels: groups: \u0026#39;development\u0026#39; Run at Startup Create a systemd service file at /etc/systemd/system/prometheus.service with the following content:\n[Unit] Description=Prometheus Wants=network-online.target After=network-online.target [Service] User=prometheus Group=prometheus Type=simple ExecStart=/usr/local/bin/prometheus \\ --config.file /etc/prometheus/prometheus.yml \\ --storage.tsdb.path /var/lib/prometheus/ [Install] WantedBy=multi-user.target Reload systemd, enable and start the service:\nsudo systemctl daemon-reload sudo systemctl enable prometheus sudo systemctl start prometheus sudo systemctl status prometheus ","date":1790283594,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1790283594,"objectID":"3cf290eda25b5b412378a0db2dfc87af","permalink":"https://bbrietzke.github.io/post/linux/prometheus/","publishdate":"2026-09-24T15:59:54-05:00","relpermalink":"/post/linux/prometheus/","section":"post","summary":"Installing Prometheus on Ubuntu as a systemd service for systems and application monitoring.","tags":["linux"],"title":"Systems and Application Monitoring with Prometheus","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"If you have some extra drives that are the same size, Rook is a great option to multiply your storage options into something that can be distributed across your worker nodes and give you some extra capacity without having a single source of failure.\nInstallation The installation instructions over at the Rook homepage are really good, so I’m not going to repeat them here. I’ve mostly used the manifest versions, even though they have a Helm chart option.\nThere is also a cleanup guide if you want to uninstall Rook that is worth notating.\nDon’t forget to add the storage class or the extra space won’t be used.\nDay Two Operations ","date":1787664261,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1787664261,"objectID":"d4d7a862d06b1a40898bad2b5bfac5fc","permalink":"https://bbrietzke.github.io/post/kube/rook-ceph/","publishdate":"2026-08-25T08:24:21-05:00","relpermalink":"/post/kube/rook-ceph/","section":"post","summary":"Notes on using Rook-Ceph to pool spare drives into distributed storage, plus day-two operations.","tags":["kubernetes"],"title":"Rook-Ceph","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"Do your pods need to have persitent volumes for your home Kubernetes cluster? Turns out, NFS is an option\nhttps://github.com/kubernetes-sigs/nfs-subdir-external-provisioner\nHelm Charts You can add the helm chart with:\nhelm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/ Then always pull the values, since you will need to customize the NFS server IP and path\nhelm show values nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \u0026gt; values.yaml An example customized one looks like the following:\n--- nfs: server: 192.168.1.228 path: /srv/nfs/k8s storageClass: create: true name: nfs defaultClass: true tolerations: - key: \u0026#34;node-role.kubernetes.io/control-plane\u0026#34; operator: \u0026#34;Equal\u0026#34; effect: \u0026#34;NoSchedule\u0026#34; affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: node-role.kubernetes.io/control-plane operator: Exists resources: limits: cpu: 200m memory: 256Mi requests: cpu: 100m memory: 128Mi And of course, we have to provision:\nhelm upgrade -i -f values.yaml nfs nfs-subdir-external-provisioner/nfs-subdir-external-provisioner -n nfs-subdir --create-namespace ","date":1787645564,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1787645564,"objectID":"2afc2dbab546b61ebcf8ad1fa7ad70ed","permalink":"https://bbrietzke.github.io/post/kube/nfs_provisioner/","publishdate":"2026-08-25T03:12:44-05:00","relpermalink":"/post/kube/nfs_provisioner/","section":"post","summary":"Using the NFS subdir external provisioner to back persistent volumes with an NFS share.","tags":["kubernetes"],"title":"NFS Persistent Volumes","type":"post"},{"authors":null,"categories":["OpenWRT"],"content":"OpenWRT is a great little project, but the documentation can be kind of sparse and dense if you find it. Here are some things that I have learnt over the years that I want to remember.\nPages Router Setup ","date":1787594662,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1787594662,"objectID":"93867aa11e0b5145de4b20c0d2ec73e5","permalink":"https://bbrietzke.github.io/post/openwrt/overview/","publishdate":"2026-08-24T13:04:22-05:00","relpermalink":"/post/openwrt/overview/","section":"post","summary":"Introduction to my OpenWRT notes.","tags":["openwrt","networking"],"title":"OpenWRT: Overview","type":"post"},{"authors":null,"categories":["OpenWRT"],"content":"So this particular How-To is written to be specific to how OpenWrt can be made to be a router instead of a network access device. This is a two-way communication between a host network that serves WIFI and the local network that runs off of the ethernet port.\nIronically, this is for a Raspberry Pi 4. It should work for any device though.\nMake it a Router First Steps You should be on a machine that is connected to the etherport of the device in question, either through a switch or a good ole fashioned hub. You’ll need to point your browser to 192.168.1.1 and log in as root with no password.\nPut a password in. Even a simple one that isn’t secure but that you’ll remember.\nConfigure the WIFI Go to Network -\u0026gt; Wireless and choose the option to scan for radio0. Choose the your network and put the WIFI password in. Hit Submit. Then go to Save \u0026amp; Apply.\nConfigure the Local Network Go to Network -\u0026gt; Interfaces and choose Edit on the LAN interface. Delete the entry in IPv4 address and put in the IP address and the correct subnet mask. Hit Save. Then hit Save \u0026amp; Apply\nQuickly Now! Renew the DHCP lease ( operating system dependent ) and change the address in the browser to be what ever you put in for the previous step and go to the new page. You should have a new IP address with the new network and you should be able to hit the router at the new address. If you can’t, then re-flash and try again.\nAdjust the Firewall Right now, the new network can see out, but the outside network cannot see if, which is fine if you want it that way. To make it a two-way street, go to Network -\u0026gt; Firewall and change the drop to be accept and then hit Save \u0026amp; Apply.\nTesting traceroute and ping are your friends here. You should be able to traceroute and ping back and forth across both networks, assuming you have hosts that you can contact. If nothing else, test against the individual routers that you have setup.\n","date":1787593412,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1787593412,"objectID":"c6665d2fc02981ca4879eb681cc9e2da","permalink":"https://bbrietzke.github.io/post/openwrt/configure_as_router/","publishdate":"2026-08-24T12:43:32-05:00","relpermalink":"/post/openwrt/configure_as_router/","section":"post","summary":"Turning an OpenWrt device (here a Raspberry Pi 4) into a router that uses Wi-Fi as its uplink.","tags":["openwrt","networking"],"title":"Configure OpenWRT as a Router","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"Metrics server is not quite as easy to install as advertise, at least on system installed with kubeadm. But, the fix to make it work is pretty simple, assuming you do it the insecure way.\nThe correct way is more complicated, but also secure.\nInstalling The code and instructions to install metrics server can be found here. Again, not repeating them here so they go stale.\nThe instructions work perfectly, things get installed and then don’t work. At all.\nThe metrics pod just never becomes ready and then logs complain about SSL certificates being invalid.\nThe Right Way to Install You will need to go to each node and modify the kubelet config file and add a configuration line. That line is serverTLSBootstrap: true\nsudo vi /var/lib/kubelet/config.yaml or\necho \u0026#34;serverTLSBootstrap: true\u0026#34; | sudo tee -a /var/lib/kubelet/config.yaml You will then need to either restart the host machine or the kubelet service.\nWhen the service comes back up, it will request a TLS certificate that the node can communicate with the rest of the infrastructure with. The only thing is you will need to sign the certificate to make it official. You can sign all of the outstanding certificate requests with:\nfor kubeletcsr in `kubectl -n kube-system get csr | grep kubernetes.io/kubelet-serving | awk \u0026#39;{ print $1 }\u0026#39;`; do kubectl certificate approve $kubeletcsr; done Then metrics server will be happy.\nCheating and Being Insecure The way I get the metrics server installed is to cheat a little. I tell it to ignore tls verfication and magically things just work!\nHow to do it wget https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml Then add --kubelet-insecure-tls to spec.template.spec.containers.args.\nInstall kubectl apply -f components.yaml The fix the fix is in! Also discusssed Here! ","date":1787592091,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1787592091,"objectID":"5d09cca27f6f59d78048191fa4fa0917","permalink":"https://bbrietzke.github.io/post/kube/metrics_server/","publishdate":"2026-08-24T12:21:31-05:00","relpermalink":"/post/kube/metrics_server/","section":"post","summary":"Getting metrics-server working on kubeadm clusters by enabling and approving kubelet serving certificates.","tags":["kubernetes"],"title":"Kubernetes Metrics Server","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"Installation Installation instruction can be found on there website.\nFirst kubectl get configmap kube-proxy -n kube-system -o yaml | \\ sed -e \u0026#34;s/strictARP: false/strictARP: true/\u0026#34; | \\ kubectl diff -f - -n kube-system kubectl get configmap kube-proxy -n kube-system -o yaml | \\ sed -e \u0026#34;s/strictARP: false/strictARP: true/\u0026#34; | \\ kubectl apply -f - -n kube-system Then:\nkubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.16.1/config/manifests/metallb-frr-k8s.yaml Configuration Address Pool --- apiVersion: metallb.io/v1beta1 kind: IPAddressPool metadata: name: primary-pool namespace: metallb-system spec: addresses: - 192.168.1.75-192.168.1.80 Advertisers --- apiVersion: metallb.io/v1beta1 kind: L2Advertisement metadata: name: l2advert-primary namespace: metallb-system spec: ipAddressPools: - primary-pool ","date":1787489774,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1787489774,"objectID":"5bf6c41418358ec30b17b3478ce5a50a","permalink":"https://bbrietzke.github.io/post/kube/10_metallb/","publishdate":"2026-08-23T07:56:14-05:00","relpermalink":"/post/kube/10_metallb/","section":"post","summary":"Installing MetalLB and configuring an IP address pool so LoadBalancer services work on bare metal.","tags":["kubernetes"],"title":"Install MetalLB","type":"post"},{"authors":null,"categories":["Linux"],"content":"If you’re like me, you probably have AVAHI running on all your servers just to make name resolution simplier. What you probably didn’t know is you can do some neat tricks with Avahi.\nNeat Trick Number One There is a command call avahi-publish that will publish a hostname on your network. This is pretty cool, because it means you don’t have to remember to add the hostname to your hosts file. It also means you can use this to publish a hostname on a server that doesn’t have Avahi installed.\nFor example:\navahi-publish -a -R pandora.local 192.168.1.10 # or what-ever IP address that you want... Now you can ping pandora.local and it will respond!\nWhat good is this? Imagine giving your router an avahi registered name and you can log into it without having to remember the IP. If you’re on Xfinity, you can do:\navahi-publish -a -R router.local 10.0.0.1 You will be able to ping router.local and it will respond!\nNeat Trick Number Two So pinging a router by name is nice and all, but not really that exciting.\nWhat you can do is combine the above with Kubernetes’ ingress resource definations to have multiple ingress’ on the same host without having to anything magical to DNS.\nNeat Trick Number Three Again, neat-o and all, but now you have a terminal up and running hosting names and that’s just a waste of energy. What if the terminal window closes or the machine resets? Then you have to manually execute the commands to get the network back online.\nSystemd to the rescue!\n[Unit] Description=Avahi for Pandora [Service] ExecStart=/usr/bin/avahi-publish -a -R pandora.local 10.0.0.238 Restart=always [Install] WantedBy=default.target Save the file in /etc/systemd/system ( i.e. /etc/systemd/system/avahi-pandora.service ). Then treat it as any normal service.\nsudo systemctl enable avahi-pandora sudo systemctl start avahi-pandora ","date":1787140965,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1787140965,"objectID":"89f259943818d904b699cc0f690004a0","permalink":"https://bbrietzke.github.io/post/linux/publish_host/","publishdate":"2026-08-19T07:02:45-05:00","relpermalink":"/post/linux/publish_host/","section":"post","summary":"Using avahi-publish to give devices and Kubernetes ingresses friendly .local hostnames.","tags":["linux"],"title":"Custom Host Publishing","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"I prefer that my controllers run on the control plane node. It’s usually underutilizied, stable and just looking for stuff to do. Basically, you need to add:\nspec: template: spec: tolerations: - key: node-role.kubernetes.io/control-plane operator: Equal effect: NoSchedule affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: node-role.kubernetes.io/control-plane operator: Exists ","date":1769169014,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1769169014,"objectID":"8f2d5865807b701f0af47dbdfc03438e","permalink":"https://bbrietzke.github.io/post/kube/extras/schedule_on_cp/","publishdate":"2026-01-23T05:50:14-06:00","relpermalink":"/post/kube/extras/schedule_on_cp/","section":"post","summary":"The tolerations and node affinity needed to run workloads on the control plane node.","tags":["kubernetes"],"title":"How to Schedule on the Control Plane","type":"post"},{"authors":null,"categories":["Monitoring"],"content":"Figuring out what’s going on when something breaks can be difficult, so having the right tooling can make a big difference. Prometheus is one such tool. With proper tuning and configuration, it can even alert you before a failure occurs.\nIt also makes pretty graphs—everyone loves good visualisations!\nOverview Prometheus is a free and open‑source monitoring solution that collects and records metrics from servers, containers, and applications. It provides a flexible query language (PromQL) and powerful visualisation tools, and includes an alerting mechanism that sends notifications when needed.\nPrerequisites A Centos derived Linux operating system Internet connectivity to download binaries sudo privileges wget installed Steps First we need to create a group and the prometheus user.\nsudo groupadd prometheus sudo useradd -m -s /usr/sbin/nologin -d /var/lib/prometheus --system -g prometheus prometheus Create the configuration directory.\nsudo mkdir -p /etc/prometheus Download the most recent (as of publication) of the prometheus LTS server. You can go to the downloads page to get a more recent version, or a version for a different hardware package.\nwget https://github.com/prometheus/prometheus/releases/download/v3.5.0/prometheus-3.5.0.linux-amd64.tar.gz tar xvzf prometheus*.tar.gz Copy the executables and set permissions and owners.\ncd prometheus*/ sudo mv prometheus /usr/local/bin sudo mv promtool /usr/local/bin sudo mv prometheus.yml /etc/prometheus sudo chown prometheus:prometheus /usr/local/bin/prometheus sudo chown prometheus:prometheus /usr/local/bin/promtool sudo chown -R prometheus:prometheus /etc/prometheus sudo chown -R prometheus:prometheus /var/lib/prometheus If you are running SELinux you will need to execute the following to have systemd execute the file.\nsudo chcon -t bin_t /usr/local/bin/prometheus sudo semanage fcontext -a -t bin_t \u0026#34;/usr/local/bin/prometheus\u0026#34; sudo restorecon -v /usr/local/bin/prometheus In order for prometheus to run at system start-up, you will need to create a systemd file. You can use the following as an example. If you wish to use other flags or command options, you can read the reference here.\nsudo vi /etc/systemd/system/prometheus.service NOTE: This is an example systemd file for prometheus\n[Unit] Description=Prometheus Wants=network-online.target After=network-online.target [Service] User=prometheus Group=prometheus Type=simple ExecStart=/usr/local/bin/prometheus \\ --config.file /etc/prometheus/prometheus.yml \\ --storage.tsdb.path /var/lib/prometheus/ [Install] WantedBy=multi-user.target Enable and start the service.\nsudo systemctl daemon-reload sudo systemctl enable prometheus sudo systemctl start prometheus sudo systemctl status prometheus If you wish to configure prometheus, you can read about it here. The configuration file is located at /etc/prometheus.yml.\nIf you have the firewall enabled, you will need to open a port to view the UI.\nsudo firewall-cmd --permanent --add-port=9090/tcp sudo firewall-cmd --reload Troubleshooting Completion and Verification You should be able to: prometheus --version curl http://localhost:9090 Contacts Appendix References Flags Configuration Changelog 2025/12/18 - Initial Version ","date":1768641747,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1768641747,"objectID":"5f2b7681bef8a04dfdbe624c554ca3f6","permalink":"https://bbrietzke.github.io/post/monitoring/prometheus/","publishdate":"2026-01-17T03:22:27-06:00","relpermalink":"/post/monitoring/prometheus/","section":"post","summary":"Runbook for installing Prometheus on a CentOS-derived Linux host.","tags":["monitoring"],"title":"Monitoring: Prometheus","type":"post"},{"authors":null,"categories":["Monitoring"],"content":"Node Exporter is a Prometheus exporter for hardware and OS metrics exposed by *NIX kernels. It collects system-level metrics such as CPU, memory, disk I/O, network statistics, and file system usage, making them available to Prometheus for monitoring and alerting.\nOverview Node Exporter is what is used to retrieve metrics from a host. These metrics are fed into prometheus to allow for meaningful visualizations and alerting.\nPrerequisites A Centos derived Linux operating system Internet connectivity to download binaries Prometheus install on this or another machine sudo privileges wget installed Steps First we need to create a group and the node exporter user.\nsudo groupadd node_exporter sudo useradd -m -s /usr/sbin/nologin -d /var/lib/node_exporter --system -g node_exporter node_exporter Download the most recent (as of publication) package of node exporter and extract it. You can go to the node exporter download page and check for the latest one.\nwget https://github.com/prometheus/node_exporter/releases/download/v1.10.2/node_exporter-1.10.2.linux-amd64.tar.gz tar xvzf node*.tar.gz Install the binaries and set permissions.\ncd node*/ sudo mv node_exporter /usr/local/bin sudo chown node_exporter:node_exporter /usr/local/bin/node_exporter sudo chown -R node_exporter:node_exporter /var/lib/node_exporter In order for node exporter to run at system start-up, you will need to create a systemd file. You can use the following as an example.\nsudo vi /etc/systemd/system/node_exporter.service NOTE: This is an example systemd file for node exporter\n[Unit] Description=Node Exporter Wants=network-online.target After=network-online.target\n[Service] User=node_exporter Group=node_exporter Type=simple ExecStart=/usr/local/bin/node_exporter –web.listen-address=0.0.0.0:9100 –collector.textfile.directory=/var/lib/node_exporter\n[Install] WantedBy=multi-user.target ```\nEnable and start the node exporter service.\nsudo systemctl daemon-reload sudo systemctl enable node_exporter sudo systemctl start node_exporter sudo systemctl status node_exporter If you have the firewall enabled, you will need to open a port to allow remote metric collection.\nsudo firewall-cmd --permanent --add-port=9100/tcp sudo firewall-cmd --reload If you are running SELinux you will need to execute the following to have systemd execute the file.\nsestatus sudo chcon -t bin_t /usr/local/bin/node_exporter sudo semanage fcontext -a -t bin_t \u0026#34;/usr/local/bin/node_exporter\u0026#34; sudo restorecon -v /usr/local/bin/node_exporter Troubleshooting Completion and Verification You should be able to: curl http://localhost:9100/metrics curl http://localhost:9100/metrics | grep node_cpu node_exporter --version Contacts Appendix References Prometheus Configuration Available Collectors Node Exporter - Github Changelog 2025/12/19 - Initial Version ","date":1768558269,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1768558269,"objectID":"28777464725b813d2a1d4ae99df6fb9f","permalink":"https://bbrietzke.github.io/post/monitoring/node-exporter/","publishdate":"2026-01-16T04:11:09-06:00","relpermalink":"/post/monitoring/node-exporter/","section":"post","summary":"Runbook for installing Node Exporter on a CentOS-derived Linux host to feed host metrics to Prometheus.","tags":["monitoring"],"title":"Monitoring: Node Exporter","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"Update Firmware sudo vi /boot/firmware/cmdline.txt add to the end of line\ncgroup_memory=1 cgroup_enable=memory 39166497\n","date":1767530567,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1767530567,"objectID":"c8442c80369a8b12ad9bef405d8a0a9b","permalink":"https://bbrietzke.github.io/post/kube/piburnetes/first-steps/","publishdate":"2026-01-04T06:42:47-06:00","relpermalink":"/post/kube/piburnetes/first-steps/","section":"post","summary":"Preparing Raspberry Pi firmware settings (memory cgroups) for running Kubernetes.","tags":["kubernetes","raspberry-pi"],"title":"Piburnetes: First Steps","type":"post"},{"authors":null,"categories":["Monitoring"],"content":"Overview Prerequisites Steps Troubleshooting Completion and Verification Contacts Appendix References Changelog 2025/12/23 - Initial Version ","date":1766489053,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1766489053,"objectID":"0e4fe9eded69771554ecc6a91c7c1514","permalink":"https://bbrietzke.github.io/post/monitoring/grafana/","publishdate":"2025-12-23T05:24:13-06:00","relpermalink":"/post/monitoring/grafana/","section":"post","summary":"Placeholder runbook outline for installing Grafana.","tags":["monitoring"],"title":"Monitoring: Grafana","type":"post"},{"authors":null,"categories":["Monitoring"],"content":"Alertmanager handles alerts sent by client applications such as the Prometheus server. It takes care of deduplicating, grouping, and routing them to the correct receiver integration such as email, PagerDuty, or OpsGenie. It also takes care of silencing and inhibition of alerts.\nOverview When Prometheus detects issues based on your alert rules, something needs to manage those alerts intelligently. That’s where Alertmanager comes in. It receives alerts from Prometheus, groups related alerts together to reduce noise, routes them to the right notification channels (email, Slack, PagerDuty, etc.), and lets you silence alerts during maintenance. This runbook covers setting up a single Alertmanager instance to work with your Prometheus installation.\nPrerequisites A Centos derived Linux operating system Internet connectivity to download binaries Prometheus installed (can be on same or different host) sudo privileges wget installed Steps First we need to create a group and the alert manager user.\nsudo groupadd alertmanager sudo useradd -m -s /usr/sbin/nologin -d /var/lib/alertmanager --system -g alertmanager alertmanager Create the configuration directory.\nsudo mkdir -p /etc/alertmanager Download the most recent (as of publication) package of alert manager and extract it. You can go to the alert manager download page and check for the latest one.\nwget https://github.com/prometheus/alertmanager/releases/download/v0.30.0/alertmanager-0.30.0.linux-amd64.tar.gz tar xvzf alert*.tar.gz Copy the executables and set permissions and owners.\ncd alert*/ sudo mv alertmanager /usr/local/bin sudo mv amtool /usr/local/bin sudo mv alertmanager.yml /etc/alertmanager sudo chown alertmanager:alertmanager /usr/local/bin/alertmanager sudo chown alertmanager:alertmanager /usr/local/bin/amtool sudo chown -R alertmanager:alertmanager /etc/alertmanager sudo chown -R alertmanager:alertmanager /var/lib/alertmanager If you are running SELinux you will need to execute the following to have systemd execute the file.\nsudo chcon -t bin_t /usr/local/bin/alertmanager sudo semanage fcontext -a -t bin_t \u0026#34;/usr/local/bin/alertmanager\u0026#34; sudo restorecon -v /usr/local/bin/alertmanager In order for alert manager to run at system start-up, you will need to create a systemd file. You can use the following as an example. If you wish to use other flags or command options, you can read the reference here.\nsudo vi /etc/systemd/system/alertmanager.service NOTE: This is an example systemd file for alert manager\n[Unit] Description=AlertManager Wants=network-online.target After=network-online.target [Service] User=alertmanager Group=alertmanager Type=simple ExecStart=/usr/local/bin/alertmanager \\ --config.file /etc/alertmanager/alertmanager.yml \\ --storage.path=/var/lib/alertmanager [Install] WantedBy=multi-user.target Enable and start the service.\nsudo systemctl daemon-reload sudo systemctl enable alertmanager sudo systemctl start alertmanager sudo systemctl status alertmanager If you have the firewall enabled, you will need to open a port to view the UI.\nsudo firewall-cmd --permanent --add-port=9093/tcp sudo firewall-cmd --permanent --add-port=9094/tcp sudo firewall-cmd --reload Troubleshooting Service fails to start journalctl -u alertmanager -n 50 --no-pager Configuration validation # Validate alertmanager.yml syntax amtool check-config /etc/alertmanager/alertmanager.yml Port conflicts sudo ss -tlnp | grep -E \u0026#39;9093|9094\u0026#39; Prometheus not sending alerts Check Prometheus configuration: promtool check config /etc/prometheus/prometheus.yml Verify alert rules: promtool check rules /etc/prometheus/alert_rules.yml Check Prometheus targets: curl http://localhost:9090/api/v1/alertmanagers SELinux issues sudo ausearch -m avc -ts recent | grep alertmanager Completion and Verification You should be able to: alertmanager --version curl http://localhost:9093 amtool config show --alertmanager.url=http://localhost:9093 Contacts Appendix Minimal alertmanager.yml ```yaml # Example /etc/alertmanager/alertmanager.yml with email notifications global: resolve_timeout: 5m smtp_smarthost: \u0026#39;smtp.gmail.com:587\u0026#39; smtp_from: \u0026#39;alerts@example.com\u0026#39; smtp_auth_username: \u0026#39;alerts@example.com\u0026#39; smtp_auth_password: \u0026#39;your-app-password\u0026#39; route: group_by: [\u0026#39;alertname\u0026#39;, \u0026#39;cluster\u0026#39;] group_wait: 10s group_interval: 10s repeat_interval: 12h receiver: \u0026#39;email-notifications\u0026#39; receivers: - name: \u0026#39;email-notifications\u0026#39; email_configs: - to: \u0026#39;oncall@example.com\u0026#39; headers: Subject: \u0026#39;[ALERT] {{ .GroupLabels.alertname }}\u0026#39; ``` References Alertmanager Documentation Configuration Reference Notification Templates amtool Documentation Changelog 2025/12/19 - Initial Version ","date":1766153903,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1766153903,"objectID":"a44d95d3ccf35fc9ec5a5a05c1cbbae1","permalink":"https://bbrietzke.github.io/post/monitoring/alertmanager/","publishdate":"2025-12-19T08:18:23-06:00","relpermalink":"/post/monitoring/alertmanager/","section":"post","summary":"Runbook for installing Alertmanager on a CentOS-derived Linux host to deduplicate, group and route Prometheus alerts.","tags":["monitoring"],"title":"Monitoring: Alert Manager","type":"post"},{"authors":null,"categories":["MicroK8s"],"content":"MicroK8s is a great single-node kubernetes distribution. It allows a very compact and customizable package that also gives you full power of kubernetes. If you have older hardware at your disposal, or a virtual machine from Parallels or Virtual Box you can setup a kubernetes machine for testing or doing development against.\nContents Installation User Setup Network Setup ","date":1765821756,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1765821756,"objectID":"938d943b33a8bdbbe0c7f788f7f0a0d1","permalink":"https://bbrietzke.github.io/post/microk8s/overview/","publishdate":"2025-12-15T12:02:36-06:00","relpermalink":"/post/microk8s/overview/","section":"post","summary":"Introduction to MicroK8s as a compact single-node Kubernetes distribution for testing and development.","tags":["kubernetes","microk8s"],"title":"MicroK8s: Introduction","type":"post"},{"authors":null,"categories":["High Performance Computing"],"content":"Slurm (Simple Linux Utility for Resource Management) is a powerful, open-source workload manager for Linux clusters, scheduling and allocating resources (CPUs, GPUs, memory) for parallel jobs, essential for High-Performance Computing (HPC) and AI workloads.\nOverview This runbook covers building SLURM RPM packages from source on Alma Linux 9. These RPMs can then be distributed to controller and compute nodes in your cluster.\nPrerequisites A machine with Alma Linux 9 installed Root or sudo access Approximately 2GB free disk space for build process Internet connectivity for downloading source and dependencies Steps Download SLURM source code\nThe latest version can be found here.\nsudo dnf install -y wget # Set version variable for easy updates SLURM_VERSION=\u0026#34;25.11.0\u0026#34; wget https://download.schedmd.com/slurm/slurm-${SLURM_VERSION}.tar.bz2 Install build dependencies\n# Enable EPEL and CodeReady Builder repositories sudo dnf install -y epel-release sudo dnf config-manager --set-enabled crb # Install core build tools and SLURM dependencies sudo dnf install -y rpm-build autoconf automake gcc make \\ mariadb-devel munge-devel munge-libs pam-devel \\ perl-Switch perl-ExtUtils-MakeMaker perl-devel \\ pmix pmix-devel readline-devel \\ hdf5 hdf5-devel lua lua-devel \\ rrdtool-devel openssl openssl-devel libssh2-devel \\ hwloc hwloc-devel ncurses-devel man2html \\ libibmad libibumad http-parser-devel json-c-devel Build RPM packages\nThis process typically takes 10-15 minutes depending on your system.\nrpmbuild --with slurmrestd --with pmix --with hdf5 -ta slurm-${SLURM_VERSION}.tar.bz2 Verify and locate built RPMs\nls -lh ~/rpmbuild/RPMS/x86_64/ You should see RPMs including:\nslurm-*.rpm - Core SLURM binaries slurm-slurmctld-*.rpm - Controller daemon slurm-slurmd-*.rpm - Compute node daemon slurm-slurmdbd-*.rpm - Database daemon slurm-slurmrestd-*.rpm - REST API daemon slurm-pam_slurm-*.rpm - PAM module slurm-devel-*.rpm - Development headers Troubleshooting Missing Dependencies If rpmbuild fails with missing dependency errors:\nNote the missing package name from the error message Install using: sudo dnf install -y \u0026lt;package-name\u0026gt;-devel Re-run the rpmbuild command Build Failures Check build logs at: ~/rpmbuild/BUILD/slurm-*/config.log Ensure CRB repository is enabled for http-parser-devel and json-c-devel Verify sufficient disk space: df -h ~ Common Issues “rpmbuild: command not found”: Install rpm-build package Permission denied errors: Ensure you’re building as regular user, not root Network timeouts: Check firewall settings if wget fails Completion and Verification Success criteria:\n✓ No errors during rpmbuild process ✓ Multiple RPM files present in ~/rpmbuild/RPMS/x86_64/ ✓ RPM integrity check passes: rpm -K ~/rpmbuild/RPMS/x86_64/slurm-*.rpm File sizes (approximate):\nCore slurm package: ~15-20 MB Total RPMs: ~40-50 MB Contacts Appendix Package Distribution Guide Controller node: slurm, slurm-slurmctld, slurm-slurmdbd (if using accounting) Compute nodes: slurm, slurm-slurmd Submit hosts: slurm (client tools only) References Alma Linux sig-HPCAI SchedMD SLURM Documentation SLURM Quick Start Guide Changelog 2025/12/14 - Created initial version ","date":1765752389,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1765752389,"objectID":"bb9d4b7fc4daddc52f325a56cb396951","permalink":"https://bbrietzke.github.io/post/high_performance_computing/build_slurm/","publishdate":"2025-12-14T16:46:29-06:00","relpermalink":"/post/high_performance_computing/build_slurm/","section":"post","summary":"Building SLURM workload manager RPMs from source on Alma Linux 9 for an HPC cluster.","tags":["hpc"],"title":"Build SLURM on Alma Linux 9","type":"post"},{"authors":null,"categories":["Linux"],"content":"There are plenty of network‑attached storage solutions out there, both free and open source. But why would we want to build one from scratch?\nUnderstanding how these tools work gives you insight into their inner workings and opens the door to customisations that off‑the‑shelf solutions can’t provide.\nStarting with Samba I prefer to run on Ubuntu, so I’m using the current LTS (24.04.3) for this guide. The server is named vault.\nFirst, update the system:\nsudo apt update \u0026amp;\u0026amp; sudo apt -y full-upgrade Next, create the parent directories:\nsudo mkdir -p /srv/{samba,nfs} Install Samba sudo apt install -y samba Create shared directories sudo mkdir -p /srv/samba/{public,ISOs} Edit the configuration Open the Samba configuration file:\nsudo vi /etc/samba/smb.conf Add the following sections (replace or append as appropriate):\n[homes] comment = Home Directory browsable = no read only = no create mask = 0700 directory mask = 0700 valid users = %S [ISOs] comment = ISO files path = /srv/samba/ISOs browseable = yes read only = no create mask = 0700 directory mask = 0700 guest ok = yes [public] comment = Public Share path = /srv/samba/public browseable = yes read only = no create mask = 0766 directory mask = 0766 guest ok = yes Tip: Granting guest ok = yes allows unauthenticated access. Use it only for truly public data.\nAdd user accounts sudo smbpasswd -a $USER Restart services Restart the Samba daemons whenever you add a share or create a new user:\nsudo systemctl restart smbd nmbd Open the firewall sudo ufw allow samba NFS Installation sudo apt install -y nfs-kernel-server Create shared directories sudo mkdir -p /srv/nfs/{common,k8s} Setup permissions sudo chown -R nobody:nogroup /srv/nfs/ sudo chmod -R 755 /srv/nfs/ Edit the NFS export list Open /etc/exports:\nsudo vi /etc/exports Add the following lines (modify subnets as appropriate):\n/srv/nfs/common 192.168.1.0/24(rw,sync,no_subtree_check,no_root_squash) /srv/nfs/k8s 10.0.0.0/26(rw,sync,no_subtree_check,no_root_squash) Export the shares sudo exportfs -a Restart the NFS service sudo systemctl restart nfs-kernel-server Configure firewall rules Adjust for your network.\nsudo ufw allow from 192.168.1.0/24 to any port nfs sudo ufw allow from 10.0.0.0/26 to any port nfs For more detailed information, refer to the Samba documentation and the NFS manual pages.\n","date":1765743065,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1765743065,"objectID":"3c3abb12aa895f62424900cb7faecbde","permalink":"https://bbrietzke.github.io/post/linux/network_storage/","publishdate":"2025-12-14T14:11:05-06:00","relpermalink":"/post/linux/network_storage/","section":"post","summary":"Building a DIY network attached storage server on Ubuntu with Samba and NFS shares.","tags":["linux"],"title":"Network Attached Storage","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"There are some tools that I like to have on my local machine that makes working with Kubernetes much easier. This document will go through the installation and configuration of them.\nWhat to install? Since I’m on a Mac, everything is installed through (Homebrew)[https://brew.sh/].\nbrew install k9s helm kubernetes-cli If you want to install on the Linux/Kubernetes host, here are a few options:\nHelm sudo apt-get install curl gpg apt-transport-https --yes curl -fsSL https://packages.buildkite.com/helm-linux/helm-debian/gpgkey | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg \u0026gt; /dev/null echo \u0026#34;deb [signed-by=/usr/share/keyrings/helm.gpg] https://packages.buildkite.com/helm-linux/helm-debian/any/ any main\u0026#34; | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list sudo apt-get update sudo apt-get install helm K9S K9S Github Releases and choose the one that is approriate for your platform.\nConfiguration Kubernetes Tools The only thing that really needs configuration is the kubernetes configuration tools. For that, you need to get a copy of the kube config file from the control-plane.\nmkdir ~/.kube scp ubuntu@kubernetes-host.local:.kube/config ~/.kube/config This configures both k9s and kubectl, so that bit is done. Both of the tools should work as you would expect.\nHelm You don’t have to configure helm, but it’s not a bad idea either. My personal chart repository is configured as follows.\nhelm repo add bbrietzke http://bbrietzke.github.io/charts I have a few charts that I tend to use, in particular for setting up namespaces. I have three, prod, dev, and infra. There isn’t much else to customize, so this just works.\nhelm install namespaces bbrietzke/namespaces It’s also the first helm chart I created.\n","date":1764593206,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1764593206,"objectID":"149c6270d4a9468cd9bb1f0d35c5eb12","permalink":"https://bbrietzke.github.io/post/kube/01_local_setup/","publishdate":"2025-12-01T06:46:46-06:00","relpermalink":"/post/kube/01_local_setup/","section":"post","summary":"Installing and configuring kubectl, Helm and k9s on your workstation to manage the cluster.","tags":["kubernetes"],"title":"Kubernetes Local Setup","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"sudo apt update sudo apt install ufw sudo ufw allow OpenSSH sudo ufw enable sudo ufw allow 2379/tcp sudo ufw allow 10250/tcp # Inbound to all nodes sudo ufw allow 6443/tcp # Inbound to master node(s) sudo ufw allow 2380/tcp # Inbound to master node(s) sudo ufw allow 30000:32767/tcp # Inbound to worker node(s) ","date":1763385250,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1763385250,"objectID":"e3012e5d2d6d99cfc43f42213c545f83","permalink":"https://bbrietzke.github.io/post/kube/extras/firewall_rules/","publishdate":"2025-11-17T07:14:10-06:00","relpermalink":"/post/kube/extras/firewall_rules/","section":"post","summary":"UFW firewall rules that open the ports Kubernetes nodes need.","tags":["kubernetes"],"title":"Kubernetes Firewall Rules","type":"post"},{"authors":null,"categories":["Linux"],"content":"To grow an existing logical volume and resize its filesystem you can run:\nsudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv \u0026amp;\u0026amp; \\ sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv lvextend -l +100%FREE expands the logical volume to use all free space on the volume group. resize2fs resizes the ext4 filesystem to fill the new logical‑volume size. Tip: If your filesystem is XFS, replace resize2fs with xfs_growfs /dev/mapper/ubuntu--vg-ubuntu--lv.\nConfiguring Networking with Netplan Create the Netplan configuration file cd /etc/netplan sudo touch 99-netcfg.yaml sudo chmod 600 99-netcfg.yaml sudo vi 99-netcfg.yaml Add the following YAML content network: version: 2 renderer: networkd ethernets: ens18: dhcp4: true ens19: addresses: - 10.0.0.12/26 ens18 will obtain its IPv4 address via DHCP. ens19 receives the static address 10.0.0.12 with a /26 subnet mask. Apply the new configuration sudo netplan apply Note: After applying, verify connectivity with ip addr show or ping.\n","date":1762724339,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1762724339,"objectID":"d6e64c8d82350f1488ca0a91e8e7ce50","permalink":"https://bbrietzke.github.io/post/linux/grow_file_system/","publishdate":"2025-11-09T15:38:59-06:00","relpermalink":"/post/linux/grow_file_system/","section":"post","summary":"Extending an LVM logical volume and its filesystem, plus configuring networking with Netplan.","tags":["linux"],"title":"Extending an LVM Logical Volume","type":"post"},{"authors":null,"categories":["Linux"],"content":"You create RAID drives, so you should know how to tear them down.\nSo we built a few RAID arrays and mounted them—now let’s tear them down.\nUnmount everything Make sure you have the arrays unmounted from their normal (or abnormal) paths. If you don’t, much of this will not work as intended.\nCheck mdstat Let’s see which arrays we currently have configured.\ncat /proc/mdstat The output should list any arrays you have built and indicate their current state. In this case, we need to know the names of the arrays so that we can remove them.\nRemove Arrays Now let’s stop the arrays.\nsudo mdadm --stop /dev/md127 # or whatever was returned above Once the arrays are stopped, we can zero out the superblocks so the disks are clean.\nsudo mdadm --zero-superblock /dev/sda /dev/sdb /dev/sdc /dev/sdd Trust, but Verify Rerun cat /proc/mdstat and make sure those arrays are gone.\ncat /proc/mdstat ","date":1762392558,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1762392558,"objectID":"ceeb478f2089b6a20cf55bbdd60c23db","permalink":"https://bbrietzke.github.io/post/linux/raid_removal/","publishdate":"2025-11-05T19:29:18-06:00","relpermalink":"/post/linux/raid_removal/","section":"post","summary":"Safely stopping Linux software RAID arrays and wiping their superblocks.","tags":["linux"],"title":"Destroying RAID Arrays","type":"post"},{"authors":null,"categories":["Linux"],"content":"Must be a member of builtin\\administrators\nsudo apt -y install sssd-ad sssd-tools realmd adcli sudo realm discover faultycloud.lan sudo realm join -U Administrator -v faultycloud.lan sudo pam-auth-update --enable mkhomedir groups Administrator@faultycloud.lan Domain Admins as sudoers It is case sensitive!\n%domain\\ admins@FaultyCloud.lan ALL=(ALL) NOPASSWD: ALL or\n%domain\\ admins@FaultyCloud.lan ALL=(ALL:ALL) ALL Documentation Source\n","date":1762387420,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1762387420,"objectID":"5ddf6aa72aab049e63c1df11e745e33a","permalink":"https://bbrietzke.github.io/post/linux/ubuntu_active_directory/","publishdate":"2025-11-05T18:03:40-06:00","relpermalink":"/post/linux/ubuntu_active_directory/","section":"post","summary":"Joining an Ubuntu machine to an Active Directory domain with SSSD and realmd, and granting domain admins sudo.","tags":["linux"],"title":"Joining Ubuntu to Active Directory","type":"post"},{"authors":null,"categories":["Linux"],"content":"Trying to figure out what is going on when something is broken can be hard, so it’s nice to have tooling to help with that. Prometheus is one such tool. With proper tuning and effort, it can warn you before something goes wrong.\nAnd it makes pretty graphs. Everybody loves pretty graphs!\nPrometheus Prometheus is a free and open‑source monitoring solution for collecting metrics, events, and alerts. It records data from servers, containers, and applications. In addition to a flexible query language (PromQL) and powerful visualization tools, it also provides an alerting mechanism that sends notifications when needed.\nPrerequisites A machine running Ubuntu 24.04 or another LTS release. Basic administrative knowledge and an account with sudo access on that machine. Installation Update the system sudo apt update \u0026amp;\u0026amp; sudo apt -y upgrade Create the Node Exporter user account sudo groupadd --system nodeexporter sudo useradd -s /sbin/nologin --system -g nodeexporter nodeexporter Create directories These directories store configuration files and libraries.\nsudo mkdir /var/lib/node_exporter Install Node Exporter Now for the fun part! You can view the latest Node Exporter downloads and pick the one you need on the official page: Node Exporter download page.\nwget https://github.com/prometheus/node_exporter/releases/download/v1.9.1/node_exporter-1.9.1.linux-amd64.tar.gz tar zvxf node_exporter*.tar.gz cd node_exporter*/ sudo mv node_exporter /usr/local/bin sudo chown nodeexporter:nodeexporter /usr/local/bin/node_exporter sudo chown -R nodeexporter:nodeexporter /var/lib/node_exporter cd .. rm -rf node* Run at startup Create a systemd unit file for Node Exporter:\nsudo nano /etc/systemd/system/node_exporter.service Paste the following configuration:\n[Unit] Description=Node Exporter Wants=network-online.target After=network-online.target [Service] User=nodeexporter Group=nodeexporter Type=simple ExecStart=/usr/local/bin/node_exporter \\ --web.listen-address=0.0.0.0:9182 \\ --collector.textfile.directory=/var/lib/node_exporter [Install] WantedBy=multi-user.target Enable and start the service:\nsudo systemctl daemon-reload sudo systemctl enable node_exporter sudo systemctl start node_exporter sudo systemctl status node_exporter ","date":1762170961,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1762170961,"objectID":"13c759c17ffcfe7daff4d35221cbf41d","permalink":"https://bbrietzke.github.io/post/linux/node_exporter/","publishdate":"2025-11-03T05:56:01-06:00","relpermalink":"/post/linux/node_exporter/","section":"post","summary":"Installing Prometheus Node Exporter on Ubuntu as a systemd service to expose host metrics.","tags":["linux"],"title":"Systems Monitoring with Node Exporter","type":"post"},{"authors":null,"categories":["Linux"],"content":"create the image file\ndd if=/dev/zero of=sparse_image.img bs=1M count=0 seek=1024 conv=sparse mount the new image\nlosetup -f sparse_image.img losetup -a format the image\nsudo mkfs.ext4 /dev/loopX unmount the image file\nlosetup -d /dev/loopX ","date":1762107597,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1762107597,"objectID":"616ddf06c9b5976b2c9f25ef086429a8","permalink":"https://bbrietzke.github.io/post/linux/create_image_file/","publishdate":"2025-11-02T12:19:57-06:00","relpermalink":"/post/linux/create_image_file/","section":"post","summary":"Creating, formatting and loop-mounting a sparse disk image file.","tags":["linux"],"title":"Creating a Sparse Image File","type":"post"},{"authors":null,"categories":["Linux"],"content":"Install Apache Cassandra # Install Java (Cassandra 4.x requires Java 11) sudo apt install -y openjdk-11-jdk-headless # Add the Cassandra repository and its key echo \u0026#34;deb [signed-by=/etc/apt/keyrings/apache-cassandra.asc] https://debian.cassandra.apache.org 41x main\u0026#34; | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list sudo curl -o /etc/apt/keyrings/apache-cassandra.asc https://downloads.apache.org/cassandra/KEYS # Update package lists and install Cassandra sudo apt update \u0026amp;\u0026amp; sudo apt install -y cassandra # Reload systemd, enable, and start the Cassandra service sudo systemctl daemon-reload sudo systemctl enable cassandra sudo systemctl start cassandra # Verify the service status sudo systemctl status cassandra.service nodetool status Tip: After the first startup, Cassandra may take a minute or two to open all its ports. Use nodetool status to confirm that the node reports UN (Up/Normal).\nFirewall Setup # Port used by Cassandra for client communication (CQL) sudo ufw allow 9042/tcp # Inter‑node communication port (native transport) sudo ufw allow 7000/tcp # SSTable stream transfer port sudo ufw allow 7001/tcp # JMX port (remote management) sudo ufw allow 7199/tcp Note: If you use SSL for inter‑node communication, you’ll also need to open port 7002/tcp.\nReferences\nApache Cassandra Official Documentation Debian Package Repository for Cassandra ","date":1762101580,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1762101580,"objectID":"3d319683b1290ee1a3b2d049ec7debf6","permalink":"https://bbrietzke.github.io/post/linux/cassandra_installation/","publishdate":"2025-11-02T10:39:40-06:00","relpermalink":"/post/linux/cassandra_installation/","section":"post","summary":"Installing Apache Cassandra 4.x and Java 11 on Ubuntu from the official repository.","tags":["linux"],"title":"Installing Apache Cassandra","type":"post"},{"authors":null,"categories":["Kubernetes"],"content":"On the worker node, all you need to do is steps one through four of the installation page. After installation, execute the following on the control plane node:\nkubeadm token create --print-join-command Just copy and paste that over to the new worker node and it will do the rest.\n","date":1761556863,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1761556863,"objectID":"0befe281fc4ae3d6d954705fb8f6598d","permalink":"https://bbrietzke.github.io/post/kube/02_worker/","publishdate":"2025-10-27T04:21:03-05:00","relpermalink":"/post/kube/02_worker/","section":"post","summary":"How to join an additional worker node to an existing kubeadm cluster.","tags":["kubernetes"],"title":"Adding a Worker Node","type":"post"},{"authors":null,"categories":["Runbooks"],"content":"Overview Pre-Requistes Access to login into database server via ssh. sudo access on database server Steps Log into database server via SSH. Sudo into the postgres user and execute the psql command line tool. sudo -u postgres psql Create the user with and encrypted password: We recommend using a long and complex password since the values will only be saved here and can be input into the target system at the same time. The user name should reflect the database that they are primarily accessing. CREATE USER db01 WITH ENCRYPTED PASSWORD \u0026#39;R3@llyL0ngP@ssw0rd123456790\u0026#39;; Grant the new user dbcreate privileges: ALTER USER db01 CREATEDB; Troubleshooting If the target system can not log into the database after the database/user creation process, you can simply re-run the above steps to make sure to make sure that they are correct. If the user is present, but the password has been forgotten, you may reset the password as follows: ALTER USER db01_user WITH ENCRYPTED PASSWORD \u0026#39;3^On9D4p59^4\u0026#39;; Completion and Verification You can log into the target database from callisto.lan to verify if everything is setup correctly\npsql -h \u0026#39;callisto.lan\u0026#39; -U \u0026#39;db01\u0026#39; -d \u0026#39;db01_prod\u0026#39; It will prompt you for the password, which we have available and should provide. If the login occurs, then the database/user/permissions should be okay.\nContacts Not Applicable\nAppendix Changelog * 2023/04/06 - Created ","date":1760371976,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1760371976,"objectID":"2aea2de873924ab1a57a4a7f726818c0","permalink":"https://bbrietzke.github.io/post/runbooks/postgresql_create_database_user/","publishdate":"2025-10-13T11:12:56-05:00","relpermalink":"/post/runbooks/postgresql_create_database_user/","section":"post","summary":"Runbook for creating a PostgreSQL user and database and granting it privileges.","tags":["runbooks"],"title":"Create User for PostgreSQL","type":"post"},{"authors":null,"categories":["Linux"],"content":" sudo apt-get install -y apt-transport-https software-properties-common wget sudo mkdir -p /etc/apt/keyrings/ wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/grafana.gpg \u0026gt; /dev/null echo \u0026#34;deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main\u0026#34; | sudo tee -a /etc/apt/sources.list.d/na.list sudo apt-get update sudo apt-get install grafana-enterprise sudo /bin/systemctl daemon-reload sudo /bin/systemctl enable grafana-server sudo /bin/systemctl start grafana-server reverse proxy setup\nserver { listen 80; server_name metrics; # Replace with your domain or IP location / { proxy_pass http://localhost:3000/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } # For Grafana Live WebSocket connections location /api/live/ { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection \u0026#34;upgrade\u0026#34;; proxy_set_header Host $host; proxy_pass http://localhost:3000/api/live/; } } ","date":1760371976,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1760371976,"objectID":"42a81f8eed2f7a29e235720f958c09a1","permalink":"https://bbrietzke.github.io/post/linux/grafana_install/","publishdate":"2025-10-13T11:12:56-05:00","relpermalink":"/post/linux/grafana_install/","section":"post","summary":"Installing Grafana from the official apt repository and putting it behind an Nginx reverse proxy.","tags":["linux"],"title":"Install Grafana","type":"post"},{"authors":null,"categories":["Windows"],"content":"Enter-PSSession -ComputerName DEV001 -Credential Administrator Get-WindowsFeature -Name Web-* Install-WindowsFeature -name Web-Server, Web-ASP, Web-Websockets, Web-Asp-Net45, Web-Ftp-Service, Web-Windows-Auth, Web-Basic-Auth, Web-Digest-Auth, Web-Scripting-Tools, Web-Mgmt-Service ","date":1760371976,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1760371976,"objectID":"79f18a306c34f9246134e5d93b8e8853","permalink":"https://bbrietzke.github.io/post/windows/iis_install_from_ps/","publishdate":"2025-10-13T11:12:56-05:00","relpermalink":"/post/windows/iis_install_from_ps/","section":"post","summary":"Installing IIS and its web features remotely with PowerShell.","tags":["windows"],"title":"Installing IIS from PowerShell","type":"post"},{"authors":null,"categories":["Linux"],"content":"This guide covers how to install and configure SSL certificates on Apache2 web server.\nPrerequisites Apache2 web server installed and running Domain name pointing to your server Root or sudo access to the server Step 1: Enable SSL Module Enable the Apache2 SSL module:\nsudo a2enmod ssl sudo a2enmod rewrite sudo systemctl restart apache2 Step 2: Obtain SSL Certificate Option A: Using Let’s Encrypt (Recommended) Install Certbot:\n# Ubuntu/Debian sudo apt update sudo apt install certbot python3-certbot-apache # CentOS/RHEL sudo yum install certbot python3-certbot-apache Obtain certificate:\nsudo certbot --apache -d yourdomain.com -d www.yourdomain.com Option B: Using Self-Signed Certificate (Development Only) Create a self-signed certificate:\nsudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 \\ -keyout /etc/ssl/private/apache-selfsigned.key \\ -out /etc/ssl/certs/apache-selfsigned.crt Step 3: Configure Apache Virtual Host Create or edit the SSL virtual host configuration:\nsudo nano /etc/apache2/sites-available/yourdomain-ssl.conf Add the following configuration:\n\u0026lt;VirtualHost *:443\u0026gt; ServerName yourdomain.com ServerAlias www.yourdomain.com DocumentRoot /var/www/html SSLEngine on SSLCertificateFile /etc/letsencrypt/live/yourdomain.com/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/yourdomain.com/privkey.pem # Security headers Header always set Strict-Transport-Security \u0026#34;max-age=63072000; includeSubDomains; preload\u0026#34; Header always set X-Content-Type-Options nosniff Header always set X-Frame-Options DENY Header always set X-XSS-Protection \u0026#34;1; mode=block\u0026#34; # Modern SSL configuration SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384 SSLHonorCipherOrder off SSLSessionTickets off ErrorLog ${APACHE_LOG_DIR}/ssl_error.log CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined \u0026lt;/VirtualHost\u0026gt; For self-signed certificates, use these SSL directives instead:\nSSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key Step 4: Enable HTTP to HTTPS Redirect Edit the HTTP virtual host to redirect to HTTPS:\nsudo nano /etc/apache2/sites-available/yourdomain.conf Add redirect configuration:\n\u0026lt;VirtualHost *:80\u0026gt; ServerName yourdomain.com ServerAlias www.yourdomain.com Redirect permanent / https://yourdomain.com/ \u0026lt;/VirtualHost\u0026gt; Step 5: Enable Sites and Restart Apache Enable the SSL site and restart Apache:\nsudo a2ensite yourdomain-ssl.conf sudo a2ensite yourdomain.conf sudo systemctl restart apache2 Step 6: Test SSL Configuration Test your SSL configuration:\n# Check Apache configuration sudo apache2ctl configtest # Test SSL certificate sudo certbot certificates # Online SSL test # Visit: https://www.ssllabs.com/ssltest/ Automatic Certificate Renewal For Let’s Encrypt certificates, set up automatic renewal:\n# Test renewal sudo certbot renew --dry-run # Add cron job for automatic renewal sudo crontab -e Add this line to crontab:\n0 12 * * * /usr/bin/certbot renew --quiet Firewall Configuration Ensure HTTPS traffic is allowed:\n# UFW sudo ufw allow \u0026#39;Apache Full\u0026#39; # iptables sudo iptables -A INPUT -p tcp --dport 443 -j ACCEPT Troubleshooting Common Issues Certificate path errors: Verify certificate file paths and permissions Mixed content warnings: Ensure all resources load over HTTPS Redirect loops: Check virtual host configurations Verify SSL Installation # Check certificate details openssl x509 -in /etc/letsencrypt/live/yourdomain.com/cert.pem -text -noout # Test HTTPS connection curl -I https://yourdomain.com Security Best Practices Use strong SSL protocols (TLS 1.2+) Implement HSTS headers Regular certificate monitoring Keep Apache2 updated Use secure cipher suites Monitor SSL certificate expiration Additional Resources Apache SSL/TLS Documentation Let’s Encrypt Documentation Mozilla SSL Configuration Generator ","date":1760371976,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1760371976,"objectID":"2cde3469560cbc8a52fd24c119125dfe","permalink":"https://bbrietzke.github.io/post/linux/apache2_ssl_install/","publishdate":"2025-10-13T11:12:56-05:00","relpermalink":"/post/linux/apache2_ssl_install/","section":"post","summary":"Enabling SSL on Apache2 with Let's Encrypt or your own certificates.","tags":["linux"],"title":"Installing SSL on Apache2","type":"post"},{"authors":null,"categories":["Runbooks"],"content":"Overview Package updates are a maintance task that helps increase stability and reliability of the systems.\nThe update process will cause a restart of the updated machine, which may cause an outage.\nPre-Requistes A clone of the ansible repository git clone git@github.com:bbrietzke/ansible.git XCode Command Line Tools Git brew install git Ansible brew install ansible Steps Go to the directory where the ansible repo is cloned: git checkout master git pull Execute the update command and provide the become password: make updates Troubleshooting Machines may not come back up during the reboot and may require a physical reboot for Ansible Completion and Verification All machines must come back up and the count for the Apt Upgrades should go down to zero. Contacts Appendix Changelog * 2023/04/08 - Created ","date":1760371976,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1760371976,"objectID":"1f3a5003b0fbba2dfd24c3fa4f9cc226","permalink":"https://bbrietzke.github.io/post/runbooks/alerts/pending_apt_package_upgrades/","publishdate":"2025-10-13T11:12:56-05:00","relpermalink":"/post/runbooks/alerts/pending_apt_package_upgrades/","section":"post","summary":"Runbook for responding to pending apt upgrade alerts by patching hosts with Ansible.","tags":["runbooks","alerts"],"title":"Pending Apt Package Upgrades","type":"post"},{"authors":null,"categories":["Runbooks"],"content":"Runbooks are a way of documenting procedural Information Technology information that is repetitive in nature.\nMost of the time, you see runbooks as a way of troubleshooting a problem, diagnosising an issue or a procedure.\nThis is a collection of the runbooks that I have decided to document for my area.\nTable of Contents Create PostgreSQL Database and User Alerts Pending Apt Package Upgrades ","date":1760371976,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1760371976,"objectID":"dea937658487e410694e5aae25d633bb","permalink":"https://bbrietzke.github.io/post/runbooks/overview/","publishdate":"2025-10-13T11:12:56-05:00","relpermalink":"/post/runbooks/overview/","section":"post","summary":"What runbooks are and an index of the runbooks I keep.","tags":["runbooks"],"title":"Runbooks: Overview","type":"post"},{"authors":null,"categories":["Windows"],"content":"cpu, memory, logical_disk, physical_disk, net, service, system $server_name = \u0026#34;DEV001\u0026#34; $src = \u0026#34;https://github.com/prometheus-community/windows_exporter/releases/download/v0.31.2/windows_exporter-0.31.2-amd64.exe\u0026#34; Enter-PSSession -ComputerName $server_name -Credential Administrator New-Item -Path \u0026#34;C:\\Program Files\u0026#34; -Name \u0026#34;windows_exporter\u0026#34; -Item \u0026#34;Directory\u0026#34; New-Item -Path \u0026#34;C:\\Program Files\\windows_exporter\u0026#34; -Name \u0026#34;textfile_inputs\u0026#34; -Item \u0026#34;Directory\u0026#34; New-Item -Path \u0026#34;C:\\Program Files\\windows_exporter\u0026#34; -Name \u0026#34;config.yaml\u0026#34; -Item \u0026#34;File\u0026#34; Start-bitstransfer -source $src -destination \u0026#34;C:\\Program Files\\windows_exporter\\windows_exporter.exe\u0026#34; Set-Content -Path \u0026#34;C:\\Program Files\\windows_exporter\\textfile_inputs\\role.prom\u0026#34; -Value \u0026#34;role{role=`\u0026#34;application_server`\u0026#34;} 1\u0026#34; Set-Content -Path \u0026#34;C:\\Program Files\\windows_exporter\\config.yaml\u0026#34; -Value \u0026#34;collectors:\u0026#34; Add-Content -Path \u0026#34;C:\\Program Files\\windows_exporter\\config.yaml\u0026#34; -Value \u0026#34; enabled: cpu,memory,logical_disk,physical_disk,net,service,system,iis\u0026#34; New-Service -Name \u0026#34;windows_exporter\u0026#34; -BinaryPathName \u0026#39;\u0026#34;C:\\Program Files\\windows_exporter\\windows_exporter.exe\u0026#34; --config.file=\u0026#34;C:\\Program Files\\windows_exporter\\config.yaml\u0026#34; --web.listen-address=:9182 --collector.textfile.directories=\u0026#34;C:\\Program Files\\windows_exporter\\textfile_inputs\u0026#34;\u0026#39; Start-Service \u0026#34;windows_exporter\u0026#34; Get-Service \u0026#34;windows_exporter\u0026#34; New-NetFirewallRule -DisplayName \u0026#34;inbound windows_exporter\u0026#34; -Direction Inbound -Program \u0026#34;C:\\Program Files\\windows_exporter\\windows_exporter.exe\u0026#34; -RemoteAddress LocalSubnet -Action Allow Exit-PSSession netsh advfirewall set domainprofile state on ","date":1760371976,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1760371976,"objectID":"ab591f6299eb85ac5108e4a0cdc1254b","permalink":"https://bbrietzke.github.io/post/windows/windows_exporter_server_core/","publishdate":"2025-10-13T11:12:56-05:00","relpermalink":"/post/windows/windows_exporter_server_core/","section":"post","summary":"Installing Prometheus windows_exporter as a service on Windows Server Core with PowerShell.","tags":["windows"],"title":"Windows Exporter on Server Core","type":"post"},{"authors":null,"categories":["Windows"],"content":"Okay, so after years and years of using Linux I am finally relearning Windows, which is where I began. It has changed, but then again it hasn’t changed.\n","date":1760371976,"expirydate":-62135596800,"kind":"page","lang":"en","lastmod":1760371976,"objectID":"1778ed20bd15255973fdae35212f1941","permalink":"https://bbrietzke.github.io/post/windows/overview/","publishdate":"2025-10-13T11:12:56-05:00","relpermalink":"/post/windows/overview/","section":"post","summary":"Introduction to my notes on relearning Windows after years on Linux.","tags":["windows"],"title":"Windows: Overview","type":"post"}]