getting started with kubernetes

18
Getting Started with Kubernetes Janakiram MSV Analyst | Advisor | Architect Janakiram & Associates Google Developer Expert Joseph Jacks Sr. Director Apprenda Founder, KubeCon

Upload: janakiram-msv

Post on 11-Jan-2017

243 views

Category:

Technology


4 download

TRANSCRIPT

Page 1: Getting started with kubernetes

Getting Started with KubernetesJanakiram MSVAnalyst | Advisor | ArchitectJanakiram & AssociatesGoogle Developer Expert

Joseph JacksSr. DirectorApprenda Founder, KubeCon

Page 2: Getting started with kubernetes

Announcing The Kubernetes Webinar Series

● Monthly webinar focused on helping you get started with Kubernetes● Delivered by the experts from the container ecosystem● Each webinar introduces a concept to accelerate your learning● No specific prerequisites

○ Basic understanding of Docker will help

● All attendees will get $100 Google Cloud Platform Credits● Win free annual and monthly subscriptions of MAPT eBook library● The recording of this webinar will be available at Kubernetes.live

Page 3: Getting started with kubernetes

Objectives

● The need for container orchestration● Overview of Kubernetes● Setting up Kubernetes development environment● Deploying your first application● Summary● Q&A

Page 4: Getting started with kubernetes

The Need for Container Orchestration

● Containers are becoming the standard unit of deployment● Each container image has

○ Code○ Binaries○ Configuration○ Libraries○ Frameworks○ Runtime

● Developers and Operators love containers

Page 5: Getting started with kubernetes

The Need for Container Orchestration

● Docker has solved the problem of packaging, deploying and running containerized applications

● Docker has three key components○ Container Engine○ Registry○ Tools

● Docker is great for managing a few containers running on a fewer machines

● Production applications deal with dozens of containers running on hundreds of machines

Page 6: Getting started with kubernetes

The Need for Container Orchestration

● The unit of deployment is changing from a machine to a container● Infrastructure has become immutable● Emphasis on treating the datacenter as a large server (cluster)● Tools are evolving to manage the new datacenter infrastructure

○ Docker Swarm○ Kubernetes○ Mesosphere DC/OS

● Manage the lifecycle of containerized applications running in production● Automate the distribution of applications ● Ensure higher levels of utilization and efficiency

Page 7: Getting started with kubernetes

A DATACENTER IS NOT A COLLECTION OF COMPUTERS, A DATACENTER IS A COMPUTER

Page 8: Getting started with kubernetes

The Changing Face of the Datacenter

Physical Infrastructure

VM VMVM VM VM VMVM

Cluster 1 Cluster 2

Cluster 3 Cluster 4

Application Application Application Application

Application Application

Cluster Manager / Orchestration Engine

Page 9: Getting started with kubernetes

What is Kubernetes?

● Kubernetes is inspired from an internal Google project called Borg● Open source project managed by the Linux Foundation● Unified API for deploying web applications, batch jobs, and databases● Decouples applications from machines through containers● Declarative approach to deploying applications● Automates application configuration through service discovery● Maintains and tracks the global view of the cluster● APIs for deployment workflows

○ Rolling updates, canary deploys, and blue-green deployments

Page 10: Getting started with kubernetes

Kubernetes Architecture

KubernetesMaster

Node 1API

UI

CLI

Node 2

Node n

Node 3

Registry

Page 11: Getting started with kubernetes

Configuring Kubernetes Environment

● Minikube○ Simplest way to get Kubernetes cluster up and running○ Supports Microsoft Windows and Mac OS X

● Kubernetes Multi-Node Cluster○ Emulates production environment○ Good for testing advanced scenarios

● Google Container Engine○ Hosted and managed by Google○ Powered by Google Compute Engine

Page 12: Getting started with kubernetes

Getting Started with Minikube

● Install Oracle VirtualBox for Mac● Install Docker Toolbox for Mac● Install Docker Version Manager● Install the latest version of Minikube for Mac OS X● Download the latest version of kubectl from this link● Run the following commands from the directory where kubectl is downloaded

○ chmod +x ./kubectl○ sudo mv kubectl /usr/local/bin

● Launch minikube with the following command:○ minikube start –-vm-driver=virtualbox

● Test minikube installation with the following commands○ minikube status○ kubectl get cs

Page 13: Getting started with kubernetes

DemoInstalling and Configuring Minikube

Page 14: Getting started with kubernetes

Kubernetes Terminology

● Nodes○ Hosts that run Kubernetes applications

● Containers○ Units of packaging

● Pods○ Units of deployment

● Replication Controller○ Ensures availability and scalability

● Labels○ Key-Value pairs for identification

● Services○ Collection of pods exposed as an endpoint

Page 15: Getting started with kubernetes

DemoExploring Kubernetes Environment

Deploying Your First Application

Page 16: Getting started with kubernetes

Summary

● Kubernetes manages containerized workloads running in production● An open source, community-driven project started by Google● Kubernetes has a master and multiple worker nodes● Clients interact with the master through REST API● Kubernetes API has objects - Pod, Replication Controller, Service etc.● Minikube is the simplest way to get started with Kubernetes● Detailed walkthrough is available at The New Stack● Scripts and source code for demos shown is available on Github

Page 17: Getting started with kubernetes

Upcoming WebinarKubernetes Architecture 1019 AM PST, 29th September

Join us to learn the concepts of Pods, Replication Controllers, Services, storage choices, and networking options. We will also walk you through the process of deploying and scaling microservices applications. Each attendee gets $100 credit to start using Google Container Engine.

Register at kubernetes.live for the upcoming webinars

Page 18: Getting started with kubernetes

Thank You!Send your Feedback / Questions / Comments [email protected]