Deployment in an inconsistent after kubectl delete and ctrl + C #23252
Closed
Description
Pressing Ctrl + C while doing kubectl delete deployment leaves it in an inconsistent state:
$ kubectl get deployments
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
nginx-deployment 3 3 3 3 1m
$ kubectl delete deployments nginx-deployment
^C%
$ kubectl get deployments
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
nginx-deployment 0 3 3 3 1m
Pods are still running:
$ kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
default nginx-deployment-2035384211-5p44d 1/1 Running 0 1m
default nginx-deployment-2035384211-fla1t 1/1 Running 0 1m
default nginx-deployment-2035384211-hmplt 1/1 Running 0 1m
No error event sent from deployment controller, but there's some error from controllermanager log
E0320 07:14:03.915671 5 deployment_controller.go:395] Error syncing deployment default/nginx-deployment: deployments.extensions "nginx-deployment" cannot be updated: the object has been modified; please apply your changes to the latest version and try again
E0320 07:14:04.012568 5 deployment_controller.go:395] Error syncing deployment default/nginx-deployment: deployments.extensions "nginx-deployment" cannot be updated: the object has been modified; please apply your changes to the latest version and try again
E0320 07:14:24.564117 5 deployment_controller.go:395] Error syncing deployment default/nginx-deployment: deployments.extensions "nginx-deployment" cannot be updated: the object has been modified; please apply your changes to the latest version and try again
E0320 07:14:24.800940 5 deployment_controller.go:395] Error syncing deployment default/nginx-deployment: deployments.extensions "nginx-deployment" cannot be updated: the object has been modified; please apply your changes to the latest version and try again
The closest issue I can find is #21257. But I believe I'm on a newer version.
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"3+", GitVersion:"v1.3.0-alpha.0.694+acfb1b990281b8", GitCommit:"acfb1b990281b8de44da6b79fa18da73de85be29", GitTreeState:"clean", BuildDate:"2016-03-
19T12:49:43Z", GoVersion:"go1.5.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.0", GitCommit:"5cb86ee022267586db386f62781338b0483733b3", GitTreeState:"clean", BuildDate:"", GoVersion:"", Compiler:"", Platfo
rm:""}