Kops: Keeping cluster state in git instead of S3?

Created on 15 Apr 2017  路  5Comments  路  Source: kubernetes/kops

Is it possible to tell kops not to use s3 for cluster state? I would instead like to keep the state in files in a git repository.

Most helpful comment

I think this is an interesting topic and would be nice to have kops support git. As a lot of people already store all they kubernetes yaml files in git it would imo add to review-ability of changes to support git as a state store.

I tested the way mentioned above, but that only gives the cluster yaml and not the all the other yamls. It does seem like it would be quite a lot of effort having to manage all files manually this way.

All 5 comments

You can write the cluster file(s) in yaml and then use kops create -f to create the cluster. Changes to the yaml can be applied by using kops replace -f. This will allow you to keep your cluster code in git. To seed your repo - you can get your current cluster yaml using kops get cluster CLUSTER_NAME -o yaml. You can do the same with your instance groups.

It is not possible at this time to point the state store at git. I have talked about this in the past. As mentioned previously you can do version control for the server using yaml.

@michaelajr is there a way to get a kops appy -f that either creates or updates?

@olalonde Not that I know of. But you can use kops replace -f for an update.

I think this is an interesting topic and would be nice to have kops support git. As a lot of people already store all they kubernetes yaml files in git it would imo add to review-ability of changes to support git as a state store.

I tested the way mentioned above, but that only gives the cluster yaml and not the all the other yamls. It does seem like it would be quite a lot of effort having to manage all files manually this way.

Was this page helpful?
0 / 5 - 0 ratings