-
Notifications
You must be signed in to change notification settings - Fork 456
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
Support "crictl pods --name filter" with Metadata name. #403
Comments
@rjaini |
@feiskyer - That's not what he is saying. {
"metadata": {
"name": "linux-sandbox",
"namespace": "default",
"attempt": 1
},
"labels": {
"sandbox-platform": "linux/amd64"
}
} crictrl pods --name linux-sandbox Returns nothing. -- {
"metadata": {
"name": "linux-sandbox",
"namespace": "default",
"attempt": 1
},
"labels": {
"sandbox-platform": "linux/amd64",
"io.kubernetes.pod.name": "test-name",
"io.kubernetes.pod.namespace": "test-namespace"
}
} crictrl pods --name test-name Returns the POD as expected. -- The ask is that |
This makes sense to me. We don't need to use labels for metadata that already exists in the pod config. |
@rjaini Oops, you are right. |
Thanks! |
Thanks. |
if I use following pod config to create pod:
{
"metadata": {
"name": "linux-sandbox",
"namespace": "default",
"attempt": 1
},
"labels": {
"sandbox-platform": "linux/amd64"
}
}
crictl pods command return following output
POD ID CREATED STATE NAME NAMESPACE ATTEMPT
3e696d25f77a7 24 hours ago Ready linux-sandbox default 1
Now when I try to search the pod with above name
crictl pods --name linux-sandbox
I see no output. Ideally I should be able to get above pod.
But If I add below two labels with same value then things works.
io.kubernetes.pod.name
io.kubernetes.pod.namespace
Ideally I should also be able to search by metadata name.
The text was updated successfully, but these errors were encountered: