Is it possible to have hot reload with Kubernetes?

Viewed 911

I am trying to get into the way of things with the Kubernetes but I'm facing a problem with hot reload.

In the development mode when I am just working on the code and I need the code be synchronized with the pods directly like in Docker when I use volumes to keep the state.

Is there any chance to make it work with the Kubernetes?

I would be thankful for any help with Kubernetes...

1 Answers

From the view of Cloud native(or kubernetes), the infrastructure is immutable and the Pods are the smallest deployable units. So you should replace the pod rather than change it(your code is part of the pod/image). so the correct process is: change code -> build image -> recreate pod in your env But actually, your process still could work just not follow the best practice of cloud native... – vincent pli

Also, you can try Ksync, that allows you to synchronize application code between your local and Kubernetes cluster. Kindly ask you to refer to official documentation to read more about.

Related