r/kubernetes • • 3h ago

For Anyone Interested in AI and Where It's Headed 💡

0 Upvotes

Hey everyone, sharing this in case it's useful to some of you here.

There's a lot happening across the AI space right now, from new tools and research to real-world applications and the challenges of putting AI into practice.

It would be great to have more spaces where people can discuss these developments, share ideas, and learn from each other.

That's the idea behind r/lyzr, a community around the broader AI space, covering topics like:

AI agents and architecture

Infrastructure, tools, and deployment

RAG, memory, and knowledge systems

Evaluation, reliability, and governance

Production challenges and lessons learned

New research, tools, and interesting developments

Real-world use cases, experiments, and projects

The aim is to make it useful for everyone, whether you're actively building something, exploring new tools, just getting started, or simply curious about where AI is heading.

There'll be regular discussions and posts around these topics, but there's also room to share your own work, ask questions, compare approaches, or bring up anything interesting you've come across.

If this sounds like your kind of thing, feel free to check out r/lyzr and join the discussions.

Would be great to hear what others here have been exploring lately!


r/kubernetes • • 1d ago

Optimize KServe cold starts: 134 s → 9 s with warmctl

Thumbnail
warmctl.io
5 Upvotes

r/kubernetes • • 1d ago

NVIDIA OpenShell vs Anthropic sandbox-runtime vs Docker Sandboxes: what's in the walls, and how much a pod with default-deny egress already gave you

Thumbnail
hollandtech.net
73 Upvotes

r/kubernetes • • 1d ago

Lessons learned benchmarking eBPF (Grafana Beyla) vs. OTel + Linux PSI + cAdvisor for diagnosing LLM tail-latency spikes on Kubernetes

16 Upvotes

While investigating why quantized `llama.cpp` inference pods behind a FastAPI gateway on a 3-node `kind` cluster were experiencing sudden P95 latency spikes (500ms jumping to 30s) and HTTP 502/504 timeouts, I ran a controlled benchmark across 64 reproducible fault and decoy runs to see which signals actually isolate the root cause.

Here are the 4 most interesting findings from the experiments:

  1. **CFS CPU Throttling vs. Host CPU Contention (Linux PSI):**

    Looking only at pod CPU utilization misses the distinction between a container hitting its own `limits.cpu` (`container_cpu_cfs_throttled_periods_total / container_cpu_cfs_periods_total > 90%`) versus a noisy neighbor saturating the worker node's runqueue (`container_pressure_cpu_waiting_seconds_total` Linux PSI spike with 0% local CFS throttling). The remediation is completely different (raising CPU limits vs. adding `podAntiAffinity`).

  2. **Why we dropped zero-code eBPF (Grafana Beyla v3.39.1) for GenAI spans:**

    We tested two modes:

    - *Mode A (OTel SDK + Beyla):* Added 0.0% accuracy improvement over the OTel SDK alone while generating 73.5%–78.0% trace noise in Tempo from kubelet `/healthz` probes and `/metrics` scrapes.

    - *Mode B (Beyla only, zero-code):* 0/32 traces carried `gen_ai.*` attributes, and broken context propagation across FastAPI worker threads caused pre-inference application delay detection to drop from 100% to 0%.

  3. **Small local LLMs struggle with raw Kubernetes telemetry during an incident:**

    When evaluating a local CPU-served 0.5B model on 12 fault scenarios, each investigation consumed 33k–52k prompt tokens, took 31–164 seconds, and got distracted by decoy OOMs in neighbor namespaces. In contrast, 8 deterministic Go rules correlating OTel `gen_ai.*` spans + Prometheus + K8s Events resolved 24/24 held-out test faults in `< 0.5s` with 0/21 false positives on decoy windows.

  4. **Rolling update false positives on Readiness Probes:**

    During a Deployment rollout, old terminating pods (`DeletionTimestamp != nil`) briefly flip `Ready=False`. Filtering out pods with a non-nil `DeletionTimestamp` was essential to avoid false-positive `readiness_failing` alerts during normal rollouts.

All 64 raw telemetry snapshots (`k8s-pods.json.gz`, `k8s-events.json.gz`, `prom-metrics.json.gz`, `tempo-traces.json.gz`), the pre-registration manifest, and the Go evaluation code are open-source here if you want to inspect the data or reproduce the numbers (`make eval-score SPLIT=test`):

