<p>I am using docker containers and have docker-compose files for both local development and production environment. I want to try Google Cloud Platform for my new app and specifically Google Kubernetes Engine. My tools is Docker for Mac with Kubernetes on local machine.</p>

<p>It is super important for developers to be able to change code and to see changes live for local development.</p>

<p>Use cases:</p>

<ol>
<li><p>Backend developer make changes to basic Flask API (or whatever you use) and should see changes on reloaded app immediately.</p></li>
<li><p>Frontend developer make changes to HTML layout and should see changes on web page immediately.</p></li>
</ol>

<p>At the moment i am using docker-compose files to mount source code to local containers. But Kubernetes does not support relative paths to mount the source code.</p>

<p>Ideally i should be able to set the variable </p>

<blockquote>
  <p>Deployment.spec.templates.spec.containers.volumes.hostPath</p>
</blockquote>

<p>as relative path to my repo. For example, in our team developers clone repo to this folders:</p>

<blockquote>
  <p>/User/BACKEND_developer/code/project_repo</p>
  
  <p>/User/FRONTEND_developer/code/project_repo</p>
</blockquote>

<p>Obviously you can't commit and build the image after every little change to the source code.</p>

<p>So what is the best practice for local development with Kubernetes? Do i need some additional tools to modify .yaml files for every developer?</p>

Zhorzh Alexandr
<p>@tgogos is right.
The best way to achieve your goal is to use <a href="https://cloudplatform.googleblog.com/2018/03/introducing-Skaffold-Easy-and-repeatable-Kubernetes-development.html" rel="nofollow noreferrer">Skaffold</a></p>

<p>It will rebuild container whenever it sees changes in source code.</p>

<p>Skaffold has a pluggable architecture that allows you to choose the tools in developer workflow that work best for you:
<a href="https://i.stack.imgur.com/YgwIS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YgwIS.png" alt="Pluggability"></a></p>
