r/kubernetes 9h ago

Solving the Multi-Contributor Challenge with Kubernetes and Ephemeral Environments

Thumbnail
shiftmag.dev
9 Upvotes

Disclaimer: I am not part of devops, I am just a simple developer at a company that already has kubernetes setup.

For the last couple of months I've been trying to learn kubernetes. Not because I really needed to, but because I wanted to try something different.

At first I was quite confused. I couldn't really find good documentation that explained the basics without going down a huge rabbit hole of information. I really only wanted to deploy my app to an existing cluster.

I also didn't really understand why you would ever use kubernetes over the old school vm setup I've been accustomed to. Recently however, I've finally found a good practical use case for it which I am quite proud of.

It is about leveraging the nature of kubernetes and being able to easily create/delete containers. This flexibility is what allowed me to setup automatic deployment of changes made to our code repository.

Each time someone opens a pr they will recieve a link with their changes deployed to a production-like environment.

I've linked the blog post where I try to explain everything in detail.

I am interested to hear if any of you guys had any similar stories with kubernetes. Something that really isn't possible to do with a basic VM.

P.S. yes the thumbnail is AI generated. I didnt get much choice on the matter...


r/kubernetes 5h ago

Kubernetes CPU throttling: why a pod at 40% CPU can still get throttled (CFS)

3 Upvotes

Disclosure: I'm affiliated with RoszigIT, where this article is published. Sharing because the mechanics are worth discussing, not to pitch anything. I tried to make it technical as always.

  • Pod can have 40% cpu usage in metrics and still have performance issues
  • How a burst that uses all 4 cores can exhaust a whole period's quota in 50ms real-time, freezing the container for the remaining 50ms — invisible on an averaged CPU graph
  • Where to actually look: nr_throttled / throttled_usec in cpu.stat, plus why PSI (cpu.pressure) and hypervisor steal time (%st) catch different failure modes that cpu.stat misses entirely

https://roszigit.com/en/blog/kubernetes-cpu-throttling/


r/kubernetes 4m ago

How are you inventorying cryptography across Kubernetes/OpenShift clusters?

Upvotes

I'm doing some market research before spending more time building something and wanted to sanity check how people actually handle this today.

If your organization needed to answer questions like:

  • Which workloads are using RSA vs ECDSA certificates?
  • Which images contain OpenSSL 1.x, BouncyCastle, or other crypto libraries?
  • Which applications terminate TLS themselves versus behind an ingress or load balancer?
  • Which workloads would eventually need attention for post-quantum cryptography (PQC) migration?

How are you getting that information today?

Are you using existing security tooling (CrowdStrike, Aqua, Qualys, etc.), custom scripts, SBOMs, or is this just not something anyone is really tracking?

I'm not trying to pitch a product—I actually had someone in container security tell me this probably isn't worth building, so I'm trying to understand whether that's the general consensus or if there are environments where this is still a real operational problem.

I'd really appreciate hearing how your team handles it today.


r/kubernetes 12h ago

How should I handle database migrations in a Kubernetes cluster? ( using kind for local dev)

5 Upvotes

Hey everyone! I'm pretty new to Kubernetes and currently using kind to learn locally through a microservices project. I'm trying to figure out the standard / best-practice way to handle database migrations for my application inside the cluster.

So here is my setup:
- 5 Node + express microservices
- All 5 services with their own Postgres DB, with Drizzle ORM running, using StatefulSet
- Wrote the manifest, config maps and secrets for all the services and their dbs

Now, I'm confused as to how to apply the migration script present in the services i built
From what i found looking around its either using initContainer or using a standalone k8s Job.

I don't know what's best to use for my situation or what changes if it was a production environment.
I am using this project to learn DevOps concepts and the microservices architecture following best practices, so I would really appreciate the help of the senior engineers here on clearing my doubt about the migrations / finding issues with my project.

Here are all the manifests i wrote so far:
https://github.com/Shinjon101/ticketing-system/tree/main/k8s


r/kubernetes 10h ago

kubernetes the second time around

5 Upvotes