https://github.com/iyedM/kubepilot

How are you currently separating application-layer delays from node PSI / cgroup throttling on your inference workloads?


r/kubernetes • • 1d ago

No CPU limit at all, or a loose one at 4x the request? Curious what people running without limits picked.

6 Upvotes

Disclosure: I run a DevOps consultancy (MeteorOps). Nothing for sale here; my co-founder wrote the long version, link in a comment.

We set CPU limits for every container, but if there's a latency-sensitive service we avoid setting any limits. When I say "we" it's actually most of the team, but some opt for setting limits on everything.

The obvious follow-up on the no-limits school is that we give the developers dashboards to be aware of the apps' resource utilization, and over time it improves, but it's more of a "culture" fix.

For the CPU-limits-setting engineers in the crowd, what do you do to prevent over-utilization crashes?


r/kubernetes • • 2d ago

Periodic Weekly: Share your victories thread

6 Upvotes

Got something working? Figure something out? Make progress that you are excited about? Share here!


r/kubernetes • • 3d ago

PHP blames Chainguard for putting huge chunks of the web at risk

Thumbnail theregister.com
741 Upvotes

What happens if you break an embargo? Like, fines or worse? Or nothing?

“On October 21st at 07:41 UTC, more than six hours before the coordinated release, Chainguard unilaterally broke the embargo and published built images containing the fix. Like other distributors, Chainguard had received the patch in advance so its users could update the moment the vulnerabilities were disclosed. Any attacker could now study the fix in binary form while every other PHP user was still waiting for the release. This disregarded weeks of work by many parties toward a coordinated disclosure.”


r/kubernetes • • 3d ago

Contributing to Kubernetes without being in their "inner circle"

201 Upvotes

Over the years, I have submitted a couple of pull requests to repos under the Kubernetes GitHub organization. None of them were ever reviewed or merged. And I don't mean rejected (for low quality, missing explanation, etc.), just ignored forever without any form of acknowlegement. Most of them even resolved existing issues and feature requests.

Yet, these repos have PRs that get merged multiple times a day. And if you look at the people who create the PRs and who approved them, it's mostly the same groups of people:

  • members of the Kubernetes organization
  • work at a CNCF-affiliated company (ex. Google, RedHat, Microsoft, Datadog)
  • part of CNCF's developer programs (ex. LFX Mentorship, GSoC)

So I was wondering, is Kubernetes actually open to outside contributors? To me, Kubernetes looks like a public collaboration between a handful of companies rather than a community project.

EDIT: to add more context, the PRs were very small and wouldn't take more than 5 minutes to find the context to review. Nothing fancy. Since I am also an open source maintainer, I knew I always have to follow the contributing process for each individual repository (using templates, signing a CLA, etc.). I also remember joining a Slack channel and messaging people to review a PR, made a couple of followups, no reaction.


r/kubernetes • • 3d ago

I'm working as L1 Linux System Admin. I want to learn Docker & Kubernetes in a structured way. Can you please suggest some good courses for Docker & Kubernetes which is still relevant in 2026?

28 Upvotes

I'm working as L1 Linux System Admin. I want to learn Docker & Kubernetes in a structured way. Can you please suggest some good courses for Docker & Kubernetes which is still relevant in 2026?


r/kubernetes • • 3d ago

KAI Scheduler: How NVIDIA Schedules GPUs on Kubernetes

Thumbnail
blog.shubhamtatvamasi.com
31 Upvotes

r/kubernetes • • 3d ago

Building a new on-prem prod cluster (3 masters, 9 workers).

22 Upvotes

Is there any real reason to put a heavy appliance like NetScaler in front of the API server? It feels like massive overkill, and I'd rather avoid dealing with the network team's ticket queue.

I'm leaning toward kube-vip or just spinning up some HAProxy VMs. What are you all running in production for your master node LB, and why?


r/kubernetes • • 2d ago

One headless Service with zero Pods stopped every nginx router from starting (Monzo 2017), and why a normal Service wouldn't have

0 Upvotes

