What is the missing link between git and the deployment to Kubernetes?

Cluster information:

Kubernetes version: 1.16.3
Cloud being used: bare-metal
Installation method: manual
Host OS: CoreOS

Hello everybody,

This is my first post on the forum. I hope I get to give back some of what I will gain here.

I work at a place where we are moving away from Swarm and going to Kubernetes (k8s). We find ourselves stuck, not in the k8s implementation but rather in how to structure our code. We started putting all our code in one repo (k8s + apps) but quickly realised that it would be unmanageable. The right would have to be a repo per app.

The problem we are facing is this:

How can we “auto deploy” an app if we need to say, add a file to a container? That would mean, having to add a file in the app’s repo but also adding a reference in the k8s Deployment yams definition. What is the missing link that eludes us and allows us to change something in an app that would require a change in k8s and have the app not fail because k8s is unaware of the new file requirement in the app?

I hope this is clear enough. :wink:

Anyway, any help or pointers to documentation, apps, etc are welcome.

Thanks for your help.

If I understood correctly you are want to drive deployments via your git repo, would that be correct?

If so there are a few really awesome projects that follow the GitOps pattens which should be able to help you out. Both Flux and ArgoCD monitoring changes within a given Git repo and apply the changes to the cluster on your behalf.

I hope that’s what you’re looking let me know if I misread that.

Cheers :slight_smile:

2 Likes

Hi macintoshprime,
That is exactly it. Thanks for the Two apps. I’ll check them out ASAP.

Our biggest issue right now is finding an app that can Handle a config change. So as an example, if we had an app running on http and decided we now wanted https, we’d have to add a few certs and keys to the app and thus, configMaps and Secrets, which means changes would have to be made in the apps git repo and the k8s git repo and pushed at the same time so that k8s knows about the new files and builds the configMaps and Secrets.

Thanks for your help.

1 Like

Happy to help :slight_smile: Let me know if you have any other questions. I used Flux at work and have some passing knowledge of ArgoCD. Hope one of them works for you, they’re both awesome tools.