kubernetesgoogle-kubernetes-engine

Can't delete strangely numbered pod or mysteriously created ReplicaSet


I am having this issue except I have not created a ReplicaSet as suggested by Tim Hockin.

Somehow a ReplicaSet was created with the same properties as my ReplicationController. The only difference is the name. The Controller is named 'fp-frontend' and the Set is named 'fp-frontend-389969098'. The appended number suggests that it was automatically created.

Perhaps a race condition or something, who knows.... I would however like to delete it and the pods it spawns.

So I try to delete it:

$kubectl delete rs fp-frontend-389969098
replicaset "fp-frontend-389969098" deleted

Command says it was deleted. But...

$kubectl get rs
NAME                    DESIRED   CURRENT   AGE
fp-frontend-389969098   1         1         4s

Any suggestions? I think I am going to delete and recreate the cluster?

I am using google container engine and kubernetes is up to date.

Client Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.0", GitCommit:"5cb86ee022267586db386f62781338b0483733b3", GitTreeState:"clean"}
Server Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.0", GitCommit:"5cb86ee022267586db386f62781338b0483733b3", GitTreeState:"clean"}

Solution

  • You've probably created a deployment that's recreating the replica set for you. Try running kubectl get deployments and deleting the deployment from the output of that command.