Successfully reported this slideshow.
Your SlideShare is downloading. ×

Docker & Kubernetes

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Upcoming SlideShare
Docker & FieldAware
Docker & FieldAware
Loading in …3
×

Check these out next

1 of 51 Ad
Advertisement

More Related Content

Slideshows for you (20)

Advertisement

Similar to Docker & Kubernetes (20)

Recently uploaded (20)

Advertisement

Docker & Kubernetes

  1. 1. DEPLOYING DOCKER TO GOOGLE CLOUD PLATFORM USING KUBERNETES Troy Harvey @troyharvey Generation Tux
  2. 2. https://www.docker.com/what-docker
  3. 3. http://www.eaiesb.com/blogs/?p=80
  4. 4. https://www.docker.com/survey-2016
  5. 5. 1.DOCKERINDEV 2.DEPLOYDOCKER
  6. 6. WAMP Vagrant Shared drive on Dev server php -S webpackssh + vim (on prod) Dev VM python -m SimpleHTTPServer virtualenvwrapper bin/rails server
  7. 7. https://flurdy.com/docs/docker/docker_osx_ubuntu.html
  8. 8. ☞ Dockerfile Container Image
  9. 9. $ docker build -t us.gcr.io/kubernetes-demo/docker-demo.base:latest -f ./docker/base.dockerfile . USEBASEIMAGE S
  10. 10. docker build -t us.gcr.io/kubernetes-demo/docker-demo:latest -f ./docker/app.dockerfile .
  11. 11. 12FACTORAPP RULE#3
  12. 12. DOCKERRUN
  13. 13. NATIVEFILESYNCING docker run -d -p 5000:5000 -v ~/Projects/docker-demo/:/app us.gcr.io/kubernetes-demo/docker-demo:latest …don’t be mad, Vagrant.
  14. 14. STORINGDOCKERIMAGES
  15. 15. gcloud docker push us.gcr.io/kubernetes-demo-1327/docker-demo:latest
  16. 16. DEPLOYINGDOCKER
  17. 17. https://www.youtube.com/watch?v=8694GGJlpZ8
  18. 18. $ kubectl create -f ./kubernetes/flask-controller.json replicationcontroller "flask-api" created $ kubectl create -f ./kubernetes/flask-service.json service "flask-service" created $ kubectl get services NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE flask-service 10.3.249.175 104.154.233.1 80/TCP 2m
  19. 19. VERSION1.2DROPS
  20. 20. gcloud docker push us.gcr.io/kubernetes-demo/docker-demo:1.2.0 ☝️
  21. 21. $ 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 👇

Editor's Notes

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

×