47. $ kubectl rolling-update flask-api
--image=us.gcr.io/kubernetes-demo/docker-demo:1.2.0
Scaling up flask-api-8e516770df4cc01c122ca27915b6d3bc from 0 to 3,
scaling down flask-api from 3 to 0
(keep 3 pods available, don't exceed 4 pods)
Scaling flask-api-8e516770df4cc01c122ca27915b6d3bc up to 1
Scaling flask-api down to 2
Scaling flask-api-8e516770df4cc01c122ca27915b6d3bc up to 2
Scaling flask-api down to 1
Scaling flask-api-8e516770df4cc01c122ca27915b6d3bc up to 3
Scaling flask-api down to 0
Update succeeded.
Deleting old controller: flask-api
Renaming flask-api-8e516770df4cc01c122ca27915b6d3bc to flask-api
replicationcontroller "flask-api" rolling updated
👇
Notes de l'éditeur
Dockerfiles are like the recipe for cakes. You can bake all kinds of different cakes with different Dockerfiles. Database containers, Web server containers, Wordpress containers, Node containers, Go containers.
This is the Go Dockerfile. You can see where it uses the ubuntu image as it’s base. Then it installs go. It runs the curl command straight out of the Go installation docs. Then it sets Go environment variables. And finally it sets gopath as the working directory. The CMD command is the default command for the docker container. The docker run command can override this default command.