Skip to content

Instantly share code, notes, and snippets.

View samueljon's full-sized avatar

Samúel Jón Gunnarsson samueljon

View GitHub Profile
@f41gh7
f41gh7 / api-server.yaml
Last active August 21, 2023 10:31
vm operator configuration examples
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMServiceScrape
metadata:
name: apiserver
namespace: monitoring-system
spec:
endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
bearerTokenSecret:
key: ""
@admun
admun / setup_democratic_csi_rke_1_20_4.md
Last active April 1, 2025 11:24
My journey migrating off nfs-client-provisioner, since it's deprecated and broken in k8s 1.20.4...

I recently upgraded my rancher RKE cluster to 1.20.4, and found that nfs-client-proisioner is broken. It failed to create new PVC with an "unexpected error getting claim reference: selfLink was empty, can't make reference" error.

After some google search I found this. However, there is no documentation on how to migrate from nfs-client-provisioner, even it seems to fixed the issue.

When asking around in #sig-storage, @thansen suggested to give democratic-csi a try, which has a crude yet simple implementation of nfs-client as a CSI driver.

Here's capture how I get it to work, after helps from @thansen

My setup: RKE cluster on k8s v1.20.4, 3x Fedora 33 node, managed by Rancher 2.5.6, NFS server on a Thecus N5550, nfs-client-provisioner used for dynamic PVC provisioning.

@Dazage
Dazage / fussh.sh
Last active February 26, 2025 11:27
fuzzy find ssh host
#!/usr/bin/env bash
# Generate list from ~/.ssh/config
list=$(grep -i "^Host " ~/.ssh/config | awk '{print $2}' | sort -u)
target=$(echo "$list" | fzf --prompt="Select a host: ")
if [[ -n $target ]]; then
echo "Connecting to $target..."
ssh "$target"