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

[BUG] Failed to replace pod to a specified node #3852

Open
woodliu opened this issue Aug 15, 2023 · 1 comment
Open

[BUG] Failed to replace pod to a specified node #3852

woodliu opened this issue Aug 15, 2023 · 1 comment

Comments

@woodliu
Copy link

woodliu commented Aug 15, 2023

Describe the bug
I follow this article to test the schedule pod manually, just changed a nodeName filed of a pod, and run command like kubectl replace --force -f /var/folders/tr/wfqwmskd567gst7bjl_x0q5h0000gq/T/kubectl-edit-4090127510.yaml, it is expected to be scheduled to another node, but it delete the pod after schedule to that node immediately, and start another pod on another node.
I test this case with Kind and it works.

To Reproduce
Steps to reproduce the behavior:

  1. Start a pod
  2. Edit the nodeName of the pod ,and it will forbidden to change and generated a pod manifest
  3. Run kubectl replace --force -f <generated-pod-manifest>

Expected behavior
As description

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • CLI Version [v1.25.2]
  • Kubernetes version [v1.25.6]

Additional context
I checked the kubelet log where it delete the expected pod, there is a log as:
"MESSAGE" : "I0815 05:59:19.652182 2787 util.go:30] \"No sandbox for pod can be found. Need to start a new one\" pod=\"default/nginx-76d6c9b8c-6g7bz\

It seems a issue here, and been fixed

@kaarthis
Copy link
Contributor

kaarthis commented Sep 1, 2023

Please take a look @robbiezhang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants