# Adding per-step custom labels to k8s jobs

**URL:** <https://forum.buildkite.community/t/adding-per-step-custom-labels-to-k8s-jobs/3716>\
**Category:** General\
**Created:** [May 30, 2024, 11:21pm UTC](https://forum.buildkite.community/t/adding-per-step-custom-labels-to-k8s-jobs/3716 "2024-05-30T23:21:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nfulwiler](https://avatars.discourse-cdn.com/v4/letter/n/bb73d2/32.png) [@nfulwiler](https://forum.buildkite.community/u/nfulwiler)\
**Post date:** [May 30, 2024, 11:21pm UTC](https://forum.buildkite.community/t/adding-per-step-custom-labels-to-k8s-jobs/3716/1 "2024-05-30T23:21:54Z")

</div>

We’re evaluating switching to using the k8s agent stack, and it would be very helpful to able to customize the labels applied to the jobs that are submitted into k8s on a per step basis. Specifically I’m hoping to leverage this along with kube-state-metrics to get job durations for specific labels and highlight these in a dashboard. (currently the job labels are just the uuids and optionally agent tags, but that’s too generic). It seems like this could be implemented in a similar way to PodSpecPatch [agent-stack-k8s/internal/controller/config/config.go at 8eb53d61131a90232641b38e958bb3836faab615 · buildkite/agent-stack-k8s · GitHub](https://github.com/buildkite/agent-stack-k8s/blob/8eb53d61131a90232641b38e958bb3836faab615/internal/controller/config/config.go#L38) but maybe there’s some other way that I’m not seeing. Thanks!

---

<div class="post-metadata">

**Author:** ![lizette](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/lizette/32/1161_2.png) [@lizette](https://forum.buildkite.community/u/lizette)\
**Post date:** [May 31, 2024, 5:43am UTC](https://forum.buildkite.community/t/adding-per-step-custom-labels-to-k8s-jobs/3716/2 "2024-05-31T05:43:03Z")

</div>

Hi @nfulwiler ,

Welcome to the Buildkite Support Community! 👋

Thanks for the feedback. Yes you are right, the current job labels currently cannot be customised. I think our agent stack maintainers would appreciate to hear about this feedback and learn more about your use case. I suggest to raise this feedback here [Issues · buildkite/agent-stack-k8s · GitHub](https://github.com/buildkite/agent-stack-k8s/issues).

Cheers!
