Cheatsheet
TrueNAS
Rename volume
Resize VM disk
Repair iSCSI share
Script
- Run the following script to start a interactive script that repair the iSCSI share
curl -sSL https://raw.githubusercontent.com/x-real-ip/infrastructure/refs/heads/main/scripts/repair_iscsi_volume.sh | bash
Manually
- Make sure that the container that uses the volume has stopped.
-
SSH into one of the nodes in the cluster and start discovery
-
Login to target
-
Create a local mount point & mount to replay logfile
-
Unmount the device
-
Run check / ncheck
-
If needed run xfs repair
-
Logout from target
Rsync
Run a Rsync exact copy
Bitnami Sealed Secret
Raw mode
Create TLS (unencrypted) secret
kubectl create secret tls cloudflare-tls --key origin-ca.pk --cert origin-ca.crt --dry-run=client -o yaml > cloudflare-tls.yaml
Encrypt secret with custom public certificate.
Add sealed secret to configfile secret
echo -n <mypassword_value> | kubectl create secret generic <secretname> --dry-run=client --from-file=<password_key>=/dev/stdin -o json | kubeseal --cert ./sealed-secret-tls-2.crt -o yaml \
-n democratic-csi --merge-into <secret>.yaml
Raw sealed secret
strict
scope (default):
namespace-wide
scope:
echo -n foo | kubeseal --cert ./sealed-secret-tls-2.crt --raw --from-file=/dev/stdin --namespace bar --scope namespace-wide
AgAbbFNkM54...
cluster-wide
scope:
echo -n foo | kubeseal --cert ./sealed-secret-tls-2.crt --raw --from-file=/dev/stdin --scope cluster-wide
AgAjLKpIYV+...
Include the sealedsecrets.bitnami.com/namespace-wide
annotation in the SealedSecret
Include the sealedsecrets.bitnami.com/cluster-wide
annotation in the SealedSecret
Kubernetes
Drain and terminate all pods gracefully on the node while marking the node as unschedulable
Make the node unschedulable
Make the node schedulable
Convert to BASE64
Decode a secret with config file data
Create secret from file
kubectl create secret generic <secret name> --from-file=<secret filelocation> --dry-run=client --output=yaml > secrets.yaml
Restart Pod
Change PV reclaim policy
Shell into pod
Copy to or from pod
ArgoCD WebUI
Uptime Kuma
A sqlite query to find and replace a part in the monitor url.