Cloud Native Fundamentals: Containers and for VI Admin€¦ · Defining and Exposing East-West...

16
1 Urbano Criola, VMware Karim Awan, VMware #vFORUMAU Cloud Native Fundamentals: Containers and Kubernetes 101 for VI Admin

Transcript of Cloud Native Fundamentals: Containers and for VI Admin€¦ · Defining and Exposing East-West...

Page 1: Cloud Native Fundamentals: Containers and for VI Admin€¦ · Defining and Exposing East-West Services– Cluster IP RunningPod Tools, Libs, SW app: demo-app-ui tier: frontend 172.16.4.2

1

Urbano Criola, VMwareKarim Awan, VMware

#vFORUMAU

Cloud Native Fundamentals: Containers and Kubernetes 101for VI Admin

Page 2: Cloud Native Fundamentals: Containers and for VI Admin€¦ · Defining and Exposing East-West Services– Cluster IP RunningPod Tools, Libs, SW app: demo-app-ui tier: frontend 172.16.4.2

Disclaimer

This presentation may contain product features or functionality that are currently under development.

This overview of new technology represents no commitment from VMware to deliver these features in any generally available product.

Features are subject to change, and must not be included in contracts, purchase orders, or sales agreements of any kind.

Technical feasibility and market demand will affect final delivery.

Pricing and packaging for any new features/functionality/technology discussed or presented, have not been determined.

This information is confidential.

The information in this presentation is for informational purposes only and may not be incorporated into any contract. There is no commitment or obligation

to deliver any items presented herein.

Page 3: Cloud Native Fundamentals: Containers and for VI Admin€¦ · Defining and Exposing East-West Services– Cluster IP RunningPod Tools, Libs, SW app: demo-app-ui tier: frontend 172.16.4.2

Application

Operating System &

App Dependencies

PhysicalInfrastructure

Application

Operating System & App Dependencies

PhysicalInfrastructure

Containers and VMs – A Practical Comparison

App Dependencies

Compute | Net | Sec | Storage

OS Abstraction

Container Host OS

Container

Compute | Net | Sec | Storage

Lots of Day2

Work

Easier

Ubiquitous

Ubiquitous

Configuration Management

Page 4: Cloud Native Fundamentals: Containers and for VI Admin€¦ · Defining and Exposing East-West Services– Cluster IP RunningPod Tools, Libs, SW app: demo-app-ui tier: frontend 172.16.4.2

Container Registry

Repo for Container Images

Anatomy of Building and Running a Container (NGINX on Alpine)

FROM nginx:alpine

EXPOSE 80

COPY . /nginx/html

DockerEngine

#docker build#docker push

#docker run vmworld-demo

Dockerfile

Packaging the App with its Dependencies

= Portability & Consistency

VM

Running Container

Page 5: Cloud Native Fundamentals: Containers and for VI Admin€¦ · Defining and Exposing East-West Services– Cluster IP RunningPod Tools, Libs, SW app: demo-app-ui tier: frontend 172.16.4.2

Initial Running of Containers

Running Container

Tools, Libs, SW

Running Container

Tools, Libs, SW

Running Container

Tools, Libs, SW

RedisDB

Running Container

Tools, Libs, SW

$docker run container_redis

$docker run container_web

$docker run container_web

$docker run container_DB

Docker Host

This model of container scheduling:• Manual• Limited fault tolerance• Difficult to scale/upgrade, etc. • Limited tie-in to tangential

services ( LB, security policy, etc.)

RunningContainer

Tools, Libs, SW

Wanted:

Container Orchestrator!

Page 6: Cloud Native Fundamentals: Containers and for VI Admin€¦ · Defining and Exposing East-West Services– Cluster IP RunningPod Tools, Libs, SW app: demo-app-ui tier: frontend 172.16.4.2

Move the Focus to the Application

Core Kubernetes Functions• Declarative deployment model

for container based applications• Scale applications on the fly• Restart, replace and reschedule

containers • API-Driven consumption of

infrastructure mappings for applications

Kubernetes is an open-source system for automating deployment, scaling and management of containerized applications.

The “App”

Page 7: Cloud Native Fundamentals: Containers and for VI Admin€¦ · Defining and Exposing East-West Services– Cluster IP RunningPod Tools, Libs, SW app: demo-app-ui tier: frontend 172.16.4.2

P1R3 P2R2 P2R2 P1R2

P1R2 P2R1 P1R1

P1R1 P2R1 P1R1P2R1App_X.yaml

ContainerImage1

Replicas: 3

ContainerImage2Replicas: 2

Container Cluster = “Desired State Management”• Kubernetes Cluster Services (w/API)

Node = Container Host w/agent called “Kubelet”

Application Deployment File = Configuration File of desired state

Container Image = Runs in a Pod (~1:1)

Replicas = Copies of Pods that must be running

Kubernetes 101 at the Highest Level

Node

Node

Node

Kubernetes Cluster

Services

(Master & etcd nodes)

API

K

K

K

App_Y.yaml

ContainerImage1

Replicas: 1

ContainerImage2Replicas: 2

VMsVM

VM

VM

Page 8: Cloud Native Fundamentals: Containers and for VI Admin€¦ · Defining and Exposing East-West Services– Cluster IP RunningPod Tools, Libs, SW app: demo-app-ui tier: frontend 172.16.4.2

