Kubernetes keeps spawning Pods after deletion

898 views
Skip to first unread message

tor...@gmail.com

unread,
Apr 17, 2017, 4:07:52 AM4/17/17
to Kubernetes user discussion and Q&A
The following is the file used to create the Deployment:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: kloud-php7
namespace: kloud-hosting
spec:
replicas: 1
template:
metadata:
labels:
app: kloud-php7
spec:
containers:
- name: kloud-php7
image: 192.168.1.1:5000/kloud-php7
- name: kloud-nginx
image: 192.168.1.1:5000/kloud-nginx
ports:
- containerPort: 80

The Deployment and the Pod worked fine, but after deleting the Deployment and a generated ReplicaSet, the I cannot delete the spawn Pods permanently. New Pods will be created if old ones are deleted.

The kubernetes cluster is created with kargo, containing 4 nodes running CentOS 7.3, kubernetes version 1.5.6

Any idea how to solve this problem ?

Thanks.

Rodrigo Campos

unread,
Apr 17, 2017, 9:40:39 AM4/17/17
to kubernet...@googlegroups.com
How do you delete the deployment, exactly?
--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-use...@googlegroups.com.
To post to this group, send email to kubernet...@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

tor...@gmail.com

unread,
Apr 17, 2017, 8:22:45 PM4/17/17
to Kubernetes user discussion and Q&A
I deleted it with command line: kubectl delete deployment -n kloud-hosting kloud-phph7 or the dashboard, don't remember which one.

BTW, the dashboard has different version from kubernetes, it's from kubernetes 1.6.0, could this be the root cause ?

Rodrigo Campos

unread,
Apr 19, 2017, 2:30:57 PM4/19/17
to kubernet...@googlegroups.com
On Mon, Apr 17, 2017 at 05:22:45PM -0700, tor...@gmail.com wrote:
> I deleted it with command line: kubectl delete deployment -n kloud-hosting kloud-phph7 or the dashboard, don't remember which one.
>
> BTW, the dashboard has different version from kubernetes, it's from kubernetes 1.6.0, could this be the root cause ?

For sure the dashboard it is not if you deleted using kubectl 1.5.x :)

I don't remember if in kubernetes 1.6 the garbage collection is done, so if that
is the case and you did it from the dashboard, that might be it. As kubectl
tries to delete the deployment and the rs, but I think that was about to change
in newer version of kubernetes (and not sure it made it into 1.6, nor if its by
default).

So, please try to reproduce and confirm :)
Reply all
Reply to author
Forward
0 new messages