Skip to content

Creating job fails if PVC name is too long #42

@foophoof

Description

@foophoof

I have a PVC created by kube-prometheus-stack that has the name prometheus-kube-prometheus-stack-db-prometheus-kube-prometheus-stack-0. Perhaps a bit excessive, but it is valid. When I try to browse this with browse-pvc, I get this error:

$ kubectl browse-pvc -n observability -i mirror.gcr.io/alpine:latest prometheus-kube-prometheus-stack-db-prometheus-kube-prometheus-stack-0
Browsing PVC prometheus-kube-prometheus-stack-db-prometheus-kube-prometheus-stack-0 in namespace observability
2026/03/18 13:04:45 Failed to create job: Job.batch "browse-prometheus-kube-prometheus-stack-db-prometheus-kube-prometheus-stack-0" is invalid: [metadata.labels: Invalid value: "browse-prometheus-kube-prometheus-stack-db-prometheus-kube-prometheus-stack-0": must be no more than 63 bytes, spec.template.labels: Invalid value: "browse-prometheus-kube-prometheus-stack-db-prometheus-kube-prometheus-stack-0": must be no more than 63 bytes]

The default name of the job works well for most things, but it would be nice if it was possible to override it for situations like this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions