Search code examples
wordpresskubernetescloudkubernetes-helmbitnami

How to configurate on kubernetes to update from git repository?


I just installed bitnami/wordpress image using helm. Is it possible to sync it with git and when I will change some files in this git repository to update kubernetes pods?

I mean update Wordpress source code because Im modyficating plugins in wp-content/plugins dir.


Solution

  • A possible solution is to use git-sync in a sidecar container. It will periodically pull files down from a repository and copy them to a volume.

    Here is a sample manifest which uses git-sync to update the content hosted on a simple nginx web server: https://github.com/nigelpoulton/ps-vols-and-pods/blob/master/Multi-container-Pods/sidecar.yml