(session #2) triangle kubernetes meetupfiles.meetup.com/19519977/triangle kubernetes session...

Post on 19-Jun-2020

43 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

From Beginner to Expert

Triangle Kubernetes Meetup

(Session #2)

Who We Are?

2

Randy Tuttle

Co-Founder and CTO

Cloud Perceptions

email: rtuttle@cloudperceptions.com

@randyttl

SP VoIP, SP Video

OpenStacker since Folsom Release

OpenStack Austin Speaker

Triangle Kubernete Meetup Organizer

www.cloudperceptions.com

blog.cloudperceptions.com

Shixiong Shang

Founder and CEO

CloudPerceptions

email: shshang@cloudperceptions.com

@shshang

CCIE R&S, SP Video

OpenStacker since Folsom Release

OpenStack Vancouver/Austin Speaker

Triangle Kubernete Meetup Organizer

• Introduce Kubernetes to local community (sharing knowledge, expertise)

• Stir up interest to use Kubernetes (products, solutions)

• Create a social platform (talents and business opportunities)

But…

• Stay vendor agnostic

What Do We Try To Achieve?

3

• Kubernetes KnowledgeKey ConceptsArchitectures and Architecture Deep DiveHands-on (Installation and Configuration, CLI, API)DemoRoadmap

What Is Our Plan?

4

• Kubernetes Experience

Vendors (WeaveWorks, Red Hat OpenShift, Nuage Network, etc.)

Integrators (CloudPerceptions, etc.)

Users (YOU!)

Join us! Chime in (ideas, topics, speakers, food, refreshment, etc.) !!

** Some content courtesy of Mandy Waite @tekgrrl @googlecloud #kubernetes

Kubernetes

Everything at Google runs in containers:

• Gmail, Web Search, Maps, ...• MapReduce, batch, ...• GFS, Colossus, ...• Even Google’s Cloud Platform: VMs run

in containers!

We launch over 2 billion containers per week

History of Kubernetes

Greek for “Helmsman”; also the root of the words “governor” and “cybernetic”

• Runs and manages containers

• Inspired and informed by Google’s experiences and internal systems

• Supports multiple cloud and bare-metal environments

• Supports multiple container runtimes

• 100% Open source, written in Go

Manage applications, not machines

(BORG) Developer View

(BORG) Developer View

@tekgrrl @googlecloud #kubernetes

Key Concepts

Concepts Intro

New Way: Containers

Fast application deployment

Portable

Sharable

Version control and reuse

Small footprint

The atom of scheduling for containers

Represents an application specific logical host

Hosts containers and volumes

Each has its own routable (no NAT) IP addressEphemeral

• Pods are functionally identical and therefore ephemeral and replaceable

Pod

Web Server

Volume

Consumers

A pod of whales containers

Pods

Pod

GitSynchronizer

Node.js App Container

Volume

Consumersgit RepoCan be used to group multiple containers & shared volumes

Containers within a pod are tightly coupled

Shared namespaces• Containers in a pod share IP, port and IPC

namespaces• Containers in a pod talk to each other through

localhost

Replication Controller

Pod Pod

frontend

Pod

frontend

Pod Pod

Replication Controller

#pods = 1version = v2

show: version = v2

version= v1 version = v1 version = v2

Replication Controller

#pods = 2version = v1

show: version = v2 Behavior Benefits● Keeps Pods running

● Gives direct control of Pod #s

● Grouped by Label Selector

➔ Recreates Pods, maintains desired state

➔ Fine-grained control for scaling

➔ Standard grouping semantics

Replication Controllers

Replication Controllers

Canonical example of control loops

Have one job: ensure N copies of a podif too few, start new ones

if too many, kill some

group == selector

Replicated pods are fungibleNo implied order or identity

Replication Controller- Name = “backend”- Selector = {“name”: “backend”}- Template = { ... }- NumReplicas = 4

API Server

3

Start 1 more

OK 4

How many?

How many?

Client

Pod

Container

Pod

Container

Pod

ContainerContainer

A logical grouping of pods that perform the same function• Grouped by label selector

Load balances incoming requests across constituent podsChoice of pod is random but supports session affinity (ClientIP)

Gets a stable virtual IP and port• also a DNS nametype = FE

Services

Service

Label selector: type = FE

VIP

type = FE type = FE type = FE

Pod Pod

frontend

Pod

frontend

Pod Pod

type = FEversion = v2

type = FE version = v2

● Metadata with semantic meaning

● Membership identifier

● The only Grouping Mechanism

Behavior Benefits➔ Allow for intent of many users (e.g. dashboards)

➔ Build higher level systems …

➔ Queryable by Selectors

Labels

Dashboard

selector: type = FE

Dashboard

selector: version = v2

Bound to the Pod that encloses itLook like Directories to ContainersWhat and where they are determined by Volume TypeMany Volume options● EmptyDir● HostPath● nfs (and similar services)● Cloud Provider Block Storage

Volumes

Pod

Architecture

Kubernetes High-Level Architecture*

* from “Self-heal Your OpensStack Control Plane” presentation

Thank You

K8s Master

API Server

Dash Board

scheduler

Kubelet Kubelet Kubelet Kubelet

Container Registry

etcdControllers

web browserskubectl web browsers

Config file

Image

top related