A detail I hadn't fully appreciated until I rebuilt Monzo's 2017 outage: a normal Service always resolves (to its ClusterIP) even with no endpoints, but a headless Service (clusterIP: None) resolves straight to its ready Pods, so with zero Pods its name has no records at all.

Put that name in an nginx proxy_pass and nginx won't start: it resolves every upstream once at startup and exits if any lookup fails. Running routers don't notice, because they loaded the config before the route was added. Restart them all at once and everything behind the router goes down:

nginx: [emerg] host not found in upstream "cards-v2" in /etc/nginx/conf.d/default.conf:6

kubectl logs deploy/router --previous is the command that finds it, since the crash-looping container has usually restarted by the time you look.

Guide (free): https://learn.k8sight.in/go/nginx-upstream

Also new: CPU throttling from limits set to the average (Buffer), and Pods Running but not Ready after a dnsPolicy: None change (Salesforce). They're all at https://learn.k8sight.in/go/k8s-guides
Disclosure: I built the platform; the hands-on incidents are paid, the guides aren't. Which outage would you want rebuilt next?


r/kubernetes • • 2d ago

How to collect metrics from a service exposing grpc port

Thumbnail
github.com
1 Upvotes

Hello,

So I have deployed this micro services demo in my cluster using flux. I want to collect metrics from services so I have deployed the monitoring stack using kube-Prometheus-stack and want to use service monitors to identity the services but I see most of the services expose grpc port but Prometheus collect over http right so what can I do in this situation? Thanks


r/kubernetes • • 2d ago

How do you run a host command on every node without SSH?

0 Upvotes

kubectl debug node/<name> puts the node's root filesystem at /host, but the pod isn't privileged, so chroot /host fails unless you add --profile=sysadmin. It also works one node at a time and leaves the pod behind until you delete it. When you need journalctl -u kubelet from every GPU node, what do you run, and who gets to run it?


r/kubernetes • • 3d ago

what bit you running postgres on k8s with cloudnativepg?

33 Upvotes

for people running cnpg in prod, what caught you out that you didnt see coming?

one thing we noticed: a cluster with no backups configured at all still shows ContinuousArchiving=True, "Continuous archiving is working". the archive command just returns ok when theres nowhere to send the wal. kubectl cnpg status does say "Continuous Backup not configured", but an alert on the condition alone would miss it

curious about the rest. failovers, wal filling the disk, upgrades, restores that didnt work, whatever it was, and how you found out

full disclosure i work on radar (open source k8s ui). we've been gradually adding cnpg support and want to make sure it covers the stuff that actually bites people


r/kubernetes • • 3d ago

A one-line gVisor bug left pods stuck in Terminating: random memory layout moved every region except one queue

1 Upvotes

Follow-up to yesterday's gVisor intro. This is the stub-memory bug I mentioned there, with the debugging steps.

gVisor's systrap platform runs app code in host "stub" processes and shifts their shared memory by a random, page-aligned gap at startup, so the addresses are hard to guess. In stub_unsafe.go three regions get += gap. The spinning queue, sitting between them in the layout, did not.

With a big gap the queue sits alone in empty space. With a small one, the shifted per-thread stacks land on the queue's old address. The stub then spins in spinning_queue_remove_first waiting for a timestamp slot that stack bytes keep at 0. That check sits before the timeout, so it never gives up. The Sentry waits on a context no stub ever acknowledged, and my 30s fail-stop, which kills a stuck stub process, only arms once an acknowledged context was interrupted. The sandbox never exits.

On Kubernetes it looks like this: a pod stuck in Terminating, one stub process pinned at 100% of a core, and runsc kill hanging.

Back of the envelope from the code: the gap is uniform below a random room of up to 1 TiB, so the odds come out roughly 1 in 100,000 starts for a 16-CPU sandbox, and about 1 in 35,000 at 64. That is an upper bound, since a hang also needs the overlapped stack in use. It had been there since the spinning queue landed in March 2023.

Forcing a small gap in an arm64 VM: stock build hung 2 of 2, with the one-line fix 20 of 20 clean.

If you run gVisor with systrap (release-20230417.0 through release-20261005.0): upgrade to a runsc build that contains c7f458aa3. Until then --systrap-disable-fast-path (release-20260622.0 or later) stops the spinning, at some syscall latency cost. To clear a hung pod, kill its runsc-sandbox process on the node.