I started a new role where my team will be re-platforming our cloud infra as the person who did it before made some strange decisions (every resource type in it's own VPC so they need to go via transit gw to talk to each other ).

so effectively greenfielding everything including a K8S cluster that runs a few thousand containers.

Curious of what best practices or things people have done that they would improve on the second time around.

For example we have already started using more namespaces and putting fewer pods - so previously we have platforms-observability now there are separate ns for victoria logs, metrics and traces. We are also moving towards cilium CNI using AWS IP allocations etc. I don't have a huge amount of K8s experience - worked with it for a year or so in a previous role.


r/kubernetes 4h ago

Scroll in K9s is not working

1 Upvotes

Has anyone faced this issue: https://github.com/derailed/k9s/issues/3913, and knows the solution

I am not able to scroll through pod and deployment list as described in issue, however with same version and same config file of k9s in other laptop I am able to, so I am not sure whats missing in my laptop in which it is not working.

happy to provide more details
macOs: 26.5.2
k9s version: 0.51.0


r/kubernetes 7h ago

Kubernetes Certified

Thumbnail
0 Upvotes

r/kubernetes 8h ago

EKS Kong API Gateway improve

0 Upvotes

Hey everyone, I'm using Kong API Gateway on EKS for the first time, and I'd love some ideas on what best practices I can implement to make the application more secure by default...

I've already added rate limiting, but I want to know what else I could do to improve performance, security, etc.


r/kubernetes 15h ago

How should Kubernetes platforms manage AI agents as platform users?

5 Upvotes

Disclosure: I’m an OpenChoreo contributor, and the project is referenced in this CNCF article.

The broader topic discussed in the article is interesting beyond any specific project. As AI agents begin deploying applications, provisioning resources, investigating incidents, and triggering operational workflows, platform teams may need to treat them as another type of platform user.

This raises a few questions:

Should AI agents use the same platform APIs and workflows as developers?

How should identity, RBAC, policy enforcement, audit trails, and approval flows work for agents?

Are the current Kubernetes and GitOps tools enough, or will platforms need additional abstractions for managing agent actions safely?

The article suggests managing applications, infrastructure resources, and AI agents through a consistent platform model instead of creating a completely separate control layer for agents.

I’m curious how other Kubernetes and platform teams are approaching this. Are AI agents already interacting with your clusters or deployment workflows?

Article: https://www.cncf.io/blog/2026/07/21/platform-engineering-for-the-agentic-enterprise-managing-applications-resources-and-ai-agents/


r/kubernetes 9h ago

Making stronger Kubernetes workload confinement opt-in and verifiable

0 Upvotes

Affiliation: I work for Red Hat and authored the linked Red Hat article. The implementation uses Red Hat OpenShift, Red Hat's hardened enterprise distribution of Kubernetes. Blastwall is the name of the proof-of-concept reference pattern, not a Red Hat product.

I've been looking at a platform design problem: how do we let selected application workloads run inside a narrower kernel and runtime surface without requiring a cluster-wide policy change?

Kubernetes already gives us most of the building blocks. The harder part is turning them into an operating model.

I want the platform to assign a workload to a named confinement class through an approved workload identity. I also want operators to be able to verify that the expected boundary was active after admission, rather than simply assuming that the requested policy took effect.

In the OpenShift proof, that means separate service accounts and Security Context Constraints, Security Profiles Operator-managed seccomp profiles, and SELinux workload types.

On another Kubernetes distribution, the admission controls and Linux security module integration would be different. The design pattern does not depend on those exact components: selected workloads opt into a narrower boundary, the selection is governed through workload identity, and the active boundary can be verified.

CI/build is one use case that tests the model. Some rootless or nested-container build workflows legitimately need a broader kernel surface. That should be represented as a separate, narrowly scoped workload class—not used as a reason to weaken the confinement available to ordinary application workloads.

The difficult part is operational rather than conceptual:

  • keeping profiles compatible with the applications assigned to them
  • managing policy lifecycle and rollout
  • preventing narrow exceptions from becoming general-purpose escape hatches
  • producing evidence that the selected boundary is actually active

An opt-in model also means that workloads which are never classified remain on the platform baseline. Adoption and governance therefore matter just as much as the confinement policy itself.

The implementation and the broader architecture are described here:

https://www.redhat.com/en/blog/govern-privileged-workload-boundaries-red-hat-openshift-ansible-automation-platform-and-identity-management

For teams already using seccomp, AppArmor, SELinux, or admission policy to apply stronger workload boundaries: do you manage them as named workload classes, or have they accumulated as per-namespace and per-service-account exceptions?

What evidence do you use to confirm that the intended runtime profile is active?


r/kubernetes 22h ago

Learning about K8 security

6 Upvotes

I am a pentester, mostly web apps and internal networks. I'm currently learning Kubernetes, and one thing keeps bothering me. In K8s, I see scanning everywhere through kube-bench, Trivy, Falco, and admission policies; however, nothing about actually testing these guardrails.

How are people validating that these actually fire? Is it through manual attempts, or is there tooling I've missed?


r/kubernetes 14h ago

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

1 Upvotes

Did you learn something new this week? Share here!


r/kubernetes 10h ago

Hiring Senior Azure AKS Platform Engineer | Banking Domain | Hybrid (Bengaluru)

Thumbnail
0 Upvotes

r/kubernetes 1d ago

Kubernetes Podcast episode 269: AI Policy, with Kat Cosgrove and Natali Vlatko

4 Upvotes

https://kubernetespodcast.com/episode/269-ai-usage/

Check out our latest episode: Navigating AI Policies in Kubernetes, with Kat Cosgrove and Natali Vlatko!

When people talk about AI in Kubernetes, the conversation is often focused on the user side, but for open source maintainers, there's of course a lot to unpack on how AI is changing oss contribution! How does AI impact the community, and what are the new rules of engagement?

We sat down with Kat Cosgrove (SIG Docs Technical Lead, SIG Release Subproject Lead, and Kubernetes Steering Committee member) and Natali Vlatko (SIG Docs Co-Chair, TODO Group Steering Committee member, and OSPO at Cisco) to unpack the recently published Kubernetes AI usage policy for contributors.

Topics covered include:
- Why you can't call an AI tool your "co-author" for legal reasons (because the AI tool can't sign the CLA)
- The rise of "AI slop" PRs and why AI-generated comments are causing trouble for OSS maintainers & reviewers.
- And of course, paths for new contributors to get involved sustainably!

