-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Deployment: label already present as selector on RC results in max number of 'Terminating' pods. #24039
Comments
Are you referring to Replication Controllers or Replica Sets? |
@jpprins1 What release of K8s? What cloudprovider? What os distro? |
I can reproduce it on HEAD. $ kubectl run nginx --image=nginx --generator="run/v1"
replicationcontroller "nginx" created
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx-g9f7n 1/1 Running 0 6s
$ kubectl run nginx --image=nginx
deployment "nginx" created
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx-2040093540-0v8ez 0/1 Terminating 0 2s
nginx-2040093540-1j5r2 0/1 Terminating 0 2s
nginx-2040093540-1yn41 0/1 Terminating 0 1s
nginx-2040093540-6ens4 0/1 Terminating 0 1s
nginx-2040093540-aqh5o 0/1 Terminating 0 2s
nginx-2040093540-dhfcn 0/1 Terminating 0 2s
nginx-2040093540-e8mxp 0/1 Pending 0 0s
nginx-2040093540-k1yap 0/1 Terminating 0 2s
nginx-2040093540-lzjt6 0/1 Terminating 0 1s
nginx-2040093540-npzqs 0/1 Terminating 0 2s
nginx-2040093540-pcprw 0/1 Terminating 0 1s
nginx-2040093540-qs07o 0/1 Terminating 0 2s
nginx-2040093540-uemc8 0/1 Terminating 0 1s
nginx-2040093540-vcio0 0/1 Terminating 0 2s
nginx-2040093540-w0bpq 0/1 Terminating 0 2s
nginx-g9f7n 1/1 Running 0 19s
... This will happen when the deployment and replication controller (but not replica set) have the same label selectors. |
Client Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.1",
Master: CoreOS beta (991.1.0) Got similar output as Janet. 2016-04-09 0:11 GMT+02:00 Janet Kuo notifications@github.com:
|
It's because the RC controls a set of "nginx" pods (label: {run=nginx}), and then the deployment generates an RS that controls another set of "nginx" pods (label: {run=nginx, pod-template-hash=xxx}). The RC can see and control the RS's pods but the RS can't control (and doesn't see) the RC's pods. The RC is fighting with the RS -- whenever RS scales up its own pod, the RC sees it and scales it down, and then the RS will find it doesn't have enough replicas and then create more, and so on. |
The pods are not hanging. They're actually |
This will be mitigated by #24946. We also plan to eventually autogenerate unique labels/selectors, as we do for Job. |
Note: The easy solution of course is to not use the same label, however after removing the deployment the 'Terminating' pods still are present and in my case manually removing them did not help to get 'pending' pods to get 'Running'. (In the end I needed to reboot the cluster)
The text was updated successfully, but these errors were encountered: