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.

Building Clustered Applications with Kubernetes and Docker

3,956 views

Published on

An introduction to Kubernetes and how to use it to build clustered containerized applications

Published in: Technology
  • Be the first to comment

Building Clustered Applications with Kubernetes and Docker

  1. 1. @wattsteve Building Clustered Applications with Kubernetes and Docker Steve Watt Red Hat Emerging Technologies
  2. 2. @wattsteve Why Docker? CC flickr bibbit
  3. 3. @wattsteve Why Kubernetes?
  4. 4. @wattsteve Kubernetes Cluster Kubernetes Architectural Overview Kubernetes Master Server(s)Kubernetes Master Server(s) Linux Server(s) etcd API Server Controller Manager Kubernetes NodeKubernetes Node Linux Server KubeletDocker Kubernetes Proxy Kubernetes NodeKubernetes Node Linux Server KubeletDocker Kubernetes Proxy Kubernetes NodeKubernetes Node Linux Server KubeletDocker Kubernetes Proxy Scheduler
  5. 5. @wattsteve Installing Kubernetes • Hosted Services: Google Compute Engine • Support for a wide variety of Infrastructure (Azure, Rackspace, vSphere, AWS) • Support for several OS’ (RHEL, CentOS, Fedora, Debian, Ubuntu, Atomic, CoreOS) • Local but automated (Vagrant/Ansible) * Magic * • Local but manual (Fedora) * What I use * https://github.com/GoogleCloudPlatform/kubernetes/blob/mas ter/docs/getting-started- guides/fedora/fedora_manual_config.md
  6. 6. @wattsteve CC flickr kk Awesome! Now, lets build an application
  7. 7. @wattsteve Kubernetes MasterKubernetes Master Kubernetes Node 1Kubernetes Node 1 Kubernetes Cluster NGINX Pod NGINX ContainerNGINX ContainerBrowser Request Browser Request Kubernetes Node 2Kubernetes Node 2 Other Pods Other ContainersOther Containers We’ll start by Defining and Deploying a Pod
  8. 8. @wattsteve Kubernetes MasterKubernetes Master Kubernetes Node 1Kubernetes Node 1 Kubernetes Cluster NGINX Pod NGINX ContainerNGINX ContainerBrowser Request Browser Request Kubernetes Node 2Kubernetes Node 2 NGINX Pod NGINX Pod ReplicationController NGINX Pod ReplicationController NGINX ContainerNGINX ContainerBrowser Request Browser Request You might also want to add a ReplicationController
  9. 9. @wattsteve Kubernetes MasterKubernetes Master Kubernetes Node 1Kubernetes Node 1 Kubernetes Cluster NGINX Pod NGINX ContainerNGINX Container Browser Request Browser Request Kubernetes Node 2Kubernetes Node 2 NGINX Pod NGINX Pod ReplicationController NGINX Pod ReplicationController NGINX ContainerNGINX Container NGINX Master ServiceNGINX Master Service And add a Service to Proxy in front of it
  10. 10. @wattsteve What about Persistence? Lets try out Volumes Volumes are specified in a Pod and mounted onto a specified path within a container. There are several kinds of Volumes: •hostPath (mount a persistent directory provided by host) •NFS (mount NFS share provided by a 3rd Party) Ephemeral •emptyDir (mount an ephemeral directory provided by host) File •GlusterFS Distributed File System (mount an adjacent GlusterFS volume) •Ceph Distributed File System (mount an adjacent CephFS volume) Block •GCEPersistentDisk (mount a GCE Block Device when in GCE) •Ceph Block (mount an adjacent Ceph Block Device) •ISCSI Block Devices (mount an adjacent ISCSI Block Device)
  11. 11. @wattsteve Kubernetes MasterKubernetes Master Kubernetes Node 1Kubernetes Node 1 Kubernetes Cluster NGINX Pod NGINX ContainerNGINX Container Browser Request Browser Request Kubernetes Node 2Kubernetes Node 2 NGINX Pod NGINX Pod ReplicationController NGINX Pod ReplicationController NGINX ContainerNGINX Container NGINX Master ServiceNGINX Master Service GlusterFS Volume GlusterFS Volume For this example, we’re going to use GlusterFS
  12. 12. @wattsteve Debugging
  13. 13. @wattsteve Thanks for Attending Interested in following up? Steve Watt swatt@redhat.com Examples: https://github.com/wattsteve/kubernetes/

×