Tune in for an insider's perspective into how AI is impacting contribution to one of the world's largest OSS projects!


r/kubernetes 1d ago

Periodic Weekly: Show off your new tools and projects thread

7 Upvotes

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


r/kubernetes 1d ago

GPU memory pressure, node loss, and scheduling stalls: what benchmarks don't show you about serving LLMs

Thumbnail
leaddev.com
2 Upvotes

We ran into this evaluating inference frameworks for a production LLM workload: clean benchmarks hid exactly the failure modes that matter at the infra layer.

Bursty concurrency and mixed prompt lengths exposed GPU memory pressure and latency spikes that never showed up under steady synthetic load.

We ended up building a testing process around soak tests and simulated failure scenarios (node loss, sudden load spikes) instead of trusting a single throughput number. Wrote up what we found and the process we now use before committing to a framework.


r/kubernetes 1d ago

Intermittent network output rate drops in pod

10 Upvotes

Let me set some context. I am running an application on AKS cluster where I have a file in memory that i need to upload to Azure Blob Storage on two different paths.

So I am doing those uploads concurrently.

I am using go, and there are two ABS client created and the upload is done in 2 diff goroutines.

Now what we are seeing is that one upload happens in 1-2 minute, and the other one takes 20mins to finish.

This has occurred enough times that we cant call it intermittent, but still it doesn't happen always.

Upon getting the Blob storage logs, we found that the individual API requests are taking about a minute for the slow upload, while it is taking abt e seconds for the fast one. They confirmed it is a network throughput issue rather than a disk write issue.

We looked at the pod network io metrics ob grafana and saw a drop in output rate during the upload window of the 2nd file.

The drop was from 300KB/s to 30KB/s.

Can someone help me figure out what might cause this to happen?

NOTE: What is consistent in all the instances of this issue is that everytime, there is one file upload that is faster and one is slower.

The same code is doing the upload sith same configurations. The file is same. What is different is the dst file path and the network port.


r/kubernetes 1d ago

How a Kubernetes StatefulSet Keeps Its Storage — manic

Enable HLS to view with audio, or disable this notification

0 Upvotes

r/kubernetes 2d ago

Experience w/ k8s-based ML orchestration frameworks

Thumbnail
5 Upvotes

r/kubernetes 2d ago

Operationalizing Validating Admission Policy

12 Upvotes

When VAP came out I was really excited about it, however operationalizing it on existing clusters looks to be non-trivial and I'm curious how people are managing it.

Specifically, on existing clusters I'm thinking of how to determine the impact of new VAP policies on existing workloads before you roll them out. You could roll them out in Warn mode but users only see the issue on admission so running workloads remain blissfully unaffected by a newly introduced policy.

You could use something like Kyverno to manage them in Warn/Inform and run them as background processes so you get all the info of which workloads would violate the new VAP policies. This is a really nice feature in Kyverno but if you are not using Kyverno already it's another on-cluster tool to deal with.

Are there any existing tools out there that will pre-validate VAP before it gets deployed, ideally off-cluster, or has a way of tracking VAP results that doesn't involve trolling through the audit logs?


r/kubernetes 2d ago

Still on bitnamilegacy for Postgres and Redis almost a year later, need to just get off it

20 Upvotes

Same boat as half of this sub I think. When the cutover hit last August we repointed Postgres, Redis, Mongo and Rabbit at bitnamilegacy as a stopgap and told ourselves we'd sort it properly later. It's July and later never came.

The legacy images don't get patched though and Bitnami's own line is that repo isn't meant to stick around, meaning we're sitting on unpatched infra that could also just vanish on us. Redis is a whole separate headache now with Valkey being the fork.

Small team, I really don't want to end up owning ten hand-rolled operator setups by myself. is it just service by service or how did y'all get all the way through this and land somewhere decent.


r/kubernetes 3d ago

KubeSchool

293 Upvotes

