-
Notifications
You must be signed in to change notification settings - Fork 454
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
cannot remove pod created without a UID in YAML metadata #1273
Comments
Probably should be an error, if the UID is missing? |
Yes Though it would be nice to have the possibility not to provide a UID and that one gets automatically generated for you since it can be easily retrieved later if necessary. For example via
---
metadata:
name: test-pod
namespace: test
uid: 8c71c384-ecfa-4e1d-b4c5-c91fc491e902
linux:
security_context:
namespace_options:
network: 2 root@vps:~/k8s# POD_ID=$(crictl runp test-pod.yaml)
root@vps:~/k8s# crictl pods
POD ID CREATED STATE NAME NAMESPACE ATTEMPT RUNTIME
b5e1912f6b8f1 15 seconds ago Ready test-pod test 0 (default)
root@vps:~/k8s# crictl inspectp $POD_ID | jq '.[] | .labels | ."io.kubernetes.pod.uid"'
"8c71c384-ecfa-4e1d-b4c5-c91fc491e902" |
Related to kubernetes/kubernetes#119692 |
We pre-validate the container metadata before creation the sandbox/container. Fixes kubernetes-sigs#1273 Signed-off-by: Sascha Grunert <[email protected]>
We pre-validate the container metadata before creation the sandbox/container. Fixes kubernetes-sigs#1273 Signed-off-by: Sascha Grunert <[email protected]>
Hi,
I am using
crictl
to create a pod with the following yaml file:bug.yaml
and get the following error when trying to remove the pod:
I am using crictl version v1.28.0
root@vps:~/k8s# crictl --version crictl version v1.28.0
What you expected to happen:
I expect the pod to be removed even if I don't specify a UID in the metadata section of the yaml file.
Environment:
Don't hesitate to ask if you need more info.
edit 1
I am not sure if it is an issue with crictl or cri-o so I have also reported the issue at cri-o: cri-o/cri-o#7351
The text was updated successfully, but these errors were encountered: