<p>I have this deployment.yaml for kubernetes</p>
<pre><code>---
apiVersion: v1
kind: Service
metadata:
  name: smart-flats
  labels:
    app: smart-flats
spec:
  type: NodePort
  selector:
    app: smart-flats
  ports:
  - protocol: TCP
    port: 5000
    name: http
    
---
apiVersion: v1
kind: ReplicationController
metadata:
  name: smart-flats
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: smart-flats
    spec:
      containers:
      - name: smart-flats
        image: sleezy/go-hello-world:&lt;VERSION&gt;
        env:
        - name: SECRETKEY
          value: &quot;${CONFIG_SECRETKEY}&quot;
        ports:
        - containerPort: 5000
        livenessProbe:
          httpGet:
            path: /health
            port: 5000
          initialDelaySeconds: 30
          timeoutSeconds: 1
</code></pre>
<p>but when i try to push new version of app, kubectl get pods still show the first one and no updated version, what should i do? i need update pod everytime i push new version. Thanks!</p>

Sizor
<p>First off <code>kind: Deployment</code> is recommended instead of <code>kind: ReplicationController</code>, see <a href="https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/" rel="nofollow noreferrer">here</a> for details. Once you have updated the spec, you can update image version with <code>kubectl set image deployment smart-flats smart-flats=sleezy/go-hello-world:&lt;new version&gt;</code>. Your pods will automatic restart with the new image version.</p>
