<p>I have created a deployment with two replicas in my K8S cluster with the volumes section to clone a git repo. The repo is cloned, the pods are created, deployment is created. I can login to the pod and run git commits are things look ok.</p>

<p>My assumption: If I do a git push to the repository managed by gitRepo volume mount, the pod or K8S deployment will be automatically redeployed but this is not happening? Is my assumption wrong? Should I do something more to do an auto-redeploy once a push is done like a CD pipeline? If the latter is true, I am trying to understand the purpose of gitRepo volume mounts now.</p>

<p>Thanks for your inputs.</p>

<p>Abdul.</p>

<p>After some research, I think I understand the scope of gitRepo volumes now. My requirement to auto-update the pods/deployments when changes happen to git repo can be handled using a microservice such as this: <strong><a href="https://github.com/fabric8io/gitcontroller" rel="nofollow noreferrer">https://github.com/fabric8io/gitcontroller</a></strong></p>

<p><strong>The issues with the above microservice:</strong></p>

<ol>
<li>Not able to find the gitcontroller binary (look at the GitHub issues as well, someone had posted this earlier)</li>
<li>When I try to build this manually after installing Go and moving the microservice to the desired location that it expects, I finally run into memory errors.</li>
</ol>

<p>So I believe the above microservice is broken and not probably maintained now (as of writing). Until it's fixed, I am going back to using Spring Cloud Config server with git backed repo to handle my configs. So when my configs change, I can run the Fabric8 maven plugin (<a href="https://maven.fabric8.io/" rel="nofollow noreferrer">https://maven.fabric8.io/</a>) to build a new Docker image and deploy that in my cluster. All of this can be automated using a simple Jenkins CD pipeline.</p>
