Slide 1

Slide 1 text

Navigating Container Deployments Using Kubernetes Sandeep Parikh Solutions Architect @crcsmnky

Slide 2

Slide 2 text

Stuff I Want To Talk About Pain in the Ops Kubernetes Concepts Container Engine Examples Resources

Slide 3

Slide 3 text

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”

Slide 4

Slide 4 text

4 Google Cloud Platform Containers Container Image Dependencies App Code

Slide 5

Slide 5 text

Containers, Containers, Containers!

Slide 6

Slide 6 text

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?”

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

Google launches over 2 billion containers each week

Slide 9

Slide 9 text

Kubernetes is based on years of experience running containers at scale

Slide 10

Slide 10 text

10

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

12 Open source and developed in the open Driven by the community http://cncf.io Deployable everywhere

Slide 13

Slide 13 text

13 Google Cloud Platform Google Technologies

Slide 14

Slide 14 text

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.

Slide 15

Slide 15 text

15

Slide 16

Slide 16 text

16 Google Cloud Platform Networking Pods are routable Pods can reach other without NAT, even across Nodes No complex brokering of port numbers

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

Examples

Slide 21

Slide 21 text

21 Google Cloud Platform Image Building

Slide 22

Slide 22 text

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

Slide 23

Slide 23 text

23 Google Cloud Platform Microservices Kubernetes Cluster (GKE) Node 2 Node 1 Backend Frontend Frontend Backend Service Frontend Frontend Service Backend Backend

Slide 24

Slide 24 text

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

Slide 25

Slide 25 text

Resources

Slide 26

Slide 26 text

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

Slide 27

Slide 27 text

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