Can we do gitOps at rancher 2?

Hi all,

I am new to rancher and devops in general and this is my first post. My background is webdev and at the case below I use docker images and I do not build any image.

Let’s say that I have just one k8s cluster on rancher 2 in a home server with a few stateless containers and I make a change in the configuration, through the UI, through kubectl, whatever and I destroy everything. Can I put everything in a git repo and start from bare metal with minimal effort? If yes, how? If no, which part of the configuration can be like that?

The following page states that “Users can easily point Rancher at any git repo and Rancher will automatically run builds on Kubernetes, deploy test environments, and move product”, is there an example of such repo?

https://rancher.com/what-is-rancher/what-rancher-adds-to-kubernetes

The answer at the FAQ to the question “How can I automate task X in Rancher?”, shows that rancher 2 was not made initially for gitOps.

To answer my own question in case it’s useful to anyone else, this and this and flux of weaveworks combined with rancher 2 can give a gitOps approach in which someone learning k8s can go back to the rancher UI that is kept in sync whenever k8s alone becomes too complicated.

Of course, there are areas of rancher 2 that are not provided by kubernetes out of the box, but my focus is not there.

1 Like