Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Docker Dhahran November 2017 meetup

377 views

Published on

first practical introduction to Kubernetes and Openshift. container orchestration systems. the slides are meant as a quick introduction to Kubernetes/Openshift to prepare for the hands-on demo.

Published in: Technology
  • Be the first to comment

Docker Dhahran November 2017 meetup

  1. 1. P R ACT IC A L IN T RO DUCT IO N TO O R CH EST R AT IO N : K UBE R N E T E S/O P ENSH IFT DH A H R A N DO CKER M EET U P 10T H NOV EM BER 2017 BY : WA LID S H A A R I
  2. 2. System engineer, passionate about Open source working for a large enterprise with anti DevOps patterns. Recently working with network team on evaluating Network Automation for multi vendor data center. @walidshaari walid.shaari@linux.com https://www.linkedin.com/in/walidshaari/ https://medium.com/@walidshaari/ https://github.com/walidshaari/Kubernetes-Certified-Administrator $oc whoami RHCA IV
  3. 3. Thank you, our sponsor, TAM Development LLC for hosting the Dhahran Docker meetup. Thank you Mustafa Dahab for presenting TAM Development LLC Rancher, and Docker in production.
  4. 4. 3 Google trends
  5. 5. 4
  6. 6. 5 Kubernetes wining the infrastructure war
  7. 7. Open-source system for automating deployment, scaling, and management of containerized applications. KUBERNETES 6
  8. 8. 7 Borg Mesos Omega Kubernetes Hashicorp Nomad Docker swarm Rancher Cattle 15 years of experience of running production workloads at Google
  9. 9. 8 Why Invest in Kubernetes? What problems Kubernetes/Openshift solve? Use Cases
  10. 10. PORTABILITY 9 AKS
  11. 11. RESILIENCY 10
  12. 12. ELASTICITY 11 https://cloudplatform.googleblog.com/2016/09/bringing-Pokemon-GO-to-life-on-Google-Cloud.html
  13. 13. BUILDING DISTRIBUTED PLATFORMS 12 Helm, charts, tiller and MonocularSERVERLESS PLATFORMS KubeApps.com Istio Rich ECO system to build distributed applications
  14. 14. Among more and more other use cases 13 https://kubernetes.io/case-studies/
  15. 15. 14 GETTING STARTED
  16. 16. 15 • Openshift is an opiniated Kubernetes - you can use Kubectl Kubernetes client to interact with an OpenShift cluster • Red Hat does not use all the Kubernetes abstractions “Objects”, however, they have their own and wrap around standard Kubernetes objects. e.g. Openshift router vs. K8s ingress controller. • Medium: difference between kubernetes and openshift Openshift relationship to Kubernetes
  17. 17. 16 • Enhanced Security • Ease of deployments in different scenarios (e.g. disconnected, standalone, HA, Azure, ..etc) • Enterprise level support • Opinionated architecture and out of the box platform • Focus on what is more important e.g. PaaS FaaS not CaaS • Easy plumbing and pipelines for developers and ops alike. • You can still use K8s under the hood. Why Openshift not Kubernetes? Medium: difference between kubernetes and openshift
  18. 18. K8S Cluster architecture
  19. 19. Openshift objects Where is the container object?
  20. 20. 19 minishift https://docs.openshift.org/latest/minishift/getting-started/installing.html Install local utilities: kubectl and minikube https://kubernetes.io/docs/tasks/tools/install-kubectl/ Checkout the Kubernetes docs https://kubernetes.io/docs/home/
  21. 21. 20 masters-imac:~ master$ minishift oc-env export PATH="/Users/master/.minishift/cache/oc/v3.6.0:$PATH" # Run this command to configure your shell: # eval $(minishift oc-env) masters-imac:~ eval $(minishift oc-env) minishift
  22. 22. 21 masters-imac:~ master$ minishift oc-env export PATH="/Users/master/.minishift/cache/oc/v3.6.0:$PATH" # Run this command to configure your shell: # eval $(minishift oc-env) masters-imac:~ eval $(minishift oc-env) minishift
  23. 23. 22 oc completion bash > oc-completion.sh source oc-completion.sh oc version oc help oc types oc new-project oc get projects oc get namespaces kubectl completion bash > k8s-completion.sh source k8s-completion.sh kubectl version Kubectl help Kubectl get projects Kubectl get namespaces Can kubectl create a namespace ? How about a project? Client tools demo
  24. 24. 23 Pods are the core Kubernetes Component masters-imac:~ master$ oc run mypod --image=gcr.io/kuar-demo/kuard-amd64:1 deploymentconfig "mypod" created masters-imac:~ master$ oc run myotherpod --image=gcr.io/kuar-demo/kuard-amd64:2 deploymentconfig "myotherpod" created masters-imac:~ master$ kubectl get pods NAME READY STATUS RESTARTS AGE myotherpod-1-33xmq 0/1 ContainerCreating 0 2m myotherpod-1-deploy 1/1 Running 0 2m mypod-1-6p37m 1/1 Running 0 2m masters-imac:~ master$ kubectl get pods NAME READY STATUS RESTARTS AGE myotherpod-1-33xmq 0/1 ContainerCreating 0 2m myotherpod-1-deploy 1/1 Running 0 2m mypod-1-6p37m 1/1 Running 0 2m masters-imac:~ master$ oc get pods NAME READY STATUS RESTARTS AGE myotherpod-1-33xmq 1/1 Running 0 3m mypod-1-6p37m 1/1 Running 0 4m
  25. 25. Pod Kurad:1 Project/name space
  26. 26. 25 But what did Openshift add to Docker run? masters-imac:~ master$ oc get all NAME REVISION DESIRED CURRENT TRIGGERED BY dc/myotherpod 1 1 1 config dc/mypod 1 1 1 config NAME DESIRED CURRENT READY AGE rc/myotherpod-1 1 1 1 8m rc/mypod-1 1 1 1 8m NAME READY STATUS RESTARTS AGE po/myotherpod-1-33xmq 1/1 Running 0 8m po/mypod-1-6p37m 1/1 Running 0 8m
  27. 27. 26 But what did Openshift add to Docker run? masters-imac:~ master$ oc get rc NAME DESIRED CURRENT READY AGE rc/myotherpod-1 1 1 1 8m rc/mypod-1 1 1 1 8m Replication Controllers provides extra feature to pods such as rolling update: $ kubectl rolling-update NAME [NEW_NAME] --image=IMAGE:TAG // Update pods of frontend-v1 using new replication controller data in frontend-v2.json. $ kubectl rolling-update frontend-v1 -f frontend-v2.json // Update pods of frontend-v1 using JSON data passed into stdin. $ cat frontend-v2.json | kubectl rolling-update frontend-v1 -f -
  28. 28. 28
  29. 29. 29 Is my Cluster healthy or not?
  30. 30. 30 Demo time
  31. 31. 31 What is next? https://learn.openshift.com/ https://www.katacoda.com/courses/openshift https://www.katacoda.com/courses/kubernetes https://www.katacoda.com/courses/istio/deploy-istio-on-kubernetes https://www.katacoda.com/courses/prometheus https://kubernetes.io/
  32. 32. 32 Ad-hoc practical demo

×