[Solved] RKE update kubernetes fail: Failed to bring up Control Plane: Failed to create [kube-controller-manager]

Hi everyone,

I’m try to update my kubernetes cluster through RKE tools. So during the update process, the rke show me this error message:

FATA[0095] [controlPlane] Failed to bring up Control Plane: Failed to create [kube-controller-manager] container on host [x.x.x.x]: Failed to create [kube-controller-manager] container on host [x.x.x.x]: Error response from daemon: Conflict. The container name “/kube-controller-manager” is already in use by container 06ea1f6dc2879b30a1f8b72eb7d18b5abd193b7705564b4c36e6de0dd5e2e803. You have to remove (or rename) that container to be able to reuse that name.

My rke version is v0.1.9 and my goal is to update my kubernetes from v1.10.1 to v1.11.2. Someone could help me to deal with this problem?

Thanks

Hi everyone,

I managed to solve. I don’t know it was the best way to fix, but it worked! Maybe It’s important I explain a little bit about my infrastructure.

We have a Rancher management three Kubernetes cluster: alpha and homolog and Rancher. Which ones have five machines ( three controllers with also workers role and two workers that have workers role). We’d like to update a Kubernetes version in both environments. In alpha and homolog trough RKE update running well. When we did on Rancher, we had problems: “FATA[0095] [controlPlane] Failed to bring up Control Plane: Failed to create [kube-controller-manager] container on host [x.x.x.x]: Failed to create [kube-controller-manager] container on host [x.x.x.x]: Error response from daemon: Conflict. The container name “/kube-controller-manager” is already in use by container 06ea1f6dc2879b30a1f8b72eb7d18b5abd193b7705564b4c36e6de0dd5e2e803. You have to remove (or rename) that container to be able to reuse that name”. When RKE tried to update a controller, It can’t due to already exist one kube-control-manager running. The suggestion by RKE was renamed a exist container or remove. I was afraid of remove or rename and make some crash in my environment

So I try on this alternative solution: First I’ve changed RKE file, removed the controller whom showing problem before I running RKE again. It worked all machines had a Kubernetes updated.
Second, I accessed the removed machine and clean up all containers existent there. I used this command to clean up all containers: docker rm $(docker ps -a) -f. Remember this machine didn’t be more in the cluster!!
And finally, I needed put the machine who I had removed in the cluster again. So once more I’ve changed RKE file, added the controller before I running RKE.

It worked for me, but I didn’t figure out why the RKE managed to do in alpha and homolog but it has problems in Rancher.

:wink: