Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k8s node not support field selector well #80010

Open
kitianFresh opened this issue Jul 11, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@kitianFresh
Copy link

commented Jul 11, 2019

following is version of kubernetes client and server version

Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.11", GitCommit:"637c7e288581ee40ab4ca210618a89a555b6e7e9", GitTreeState:"clean", BuildDate:"2018-11-26T14:38:32Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.3-mt20190128.5+47e1f54c020515", GitCommit:"47e1f54c020515363ccecf297239de41560831a5", GitTreeState:"clean", BuildDate:"2019-02-19T11:09:04Z", GoVersion:"go1.10.1", Compiler:"gc", Platform:"linux/amd64"}

when i use kubectl get nodes --field-selector spec.Unscheduable=true or kubectl get nodes --field-selector status.Phase=running , all will report
Error from server (BadRequest): Unable to find "nodes" that match label selector "", field selector "spec.Unschedulable=true": field label not supported: spec.Unschedulable

but for pod, it's fine.
kubectl get pods --field-selector status.phase=Running

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Jul 11, 2019

@kitianFresh: There are no sig labels on this issue. Please add a sig label by either:

  1. mentioning a sig: @kubernetes/sig-<group-name>-<group-suffix>
    e.g., @kubernetes/sig-contributor-experience-<group-suffix> to notify the contributor experience sig, OR

  2. specifying the label manually: /sig <group-name>
    e.g., /sig scalability to apply the sig/scalability label

Note: Method 1 will trigger an email to the group. See the group list.
The <group-suffix> in method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ricky1993

This comment has been minimized.

Copy link
Contributor

commented Jul 11, 2019

kubectl get nodes --field-selector spec.unschedulable=true
Have a try this command, it works for me

@ricky1993

This comment has been minimized.

Copy link
Contributor

commented Jul 11, 2019

BTW, node field-selector only support metadata.name and spec.unschedulable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.