When a developer deploy his code, the ci will execute kubectl set image deployment/gcloud-example gcloud-example=stavalfi/gcloud-example:<new-tag>. But the ci won't change the tag in the yaml file of the repo (to avoid amending developer commits in master which is bad, and do avoid adding a seperate commit just for tagging after every merge).

In my company, we don't use latest tag for images. As a result, over time, the yaml files in each micro-service repo, will have an un synced yaml file (because of the deployment section that contains the image tag).


Over time, there will be a requirment to change the yaml file (due to new-tag/bugs/features/..) and I would like to keep them in sync so I can use the yaml when every I want.

Possible solution

We can avoid any sort of solution and when we want all the yaml files of a k8s cluster, we can use k8s api to get all of them.


  • They are un-versioned
  • They can be lost if the cluster is not-available/deleted.


I'm trying to avoid developing a system that sync the yaml files. for example - running a service that listen to k8s events. It feels like I'm re-impelemting something that every other company is facing already.


Should we backup (and sync) all the yaml files somewhere? If yes, how?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.