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.

  • Run docker in shell using PHP
  • Deploy Docker container using Kubernetes
  • Why isn't my Dockerfile's ARG expanded?
  • 503 Service Temporarily Unavailable with gitlab docker and nginx-proxy docker
  • RabbitMQ Cluster does not elect new master
  • npm install error with kurento - docker
  • 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?

  • ERROR : HTTP request response time
  • Dockerized Spring Cloud Stream services with Kafka broker unable to connect to Zookeeper
  • Deploying a Spark application on a container
  • use docker supervisor automatically run a script after start with a variable given in container start?
  • Docker Data Container Encryption
  • Postgres image from docker can't find initdb. What am I missing?
  • 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.