Kubernetes Snippets

Rerun existing completed Job kubectl replace deletes the old job, if there is any error, your job definition is lost, don’t forget to save it first! Replace an existing Job with itself kubectl get job JOBNAME -o yaml | kubectl replace --force -f - Sometimes there are errors importing the job template due to auto-generated labels or selectors .. a quick and dirty hack is to filter them out using jq ...

March 1, 2010 · 10 min · 2036 words · Micha Kops

Observability Snippets

The USE Methodology USE stands for Utilization, Saturation, and Errors. Developed by Brendan Gregg, it’s a low-level diagnostic tool for infrastructure and system resources. Utilization – How much of a resource is used? (e.g., 70% CPU) Saturation – Is the system over capacity? (e.g., CPU run queue) Errors – Are there hardware or system faults? (e.g., disk errors) Best for: Bottleneck analysis on servers, network, disk, memory Source: https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/best-practices/ The RED Methodology RED focuses on service-level performance and is tailored for microservices and HTTP-based systems. ...

March 1, 2010 · 2 min · 295 words · Micha Kops