<p>I run pods with replication controller, now i want to edit config like change value of environment and keep name of rc.</p>

<pre><code>apiVersion: v1
kind: ReplicationController
metadata:
  name: backend
spec:
  replicas: 3
  template:
    spec:
      containers:
      - name: backend
        image: myproject/backend
        ports:
        - containerPort: 8080
        env:
        - name: USER_ENDPOINT
          value: "http://10.0.7.29:10000"
</code></pre>

<p>For example I move service to new server and just want change value of env <code>USER_ENDPOINT</code> to <code>http://10.0.7.30:30100</code></p>

<p>Now I just know follow delete rc and recreate rc, but in production i don't stop it.</p>

<p>I try <code>rolling-update</code> but not work because i want keep name of replication controller.</p>

<p>What can i do ?</p>

<p>Please suggest a solution, thanks.</p>

<p>You can use <code>kubectl edit</code> to edit a resource:</p>

<pre><code>Usage:
  kubectl edit (RESOURCE/NAME | -f FILENAME) [flags]

Examples:
  # Edit the service named 'docker-registry':
  $ kubectl edit svc/docker-registry

  # Use an alternative editor
  $ KUBE_EDITOR="nano" kubectl edit svc/docker-registry

  # Edit the service 'docker-registry' in JSON using the v1 API format:
  $ kubectl edit svc/docker-registry --output-version=v1 -o json
</code></pre>

<p>^^ from the kubectl help</p>
