Source code changes in kubernetes, SaltStack & Docker in production and locally

This is an abstract question and I hope that I am able to describe this clear.

Basically; What is the workflow in distributing of source code to Kubernetes that is running in production. As you don’t run Docker with -v in production, how do you update running pods.

  • using ansible for provisioning docker containers
  • how docker-machine uses docker api to copy certificates
  • Why do kubelet failed to get stats from docker (error 500)?
  • How to hide SSH key to the Docker image without leaving the trace?
  • How can I transfer my docker image to another computer?
  • Dynamic mount point for Shared Volume Containers
  • In production:
    Do you use SaltStack to update each container in each pod?


    Do you rebuild Docker images and restart every pod?

    With Vagrant you can share a local folder for source code. With Docker you can use -v, but if you have Kubernetes running locally how would you mirror production as close as possible?

    If you use Vagrant with boot2docker, how can you combine this with Docker -v?

  • Docker compose variables
  • Service from sources inside Docker container
  • Can I build a Docker image to “cache” a yocto/bitbake build?
  • Kubernetes: hostPath volume does not mount
  • How to install jdk, jdeveloper, maven and svn in one docker container?
  • WebSockets on Elastic Beanstalk with Docker
  • One Solution collect form web for “Source code changes in kubernetes, SaltStack & Docker in production and locally”

    Short answer is that you shouldn’t “distribute source code”, you should rather “build and deploy”. In terms of Docker and Kubernetes, you would build by means of building and uploading the container image to the registry and then perform a rolling update with Kubernetes.

    It would probably help to take a look at the specific example script, but the gist is in the usage summary in current Kubernetes CLI:

    kubecfg [OPTIONS] [-u <time>] [-image <image>] rollingupdate <controller>

    If you intend to try things out in development, and are looking for instant code update, I’m not sure Kubernetes helps much there. It’s been designed for production systems and shadow deploys are not a kind of things one does sanely.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.