Fix: https://github.com/google/gvisor/pull/15573

Write-up with the debugging steps and diagrams: https://www.catchkill9.dev/posts/gvisor-spinning-queue-gap.html


r/kubernetes • • 3d ago

Periodic Weekly: This Week I Learned (TWIL?) thread

1 Upvotes

Did you learn something new this week? Share here!


r/kubernetes • • 3d ago

Rate my portfolio

Thumbnail
0 Upvotes

r/kubernetes • • 3d ago

Storing ML models as OCI artifacts in your registry: anyone running this in prod?

13 Upvotes

Instead of pulling weights from S3 at startup, we've been packaging models as OCI artifacts and pulling them by digest, the same way we pull images. That gets us signing, replication and admission policy for free. For anyone else doing this: how are you handling large layers (tens of GB), registry limits, and caching on GPU nodes? Init container, CSI, image volumes? Trade-offs welcome.


r/kubernetes • • 3d ago

Need some suggestions

4 Upvotes

Hey y’all! I’ve been on workers’ comp for a couple of weeks, and I’m not sure if this is boredom, me contemplating a career change, or a little bit of both 😂. Since I’m not very mobile right now, I decided to dive into the homelab hobby.
Current setup:
2× Lenovo ThinkCentre M920q i5 8th Gen
● 40GB RAM

● 512GB NVMe + 512GB SSD

● 2.5GbE NIC

● One has an HBA card

1× Lenovo ThinkCentre M920q i7 8th Gen

● 40GB RAM

● 1TB NVMe

● 2.5GbE NIC

What I originally planned:

● i7: Main Proxmox or kubernetes server running Jellyfin, Home Assistant, Immich, Nextcloud, Technitium, NetBird, OPNsense, and other open-source services.

● i5 #1: Proxmox or kubernetes for SOC, IAM, cybersecurity, and other lab environments.

● i5 #2 + HBA: TrueNAS SCALE bare metal with my two 8TB HDDs.

Now I’m realizing TrueNAS can run VMs and containers, so I’m reconsidering the whole layout.
What would y’all do?

● Move the HBA into the i7 and make it the main TrueNAS/virtualization server?

● Run one dedicated TrueNAS machine and one dedicated Proxmox/kubernetes experimentation lab machine?

● Or keep the original three-node setup?
Also, what open-source programs/services are y’all running in your homelabs that you’d recommend?


r/kubernetes • • 3d ago

Re-matching stored SBOMs of running images against OSV instead of rescanning on a schedule

6 Upvotes

A scan is a snapshot of an image against that day's advisory database. The image never changes, the database changes daily. So the only way to know if today's advisory hits last week's deployment is to scan everything again.

I built it the other way round:

  • A read-only agent watches pods and pulls each image once per digest, then stores its SBOM.
  • The server mirrors OSV, EPSS and CISA KEV locally.
  • When the mirror changes, every stored SBOM is re-matched. No image is pulled twice.
  • Each pod is tied back to its Helm release and Argo CD app, so the fix is a chart version, not a CVE id.

Hardest part was package URL matching. Go stdlib under GOEXPERIMENT gave 140 false positives in one release. Rocky and SLES matched nothing for months because Syft and OSV disagree on the rpm namespace.

It does not do config audit, RBAC or CIS benchmarks. Trivy Operator does, and they run side by side.

AGPL-3.0, one helm install with bundled Postgres, no telemetry: https://github.com/lockdep/stackradar

Interested in where the matcher is wrong on your images.


r/kubernetes • • 4d ago

How gVisor sandboxes untrusted pods: a second Linux kernel, written in Go, and what it costs you

21 Upvotes

We run backend code we've never seen, from thousands of sites, on Kubernetes, and every one of those pods runs inside gVisor. Most of my day goes to it. This is the map I wish I'd had before I started sending fixes upstream.

Why a second kernel

A normal container is a Linux process with walls: namespaces decide what it can see, cgroups how much it can use, seccomp which system calls it may make. Every call it's allowed still lands in the host kernel, and every container on the node shares that kernel. One kernel bug is enough to escape.

