Kubernetes: CRD, Custom Resource Definition

Create your own CRD CRD (Custom Resource Definition) This defines how we want our custom Kubernetes objects to look and behave. The name of the CRD must follow this format: . Example: albertocrds.crds.albertogalvez.com To list existing CRDs: 1 kubectl get crds In the custom resource manifest, you must specify: 1 2 3 apiVersion: crds.albertogalvez.com/v1 kind: Albertocrds ... Controller Now we create our controller, which is simply an application running continuously in Kubernetes, listening for changes to our custom resources....

April 5, 2025 · Alberto

SQL Server GUID

GUID In SQL Server, a GUID (Globally Unique Identifier) is a 16-byte (128-bit) unique identifier commonly used as a primary key or unique identifier in a table. In SQL Server, GUIDs are handled using the uniqueidentifier data type. Characteristics of GUIDs in SQL Server: Globally Unique: Designed to be unique across different systems and servers, with virtually no chance of collision. Random: Unlike IDENTITY values, GUIDs are not sequential and do not follow a predictable pattern....

April 5, 2025 · Alberto

VIM Macros

Macros A macro in Vim is simply a sequence of recorded commands. Q – Starts recording a macro. Perform actions, then press Q again to stop recording. @a – Replays the macro recorded in register a. 🛠 Editing a Macro Create a new buffer: 1 :new Paste the contents of the macro from register a: 1 :put a Edit the macro content: A – Move to end of line in normal mode....

April 5, 2025 · Alberto

Kubectl: Kubernetes Swiss Knife

Kubectl kubectl taint Taints are used to prevent pods from being scheduled on certain nodes unless those pods have the appropriate tolerations. 1 kubectl taint nodes node1 node2 node3 node-role.kubernetes.io/control-plane:NoSchedule- node-role.kubernetes.io/control-plane:NoSchedule is a taint typically applied to control plane nodes to prevent regular pods from being scheduled on them. The - at the end removes the taint from the nodes. If you want to add the taint instead of removing it, just remove the - at the end:...

March 29, 2025 · Alberto

k9scli: Kubernetes cli to manage your clusters

K9scli Shortcuts 1 2 3 4 5 6 7 Ctrl-d: delete. Ctrl-k: kill (no confirmation). Ctrl-w: toggle wide columns. (Equivalent to kubectl … -o wide) Ctrl-z: toggle error state Ctrl-e: hide header. Ctrl-s: save output (e.g. the YAML) to disk. Ctrl-l: rollback. Sort by Column If you want to sort any view (Pod/Services) based on some exact column - you can just press Shift + Column Initial e.g. If you want to sort items by column Age - Just press Shift + A...

March 12, 2025 · Alberto

Pod disruption budget (PDB)

Pod disruption budget PDBs define the minimum number of replicas that must remain running during disruptions. This prevents critical workloads from being evicted but can hinder node scaling. A PodDisruptionBudget (PDB) is a Kubernetes object that specifies the number of pods that can be unavailable in deployment, maintenance, or at any given time. This helps to ensure that your applications remain available even if some of their pods are terminated or evicted....

February 23, 2025 · Alberto

Kustomize: Kubernetes deployment

kustomize lets you customize raw, template-free YAML files for multiple purposes, leaving the original YAML untouched and usable as is.

February 16, 2025 · Alberto

Git Fuck Up

Git terror moments

January 19, 2025 · Alberto

Installing talos on a Turing Piv2 board with cm4 modules

Installing talos on a Turing Piv2 board with cm4 modules.

January 5, 2025 · Alberto

PSQL Extensions

Overview Percona Distribution for PostgreSQL includes a set of extensions that have been tested to work together. These extensions enable you to efficiently solve essential practical tasks to operate and manage PostgreSQL. Reference The pg_stat_statements and pg_stat_monitor extensions are used to collect and monitor query statistics in PostgreSQL, but they have key differences in functionality, focus, and efficiency. pg_stat_statements: This is an official extension included with PostgreSQL. Its main purpose is to track the performance of queries executed in the database....

December 27, 2024 · Alberto