The Movement from Containers to Pods

A pod (as in a pod of whales or pea pod) is a group of one or more containers

The Concept of a “Side Car”• Differentiated v Non-Differentiated Code

Containers within a pod share an IP address and port space, and can find each other via localhost

Containers in a Pod also share the same data volumes

Pods are considered to be ephemeral

The Kubernetes “Pod”

Container 2

Tools, Libs, SW

Container 1

Tools, Libs, SW

172.16.4.2

Page 9: Cloud Native Fundamentals: Containers and for VI Admin€¦ · Defining and Exposing East-West Services– Cluster IP RunningPod Tools, Libs, SW app: demo-app-ui tier: frontend 172.16.4.2

Labels

A Label is a key/value pair attached to Pods and convey user-defined attributes.

You can then use selectors to select Pods with particular Labels and apply them to various attributes Services or Replication Controllers

Labels can be attached to objects at creation time and subsequently added and modified at any time

The Kubernetes “Pod”

Container 2

Tools, Libs, SW

Container 1

Tools, Libs, SW

Tier = frontend

App = vmworld-demo-app

Deployment = prod

Page 10: Cloud Native Fundamentals: Containers and for VI Admin€¦ · Defining and Exposing East-West Services– Cluster IP RunningPod Tools, Libs, SW app: demo-app-ui tier: frontend 172.16.4.2

Deployments

harbor.flhrnet.local

Frontend-ui :1

Running Pod

Tools, Libs, SW

app: demo-app-ui

tier: frontend

Running Pod

Tools, Libs, SW

app: demo-app-ui

tier: frontend

Page 11: Cloud Native Fundamentals: Containers and for VI Admin€¦ · Defining and Exposing East-West Services– Cluster IP RunningPod Tools, Libs, SW app: demo-app-ui tier: frontend 172.16.4.2

Defining and Exposing East-West Services– Cluster IP

Running Pod

Tools, Libs, SW

app: demo-app-ui

tier: frontend

172.16.4.2 172.16.4.3

The need to identify and track Pods based on metadata, provide connectivity& service discovery (DNS, Env variables) for them.

ClusterIP (default) exposes service on a cluster-internal IP.

Running Pod

Tools, Libs, SW

app: demo-app-ui

tier: frontend

Service Selector: app = demo-app-ui, tier =

frontend

ClusterIP = 100.10.200.28

172.16.4.4

Running Pod

Tools, Libs, SW

app: demo-app-ui

tier: backend-db

Page 12: Cloud Native Fundamentals: Containers and for VI Admin€¦ · Defining and Exposing East-West Services– Cluster IP RunningPod Tools, Libs, SW app: demo-app-ui tier: frontend 172.16.4.2

Defining and Exposing North-South Services– Load Balancer

Running Pod

Tools, Libs, SW

app: demo-app-ui

tier: frontend

172.16.4.2 172.16.4.3

Type: LoadBalancer is used to configure a cloud provider’s load balancer using the cloud-controller-manager.

Running Pod

Tools, Libs, SW

app: demo-app-ui

tier: frontend

Service Selector: app = demo-app-ui, tier = frontend

ClusterIP = 100.10.200.28

192.168.100.10:80

Running Pod

Tools, Libs, SW

app: demo-app-ui

tier: backend-db

Page 13: Cloud Native Fundamentals: Containers and for VI Admin€¦ · Defining and Exposing East-West Services– Cluster IP RunningPod Tools, Libs, SW app: demo-app-ui tier: frontend 172.16.4.2

Defining and Exposing North-South Services– Ingress

Running Container

Tools, Libs, SW

app: demo-app-ui

tier: frontend

172.16.4.2 172.16.4.3

Running Container

Tools, Libs, SW

app: demo-app-ui

tier: frontend

Service Selector: app = demo-app-ui, tier = frontend

ClusterIP = 100.10.200.28

http://vmworld-demo.corp.local

A controller that manages an external entity to provide load balancing, SSL termination and name-based virtual hosting to services based on a set of rules.

Running Pod

Tools, Libs, SW

app: demo-app-ui

tier: backend-db

Page 14: Cloud Native Fundamentals: Containers and for VI Admin€¦ · Defining and Exposing East-West Services– Cluster IP RunningPod Tools, Libs, SW app: demo-app-ui tier: frontend 172.16.4.2

Persistence of Storage & Data

Running Pod

Tools, Libs, SW

app: demo-app-ui

tier: frontend

172.16.4.2 172.16.4.3

Running Pod

Tools, Libs, SW

app: demo-app-ui

tier: frontend

Service Selector: app = demo-app-ui, tier = frontend

ClusterIP = 100.10.200.28

Running Pod

Tools, Libs, SW

app: demo-app-ui

tier: backend-dbStorage System

postgres

Page 15: Cloud Native Fundamentals: Containers and for VI Admin€¦ · Defining and Exposing East-West Services– Cluster IP RunningPod Tools, Libs, SW app: demo-app-ui tier: frontend 172.16.4.2

1

Thank You!

#vFORUMAU

Page 16: Cloud Native Fundamentals: Containers and for VI Admin€¦ · Defining and Exposing East-West Services– Cluster IP RunningPod Tools, Libs, SW app: demo-app-ui tier: frontend 172.16.4.2

#vFORUMAU

#vFORUMAU @VMwareAU

Join the conversation