Is there any way to rename a replication controller for it to be picked up by the rolling update command ?
The problem is my rolling update failed in the middle with the below error :
Renaming xx to xx-353rfdf44
Error from server: client: etcd cluster is unavailable or misconfigured; error #0: read tcp 172.17.22.102:55398->172.17.22.102:4001: read: connection reset by peer
First of all I dont know why this happend. And second, as you can see, it failed in the rename step. So my rolling update java code, when executed is looking for xx Replication Controller to perform rolling update and since now it is called xx-353rfdf44 , it is not able to find it.
I was wondering if I can do a manual fix to rename xx-353rfdf44 back to xx for my rolling update java code to work again.
Thanks in advance
According to Perform Rolling Update Using a Replication Controller document:
When rolling update is started, it creates a new replication controller(RC) with updated configuration, then it decreases the number of replicas for the old RC and increases the number of replicas for the new RC until the old RC reaches 0 replicas, and the new RC reaches desired number of replicas. Finally, rolling update deletes the old RC.
There is no way to rename objects in Kubernetes because the name of the object is used as an identifier. SO Answer
In your case, it would be better to operate on the level of Deployment object because when rolling update is started for the deployment, it doesn't recreate the deployment object and therefore its name does not change.