dockergoogle-cloud-platformkubernetesopenshift-origin

How to create a local development environment for Kubernetes?


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).

During development you want to be as close as possible to production environment with some important changes:

Similarly one may want a non-public environment to do continuous integration.

Does Kubernetes support such kind of development environment or is it something one has to build, hoping that during production it'll still work?


Solution

  • Update (2016-07-15)

    With the release of Kubernetes 1.3, Minikube is now the recommended way to run Kubernetes on your local machine for development.


    You can run Kubernetes locally via Docker. Once you have a node running you can launch a pod that has a simple web server and mounts a volume from your host machine. When you hit the web server it will read from the volume and if you've changed the file on your local disk it can serve the latest version.