Score:0

Automate Kubernetes Deployment using ArgoCD

ve flag

We have a GitHub repo containing all the Kubernetes cluster yaml files, When we want to update a deployment we simply edit the yaml and push to GitHub.

Unfortunately, we then have to kubectl apply -f file.yaml

How could one automate the deployment using something like ArgoCD or perhaps another CD Tool?

We hope to have a workflow trigger that automatically applies the YAML file changes to the cluster once pushed to GitHub.

The problem we face is the GitHub Repo is not unique to a specific deployment and as mentioned above, contains all the YAML files for the entire cluster.

Currently, we believe the only option would be to kubectl apply the entire GitHub repo, but this does not make sense if only one file has changed?

Score:1
ph flag

I'd look into Flux. You can point Flux to the root of your repository (or a specific directory) and it will take care of deploying the manifests you have defined. It also detects change, so if you pushed a change to your repository, Flux will roll out the changes.

ArgoCD would also work. But because you mentioned the repo is not unique to a specific deployment and contains manifests for the entire cluster, Flux might work better in this case.

Best to try both or any other tool and see what works best for your workflows.

Birdy avatar
ve flag
Thanks Jacob, i will look into Flux now :-)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.