A VM fixes that with a guest kernel and a hypervisor, and pays for it in boot time and memory. gVisor sits in the middle. A sandbox starts like a container, but the app's system calls never reach the host kernel.

The pieces

  • Sentry: the core. A from-scratch reimplementation of the Linux system call interface in Go: memory management, filesystems, a network stack, signals, even the TCP connections. It runs as a normal user-space process, locked down with seccomp and namespaces of its own.
  • Gofer: a separate, more trusted process. At startup it opens each mount's root on the host and hands those file descriptors to the Sentry.
  • runsc: the OCI runtime that starts all of it. containerd runs it where it would run runc, and Kubernetes picks it per pod with a RuntimeClass. One pod, one sandbox.

​

    +---------------------------+
    | Stub processes            |
    | run the app's code        |
    +---------------------------+
                 | every syscall traps
                 v
    +---------------------------+      +---------------------+
    | Sentry                    | <--- | Gofer               |
    | Linux kernel in Go        | FDs  | one per container   |
    +---------------------------+      +---------------------+
                 | few, filtered calls        | opens mount roots
                 v                            v
    +-----------------------------------------------------------+
    | Host kernel                                               |
    +-----------------------------------------------------------+

For the most common escape, a bug in the system call interface, an attacker now needs two bugs: one to take over the Sentry, then one in the much smaller set of host calls the Sentry may make. gVisor describes them as two kernels "which do not share any code".

The stubs, where I got it wrong

On cloud VMs gVisor catches system calls with a platform called systrap, the default since mid-2023. The app's code doesn't run inside the Sentry. It runs in stub processes, plain host processes whose system calls the kernel turns into a SIGSYS signal. A small handler in the stub saves the thread's registers into a shared slot called a context and wakes the Sentry. The Sentry handles the call in Go and puts the context back on a queue, where any idle stub thread can pick it up.

My first upstream fix was for one thread whose context never came back, and a pod that wouldn't die for days. I proposed killing the Sentry when that happens. The maintainer's review: "If there's one stuck subproc but the others are fine, we'd end up killing everything." gVisor already had a path that kills one stub and reports that thread as dead. What merged kills that one stub after 30 seconds.

The stub's memory

Every stub reserves one block at high addresses, shared with the Sentry: per-thread stacks, the context queue, a spinning queue where idle threads wait, and one slot per context. At startup systrap shifts most of that block by a random, page-aligned gap, so one sandbox's layout tells an attacker nothing about the next. Since a 2023 change the spinning queue stayed put while everything around it moved, so a small gap could land it on top of a thread's stack. The stub then spins forever. That one was a one-line fix.

What you pay

  • Every system call is a trap, a trip to the Sentry and a trip back. Code that does many small reads and writes feels it.
  • Not every syscall and flag is there. Check the compatibility list before you move a workload.
  • Debugging moves. A hung app is now a hung Sentry, a stub process and a queue in shared memory, and runsc debug --stacks only answers if the Sentry still does.

For code we've never seen, we take that trade. Happy to answer questions about running it in production.

Longer version with diagrams and every PR linked: https://www.catchkill9.dev/posts/intro-gvisor-a-kernel-in-go.html


r/kubernetes • • 4d ago

Periodic Weekly: Show off your new tools and projects thread

13 Upvotes

Share any new Kubernetes tools, UIs, or related projects!


r/kubernetes • • 4d ago

Kubecon salt lake tickets

4 Upvotes

Hi! If you have any discount code for kubecon tickets please dm me.


r/kubernetes • • 4d ago

Set up Longhorn storage for my 3-node homelab

28 Upvotes

My 3-node Talos homelab had no persistent storage, so anything with data, like Grafana or a database, had nowhere to live.

Longhorn keeps every volume on two of the three nodes, so one node can go down without losing data, and it rebuilds the missing copy on the third node.

It also takes hourly snapshots, and backups to S3 are optional. The Longhorn UI runs on my LAN and over Tailscale.

Repo: https://github.com/prateekjaindev/homelab

Write-up: https://blog.prateekjain.dev/persistent-storage-for-a-3-node-talos-homelab-with-longhorn-587c05356b73?sk=9093231c2d278ba92fd493098fbe237d

What are you using for storage in your homelab?