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

kubectl wait outputs NotFound error when condition is delete #73832

Open
amente opened this Issue Feb 7, 2019 · 4 comments

Comments

Projects
None yet
3 participants
@amente
Copy link

amente commented Feb 7, 2019

What happened:
When running the command:

kubectl wait deployment/tiller-deploy --for=delete

It waits until the condition is met, and then outputs:

Error from server (NotFound): deployments.extensions "tiller-deploy" not found

What you expected to happen:

Since this is a successful case for 'delete' condition. It should output something like:

deployment.extensions/tiller-deploy delete condition met

How to reproduce it (as minimally and precisely as possible):
Run the wait command with --for=delete after a resource has been deleted

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version):

Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.3", GitCommit:"a4529464e4629c21224b3d52edfe0ea91b072862", GitTreeState:"clean", BuildDate:"2018-09-09T18:02:47Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.11", GitCommit:"637c7e288581ee40ab4ca210618a89a555b6e7e9", GitTreeState:"clean", BuildDate:"2018-11-26T14:25:46Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

@amente amente added the kind/bug label Feb 7, 2019

@amente

This comment has been minimized.

Copy link
Author

amente commented Feb 7, 2019

/sig cli

@k8s-ci-robot k8s-ci-robot added sig/cli and removed needs-sig labels Feb 7, 2019

@Zyqsempai

This comment has been minimized.

Copy link
Contributor

Zyqsempai commented Feb 8, 2019

So let me get it right, you are trying to put wait condition on already deleted resource?

@amente

This comment has been minimized.

Copy link
Author

amente commented Feb 8, 2019

@Zyqsempai yes. I run the command

kubectl delete deployment tiller-deploy

Then, I want to wait until the deployment is deleted, using

kubectl wait deployment/tiller-deploy --for=delete

I assume waiting on a deleted resource is a condition that kubectl wait <resource> --for=delete supports. But the issue here, the error output when the condition is met wasn't something I was expecting. This seems to me a special case that should be handled in the fix for: #66456

@Zyqsempai

This comment has been minimized.

Copy link
Contributor

Zyqsempai commented Feb 8, 2019

Got it, i will take a look.

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