Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Navigating Container Deployments Using Kubernetes

Navigating Container Deployments Using Kubernetes

A run down of Kubernetes, some basic concepts, and how it maps to Google Container Engine, along with a few examples.

Sandeep Parikh

November 17, 2015
Tweet

More Decks by Sandeep Parikh

Other Decks in Technology

Transcript

  1. Stuff I Want To Talk About Pain in the Ops

    Kubernetes Concepts Container Engine Examples Resources
  2. 3 Google Cloud Platform The Joy of Ops “We want

    to get the best utilization of our infrastructure” “Keeping our infrastructure perfectly homogenous is giving me nightmares” “It ran fine on MY machine” “My developers aren’t as productive as they should be. Deployments are slowing us down”
  3. 6 Google Cloud Platform Container Challenges “If we run our

    containers on VMs, I don’t want to manage anything” “How do I get my containers to talk to one another?” “Where should I run my containers? “How do we ensure our containers are running smoothly?”
  4. 10

  5. 11 Run and manage a cluster of containers as a

    single system Orchestrate containers by scheduling on to cluster nodes Ensure state and group into units for management and discovery
  6. 12 Open source and developed in the open Driven by

    the community http://cncf.io Deployable everywhere
  7. 14 Google Cloud Platform Node : A node is a

    physical or virtual machine running Kubernetes, onto which pods can be scheduled. Pod : A pod is a co-located group of containers and volumes. Label : A label is a key/value pair that is attached to a resource to convey a user-defined identifying attribute. Selector : A selector is an expression that matches labels in order to identify related resources. Replication Controller : A replication controller ensures that a specified number of pod replicas are running at any one time. Handles re-creation of a pod when the machine it is on reboots or otherwise fails. Concepts Service : A service defines a set of pods and a means by which to access them, using IP addresses and DNS. Volume : A volume is a directory accessible to a Container as part of its filesystem. Builds upon Docker Volumes, adding provisioning of the volume directory and/or device. Secret : A secret stores sensitive data, such as authentication tokens, which can be made available to containers upon request. Name : A user- or client-provided name for a resource. Namespace : A namespace is like a prefix to the name of a resource.
  8. 15

  9. 16 Google Cloud Platform Networking Pods are routable Pods can

    reach other without NAT, even across Nodes No complex brokering of port numbers
  10. 17 Google Cloud Platform Daemon Sets : all or some

    nodes run a copy of a pod Deployments : declarative update for Pods and Replication Controllers Ingress Resources : rules for allowing inbound connections to reach cluster services Horizontal Pod Autoscaling : allows the number of pods in a replication controller or deployment to scale automatically based on observed CPU utilization Jobs : creates one or more pods and ensures that a specified number of them successfully terminate. As pods successfully complete, the job tracks the successful completions. New in 1.1
  11. 18 Google Cloud Platform Cluster Setup 1. Choose the infrastructure:

    GCE, AWS, Azure, Rackspace, on-premise 2. Choose the node OS: CoreOS, Atomic, RHEL, Debian, CentOS, Ubuntu 3. Provision machines: Boot VMs, install and run kube components 4. Configure networking: IP ranges for Pods, Services, SDN 5. Start cluster services: DNS, logging, monitoring 6. Manage nodes: kernel upgrades, OS updates, hardware failures
  12. 19 Google Cloud Platform Google Container Engine Hosted Kubernetes with

    managed resources Run clusters on a bundle of Google Compute Engine resources: Instances, Disks, Networking, Load Balancer Built-in support for centralized logging and container health checking Private container registry at gcr.io
  13. 22 Google Cloud Platform Jenkins Kubernetes Cluster (GKE) Node 1

    Node 3 Node 2 Jenkins Leader Jenkins Builder Jenkins Builder Jenkins Builder Jenkins Builder Jenkins Service Jenkins Builder nginx nginx Service
  14. 23 Google Cloud Platform Microservices Kubernetes Cluster (GKE) Node 2

    Node 1 Backend Frontend Frontend Backend Service Frontend Frontend Service Backend Backend
  15. 24 Google Cloud Platform Continuous Delivery Repo Kubernetes Cluster (GKE)

    Github Jenkins µservice µservice Default Staging Production 1 2 3 5 4 Push Build Clone Stage Approve Deploy 1 2 3 4 5 6 6
  16. 26 Google Cloud Platform GCP Meetup Google Cloud Platform User

    Group First meetup December 3rd http://goo.gl/8mPp1s Honest Dollar runs on Container Engine, will be presenting Learn from community, not just us
  17. 27 Google Cloud Platform Resources Kubernetes kubernetes.io github.com/kubernetes/kubernetes Container Engine

    cloud.google.com/container-engine Solutions Continuous Deployment on Kubernetes Automated Image Builds with Jenkins, Packer, and Kubernetes Distributed Load Testing using Kubernetes Real-time data analysis with Kubernetes, Google Cloud Pub/Sub, and BigQuery Real-time data analysis with Kubernetes, Redis, and BigQuery