Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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"}
like image 624
Aaron Renoir Avatar asked Dec 19 '25 06:12

Aaron Renoir


1 Answers

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.

like image 68
Alex Robinson Avatar answered Dec 21 '25 14:12

Alex Robinson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!