How to create a local development environment for Kubernetes?

前端 未结 12 1662
谎友^
谎友^ 2020-12-22 18:59

Kubernetes seems to be all about deploying containers to a cloud of clusters. What it doesn\'t seem to touch is development and staging environments (or such).

Durin

12条回答
  •  再見小時候
    2020-12-22 19:26

    The sort of "hot reload" is something we have plans to add, but is not as easy as it could be today. However, if you're feeling adventurous you can use rsync with docker exec, kubectl exec, or osc exec (all do the same thing roughly) to sync a local directory into a container whenever it changes. You can use rsync with kubectl or osc exec like so:

    # rsync using osc as netcat
    $ rsync -av -e 'osc exec -ip test -- /bin/bash' mylocalfolder/ /tmp/remote/folder
    

提交回复
热议问题