We have a deployed API in Kubernetes. The API is deployed via replication controller to pods and a managing rc. I would like to update the configuration to the API pods using rolling-update. I can do that, however the only way I can get the rolling-update command to not error is by changing the name of the RC. But doing this breaks the link from my Service (exposed as a load balancer) to the RC and it cannot find my pods anymore. Does someone have an example config for updating a replication controller without changing the name?
apiVersion: v1 kind: ReplicationController metadata: name: my-api labels: name: my-api spec: replicas: 4 selector: name: my-api template: metadata: labels: name: my-api spec: containers: - name: my-api image: docker-registry.example.com/mynamespace/my-api command: [ "sh", "-c", "/do/the/thing/run"] resources: limits: cpu: 0 ports: - name: web containerPort: 80 env: - name: "HELLO" value: "WORLD"
And I would like, for example to change the env var "HELLO" to "Bob" or something.