One of my engineers (im the CEO of Portainer) asked if I had the time to help him better understand Kubernetes architecure and components… and so rather than just explain it once, I figured why not share it wider.

So, https://kubeschool.portainer.io was born :-)


r/kubernetes 2d ago

How I scope an AI operator to test-restore my backups without giving it standing access

0 Upvotes

I run a k3s cluster at home and treat it like production. Everything gets backed up. Almost none of it had ever been restored, which is the normal state of affairs everywhere I've ever worked. So I automated restore testing (not restores... testing) and gave the job to an AI operator. This is how it's scoped, because that's the part that made it a sane decision instead of a scary one.

What it does

The operator takes a backup, brings it back in an isolated throwaway namespace, confirms the data is real and consistent, writes a dated pass or fail, then deletes everything it created. Production is never touched. Real recovery stays a human call... I'm not automating disaster recovery, I'm automating the proof.

One caveat I'd rather volunteer than have someone catch: the scratch namespace lives inside the production cluster. The isolation is policy and permission, not hardware... a fence, not a moat. Fine for a test-restore that evaporates in minutes; not for anything heavier. More on where that's going below.

The permission model

Read-only by default. The operator can't restore anything until a small, scoped permission is granted, and that grant is mine to make and revoke. No standing credential either... short-lived tokens minted per job and expired minutes later.

The piece I'd point at for anyone doing this: I split the capability from the binding.

  • The capability (the Role and its permissions) lives in version control. Declared, reviewable, dormant, with nothing bound to it. A Role with no binding grants nothing.
  • The binding (the thing that switches the power on) is applied out-of-band, deliberately kept out of GitOps, so the reconciler can't reinstate a permission I revoked.
  • Teardown verifies rather than assumes: it re-checks that the privilege is actually gone and fails loudly if it isn't.

A teardown that fires a delete and trusts it is how you end up with standing access you think you revoked.

What's working

The lanes that only ever read run unattended, start to finish. The etcd drill is the clean example: it pulls a snapshot from object storage with a key scoped read-only to exactly one bucket, restores it to scratch, verifies, tears down, weekly, with an alarm if it goes quiet. Nothing to gate, because there's almost nothing that key could do. More than thirty restores now, zero failures, most of the register covered. The rule that fell out of it: an agent gets a key only when the key is narrow enough that handing it over doesn't matter.

Where I'm stuck, and want you to poke holes

For the drills that have to build things (restore a Longhorn volume, stand up a scratch DB), the operator needs a real write grant, and today I apply that grant by hand before the run. That's the one manual step left, which means a "fully automated" weekly drill is really a weekly appointment. I don't want to hand-approve it forever, and I don't want to leave a standing grant sitting there either.

The design I'm circling: a separate, deterministic policy broker (not another AI making judgment calls) that approves a narrow, time-windowed elevation for a specific request and forces de-escalation inside a few minutes. What I've got so far:

  • The request is structured, not prose: {which identity, which role, what window, which drill}. No model output touches the decision. The agent requests; it never authorizes itself.
  • Deny-wins and fail-closed. Broker down or request malformed means the drill fails and alerts, never fails open.
  • Two independent expiries: a TTL on the binding and a short-lived token, so either one failing alone still kills access.
  • De-escalation is confirmed by checking whether the binding still exists, not by trusting the remover's exit code.
  • The grant path itself is guarded by an admission policy, so an out-of-shape or never-expiring grant is inadmissible, not just logged after the fact.
  • The broker's rules live in git behind my merge, so the agent lane can't edit its own approval rules.
  • Break-glass and anything high-blast-radius stay human.

As far as I can tell this is just the NIST PDP/PEP model pointed at an agent, and the human-facing JIT-access tools already do exactly this. But I can't find anything that ships it agent-native for Kubernetes, which makes me wonder what I'm missing. The failure mode I already see: inside a legitimate window, a prompt-injected operator holds a legitimate grant and spends it with someone else's intent. Shape-constraining the grant shrinks that to "can only touch drill-labeled scratch objects," but that's a reduction, not a cure.

So: where does this bite me?

(Separate track, less interesting to this sub: the fence-not-a-moat problem gets solved by moving the build-type drills onto a genuinely separate cluster on an isolated network, so prod is actually absent rather than fenced off. That same rig is where I'll finally rehearse a full-cluster rebuild from nothing, which I can't yet prove.)


r/kubernetes 2d ago

Periodic Weekly: Questions and advice

1 Upvotes

Have any questions about Kubernetes, related tooling, or how to adopt or use Kubernetes? Ask away!


r/kubernetes 2d ago

Newbie question: If AI is writing a bunch of code, does it make sense to learn k8s now ?

0 Upvotes

Im new to tech and recently started learning operators and controllers. With AI writing every code, which is faster than human, is it rational for me to learn about the kubernetes now ?