r/kubernetes • • 11h ago

leetcode but for kubernetes

27 Upvotes

hey, sharing this in case it helps someone here

I made leetops.dev, it's like leetcode but for kubernetes. you get a real cluster with something broken in it and you have to find the problem and fix it, from your browser

it's free btw. no cluster needed, no strong pc needed


r/kubernetes • • 21h ago

Does automated k8s remediation actually work in prod or does gitops make it pointless?

13 Upvotes

was debating this in a discord yesterday and someone made a solid point that automating fixes in prod is a trap cuz it hides bad arch u actually need to fix

been messing around with a Go side project in this space and honestly trying to figure out if theres a sane way to do it without just being a fancy band-aid. not talking about an LLM running kubectl on prod lmao, more like an in-cluster Go engine locked in read-only shadow mode by default that needs human sign off before touching anything live. aimed at ugly cascades like hidden cgroup cpu throttling, tracing 504 storms back to db lock contention or blocking an HPA scale-out before it kills postgres, with AI strictly read-only for weird unknown stuff

for ppl running real prod clusters, would ur team ever trust live human-approved containment or does argo/flux basically mean anything beyond read-only RCA + opening a PR is a non-starter? also curious what kinda nasty prod cascades have actually burned u guys


r/kubernetes • • 19h ago

Open-sourced 9 TLA+ rollout & edge-trust models (78 TLC mutants) plus a client-side Trivy backport checker

4 Upvotes

If you run automated dependency or base-image updates against Kubernetes clusters, we just open-sourced 9 TLA+ specifications (CampaignWaveAndCanary, EdgeZeroTrustAndKillSwitch, EdgeSyncStreams, EdgeMergeLineageAndWorkloadBinding, plus 5 more) with 78 intentional TLC mutants under Apache 2.0:

https://github.com/osty-dev/supply-chain-benchmark

You can run the full model-check and mutant-kill suite locally with Java and tla2tools.jar:

TLA_TOOLS_JAR=/path/to/tla2tools.jar formal/tla/verify.sh

verify.sh fails if any checked property lacks a mutant, then applies each of the 78 patches and fails unless TLC catches the violation.

Alongside the TLA+ specs, we published our 15-scenario benchmark dataset (dataset.json, CC-BY-4.0; full writeup at https://osty.dev/benchmarks; the Go integration tests themselves run inside our source tree against Docker Compose Postgres/MinIO/Temporal). Three scenarios map directly to Kubernetes fleet operations:

  • a02 (multi-stage build separation & runtime mutation drift): a Debian 12 image built from a gcc-12 toolchain stage deployed to Kubernetes and mutated in place while running - builder-only gcc never leaks into RUNTIME_IMAGE, while in-place container mutation raises runtime_mutation_drift.
  • a11 (zero-trust edge vs compromised control plane): rejects rogue MergePR commands, redeploys without observability, and wrong policy digests locally against the Git-pinned .osty/policy.yaml.
  • a12 (stateful-safe kill switch): freezes a compromised package within 1 second, contains a service that ran migrations/0042_add_ledger.sql for a forward rebuild instead of a blind rollback, and requires two distinct signed operators before rolling back stateless services.

If Trivy is flagging Debian, Ubuntu, Alpine, or RHEL base images with backport false positives, we also put a free browser-only Trivy JSON checker at https://osty.dev/tools/backport-check (runs locally in your browser; fixtures/trivy-debian-backport.json in the repo has a sample CVE-2024-5535 scan).

Disclosure: I'm the founder of Osty - happy to answer questions on the TLA+ invariants or why we mutation-test specs in CI.


r/kubernetes • • 13h ago

Help needed; apps dont follow primary postgres replica

1 Upvotes

Hello! So, pretty much the title. When automatic failover happens, and the primary postgres replica changes, all of my apps start failing because their connection became readonly. Plain restart helps, of course. What can i do? Im searching for quite a while, and still cant find a solution. I use spilo / patroni for replicated postgres

Answer: use pgBouncer or CloudNativePG. I chose the latter.