<pre><code>kubectl set image deployment/$DEPLOYMENT_EXTENSION $INSTANCE_NAME=gcr.io/$PROJECT_ID/$DOCKER_REPOSITORY:latest
</code></pre>

<p>I use this command do load new created image to my existing cluster (update version of my app) . But when I do it , and then go to the site , I don't see any changes .</p>

<pre><code>spec:
      terminationGracePeriodSeconds: 30
      containers:
      - name: booknotes
        image: gcr.io/my-image:latest
        imagePullPolicy: Always
</code></pre>

<p>I've also added this 2 lines in deployment.yaml file and applied it for my cluser: </p>

<pre><code>imagePullPolicy: Always
terminationGracePeriodSeconds: 30
</code></pre>

<p>But it still doesn't work. Can it be because I use <code>:latest</code> tag ? Or it isn't related ? If you have some idias pls let me know. And also if you need additional info , I will attach it !</p>

<p><strong>gitlab-ci.yml</strong></p>

<pre><code>   stages:
      - build
      - docker-push
      - deploy

    cache:
      paths:
        - node_modules/

    build:
      stage: build
      image: node:latest
      script:
        - yarn install
        - npm run build
      artifacts:
        paths:
          - dist/
      only:
        - master

    docker:
      stage: docker-push
      image: docker:18.09.7

      services:
        - docker:18.09.7-dind
        - google/cloud-sdk:latest

      script:
        - echo $GCP_ACCESS_JSON &gt; $CI_PIPELINE_ID.json
        - cat $CI_PIPELINE_ID.json | docker login -u _json_key --password-stdin $GCP_REGION
        - docker build -t gcr.io/$PROJECT_ID/$DOCKER_REPOSITORY:latest .
        - docker push gcr.io/$PROJECT_ID/$DOCKER_REPOSITORY:latest

      only:
        - master

    test:
      stage: deploy
      image: google/cloud-sdk:latest
      script:
        - echo $GCP_ACCESS_JSON &gt; $CI_PIPELINE_ID.json
        - gcloud auth activate-service-account $GCP_CE_PROJECT_EMAIL --key-file $CI_PIPELINE_ID.json --project $GCP_PROJECT_ID
        - gcloud container clusters get-credentials $CLUSTER_NAME --zone $ZONE --project $PROJECT_NAME
        - kubectl set image deployment/$DEPLOYMENT_EXTENSION $INSTANCE_NAME=gcr.io/$PROJECT_ID/$DOCKER_REPOSITORY:latest

      only:
        - master
</code></pre>

<p>This question, the symptoms and the reasons are very close to [this one],(<a href="https://stackoverflow.com/questions/58531740/google-cloud-platform-creating-a-pipeline-with-kubernetes-and-replacing-the-same/58543316#58543316">Google cloud platform creating a pipeline with Kubernetes and replacing the same container</a>)</p>

<p>Apply the same solution in your Gitlab-CI pipeline (use global variable to change the image tag and to deploy everytime a new one to force Kubernetes to pull and to deploy it).</p>

<p>I can help you on Gitlib-CI if you have difficulties to do this.</p>
