Set number of ReplicaSets to keep for k8s Deployment
By default, the Deployment in Kubernetes retains 10 ReplicaSets [1]. This number can be configured by setting the .spec.revisionHistoryLimit to a desired number. The following is an example on how to retain just 3 old ReplicaSets in my ‘’n8n’’ Deployment. ➜ k get replicasets -n n8n NAME DESIRED CURRENT READY AGE n8n-57c89d6b7d 0 0 0 91d n8n-5f9fb9c459 0 0 0 80d n8n-666b9476f 0 0 0 80d n8n-66cd6bd8c6 1 1 1 74d n8n-6888cc89bd 0 0 0 91d n8n-7466c456f8 0 0 0 91d n8n-74dfd6cb8c 0 0 0 80d n8n-f8f8f6d7b 0 0 0 237d Let set ....
Communicate from a rootless container to the host
Occasionally, I need to communicate from a podman container to its host, and I keep forgetting how to that. I know I can always google it, but from what had happened earlier today, having a short note to remind myself how this can be easily done is much preferable in my opinion. To communicate between the container and its host, we can just simply use host.containers.internal or host.docker.internal to refer to the host....
How to Rename a ZFS Pool
I’ve been a happy ZFS user for years, appreciating its robustness and features. Yet, in all that time, I’d never had to rename a pool. That changed today. Whether it’s for better organization, a server migration, or just because you’ve had a change of heart about a name, renaming a ZFS pool is a task that might pop up when you least expect it. I needed to rename my pool from anime35 to anime36....
Removing a broken RPM package on Fedora
While I was performing an upgrade of Fedora 41 to 42 on my laptop, I noticed there was package installed since Fedora 38. This package, zfs-dkms-2.2.0-1.fc38.noarch, needed to be removed as it blocked this Fedora 42 upgrade. TL;DR - The solution is to use --noscripts option with rpm command. If you want to see how the zfs-dkms package removed, follow along. Here’s the info about the package: root@benjo:/etc/yum.repos.d# dnf info zfs-dkms Updating and loading repositories: Repositories loaded....
ArgoCD CLI failed to invoke grpc call
When running argocd CLI, the following warning message shown: ➜ argocd app list WARN[0000] Failed to invoke grpc call. Use flag --grpc-web in grpc calls. To avoid this warning message, use flag --grpc-web. NAME CLUSTER NAMESPACE PROJECT STATUS HEALTH SYNCPOLICY CONDITIONS REPO PATH TARGET To suppress this warning message, re-run the login with --grpc-web option. For example: ➜ argocd login argocd.apps.tuaf.local.cluster --grpc-web Username: admin Password: 'admin:login' logged in successfully Context 'argocd....
How to revert a single file to its state in main in branch
I want to reset a file stored in a git repo to its state as the main branch, and I kept forgetting how to do this. So here is how, just to remind my future self. ➜ git status On branch main Your branch is up to date with 'origin/main'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: kube-prometheus-stack-values....
Setting Retention for Kube Prometheus Stack
When deploying the prometheus-community/kube-prometheus-stack in a k8s cluster, the default retention for Prometheus scrapped data is 10d at the time of this writing or Helm chart kube-prometheus-stack-69.4.1. As a result, the longhorn storage is filled up fast, and caused the Prometheus to crash. So I’d decided to change the retention period to 3 days, and also set retention size to 4GB. To do this, update the values file for the Helm chart with the following values:...
How to reset account password for Xen Orchestra
This is a quick note on how to reset the password of user account on the open sourced Xen Orchestra. To reset the password of a user, of course, you’d need to know the user account, e.g. admin@admin.net. [root@xoa1 xo-server]# cd /opt/xo/xo-server [root@xoa1 xo-server]# ./dist/recover-account-cli.mjs --help xo-server-recover-account <user name or email> If the user does not exist, it is created, if it exists, updates its password, remove any configured OTP and resets its permission to Admin....
Running container with Podman Quadlet
Up until recently, my preferred method of creating Podman containers is to use Ansible, and that has been working fine for me. However, I just stumble the new-to-me method called “quadlet”. So far, I really like it, and already started moving some containers to quadlet. To learn more about Quadlet, check out [1]. But, today I’m going to share an example of creating a simple container with Quadlet. In this example, the container whoami is run in rootless mode, under a non-privileged user....
How to import ZFS pool with duplicated pool names
If you use ZFS as the file system, you probably already know that tank is the most common name for ZFS pools. That also applies to me, I do name most of my ZFS pools as tank as the default. There is no issue with that name, however, since ZFS’s pool name must be unique, this means I couldn’t import or have multiple ZFS pools with the name tank on a system....