Skip to content

Invalid fields selector "metadata.uid" and "spec.nodeName" used in pod detail view (E0807 detail.go:412) #10284

@cdelaitre

Description

@cdelaitre

What happened?

When accessing the Pod detail view in Kubernetes Dashboard, the backend api logs show an error related to an invalid field selector:

2025-08-07T12:24:00.492Z | E0807 12:24:00.492848 1 detail.go:412] "metadata.uid" is not a known field selector: only "metadata.name", "metadata.namespace"
2025-08-07T12:24:00.493Z | E0807 12:24:00.492880 1 detail.go:412] "spec.nodeName" is not a known field selector: only "metadata.name", "metadata.namespace"
2025-08-07T13:05:12.988Z | E0807 13:05:12.988640 1 detail.go:412] "metadata.uid" is not a known field selector: only "metadata.name", "metadata.namespace"
2025-08-07T13:05:12.988Z | E0807 13:05:12.988668 1 detail.go:412] "spec.nodeName" is not a known field selector: only "metadata.name", "metadata.namespace"

What did you expect to happen?

I expected the Dashboard to use only valid field selectors when querying Kubernetes resources. Specifically, I expected it to use metadata.name or metadata.namespace instead of metadata.uid, which is not supported by the Kubernetes API.

As a result, the Pod detail view should load without triggering any field selector errors in the logs.

How can we reproduce it (as minimally and precisely as possible)?

  1. Deploy the Kubernetes Dashboard in a cluster with the helm chart kubernetes-dashboard-7.13.0.tgz.
  2. Access the Pod detail view from the UI.
  3. Check the logs of the kubernetes-dashboard-api-xxx container.
  4. You will see an error similar to:

E0807 14:53:21.165593 1 detail.go:412] "metadata.uid" is not a known field selector: only "metadata.name", "metadata.namespace"
E0807 14:53:21.165618 1 detail.go:412] "spec.nodeName" is not a known field selector: only "metadata.name", "metadata.namespace"

Anything else we need to know?

The error originates from the following line in the backend code:

  • File: src/app/backend/resource/pod/detail.go
  • Line: 412

It attempts to use "metadata.uid" as a field selector, which is not supported by the Kubernetes API. This should be replaced or handled differently to avoid runtime errors.

What browsers are you seeing the problem on?

Chrome

Kubernetes Dashboard version

Kubernetes Dashboard vdashboard-web:1.7.0

Kubernetes version

kubectl version Client Version: v1.33.3 Kustomize Version: v5.6.0 Server Version: v1.32.6

Dev environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions