KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable)...

43
© 2017 Mesosphere, Inc. All Rights Reserved. KUBERNETES

Transcript of KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable)...

Page 1: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

KUBERNETES

Page 2: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2016 Mesosphere, Inc. All Rights Reserved. �2

Ken SipeDistribute Application Engineer

Apache Mesos ContributorApache Committer Myriad, Open DCOS

Developer: Embedded, C++, Java, Groovy, Grails, C#, GoLang

@KenSipe

Page 3: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

● What is Kubernetes?● Integration with DC/OS

Agenda

Page 4: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

●“Kubernetes is an open source system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications.”

●Optimized for microservices-based web applications.

What is Kubernetes?

Page 5: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

clustering technology which provides a uniform platform for application deployment.

What is K8S

Page 6: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

KUBERNETES ARCHITECTURE

Page 7: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

Kubernetes Component

Role DC/OS Component

etcd Distributed key/value store Zookeeper

kube-apiserver Central API server to interact with the cluster components

kube-controller-manager

Reconciles scale events for fault tolerant objects (e.g. Replication Controllers)

kube-scheduler Schedules containers on the various worker nodes Marathon

kubelet Agent running on each worker. Serves as an init daemon to start containers

Mesos Agent

kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster

Minuteman

kubectl CLI to interact with the cluster, and deploy containers dcos CLI

Kubernetes Components and Analogies

Page 8: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

●Etcd●API Server●Controller Manager Service●Scheduler Service

Master Node

Page 9: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

● store configuration data that can be used by each of the nodes in the cluster● simple HTTP/JSON API, the interface for setting or retrieving values●configured on a single master server or, in production scenarios, distributed among a number of machines.●The only requirement is that it be network accessible to each of the Kubernetes machines.

EtcD

Page 10: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

●main management point of the entire cluster●makes sure that the etcd store and the service details of deployed containers are in agreement●bridge between various components to maintain cluster health ●disseminate information and commands

API Server

Page 11: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

●Manages all the controllers●Reads config changes and enacts on them●Ex. replication controller ensures that the number of replicas defined for a service

Controller Manager

Page 12: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

● process that actually assigns workloads to specific nodes in the cluster●tracking resource utilization on each host

Schedule Service

Page 13: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

●Etcd●API Server●Controller Manager Service●Scheduler Service

Master Node

Page 14: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

●Docker●Kubelet Service●Proxy Service

Node

Page 15: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

●Each unit of work is implemented as a series containers that must be deployed●One key assumption that Kubernetes makes is that a dedicated subnet is available to each node server. ●ex. CoreOS flannel

Docker

Page 16: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

●main contact point for each node●relay information to and from the control plane services●Communicates with master components to receive commands “Manifests”●Takes ownership of work on node

Kubelet Service

Page 17: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

●process forwards requests to the correct containers●primitive load balancing

Proxy Service

Page 18: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

●Docker●Kubelet Service●Proxy Service

Node

Page 19: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

KUBERNETES ARCHITECTURE

Page 20: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

● Pods● Main object that encapsulates containers● Can contain many containers● One IP per pod● Containers can communicate over localhost

● Services● Provide load balancing solutions to pods● named, addressed, and load balanced group of pods

● Replication Controllers● Responsible over maintaining a desired number of copies● pod lifecycle manager● Analogous to Auto-Scale Groups in AWS

Kubernetes Work Units

Page 21: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

Pods

Page 22: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

Services

Page 23: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

● Labels● arbitrary tag that can be placed on the work units (pods and svc)●  key-value pairs● Commonly used to mark them as a part of a group● Using many labels can give you fine-grained control

Kubernetes Developer Topics

Page 24: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved. �24

DC/OS Kubernetes Integration

Page 25: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2018 Mesosphere, Inc. All Rights Reserved.

● Unaltered upstream Kubernetes, unlike OpenShift● Stand-alone Kubernetes clusters are exposed, not a PaaS using Kubernetes● Simple install onto a DC/OS cluster● Integration with DC/OS data services● HA and Secure by default in EE● Customers have choice between Marathon and Kubernetes

DC/OS Kubernetes

�25

Page 26: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2018 Mesosphere, Inc. All Rights Reserved. �26

Default Setup

Page 27: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2018 Mesosphere, Inc. All Rights Reserved. �27

● CNI - Container Networking Interface

● Spartan - DC/OS DNS server

● Minuteman - East-west loadbalancer

● Marathon-LB - North-South loadbalancer

Networking in DC/OS

Page 28: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2018 Mesosphere, Inc. All Rights Reserved. �28

Networking in Kubernetes on DC/OS

Page 29: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2018 Mesosphere, Inc. All Rights Reserved. �29

Page 30: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2018 Mesosphere, Inc. All Rights Reserved. �30

Page 31: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2018 Mesosphere, Inc. All Rights Reserved. �31

Page 32: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2018 Mesosphere, Inc. All Rights Reserved. �32

Page 33: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2018 Mesosphere, Inc. All Rights Reserved. �33

Page 34: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2018 Mesosphere, Inc. All Rights Reserved. �34

Page 35: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2018 Mesosphere, Inc. All Rights Reserved. �35

Page 36: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2018 Mesosphere, Inc. All Rights Reserved. �36

Page 37: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2015 Mesosphere, Inc.

Kubernetes on DCOS

• Collaboration between Mesosphere & Google

• Solution for large-scale and multi-service environments running mixed workloads

“Mesosphere provides fine-grained resource allocations for pods across nodes in a datacenter, and allows Kubernetes to share and manage resources with other frameworks running concurrently on the Mesosphere DCOS.” - Craig McLuckie, Google Product Manager

Container

MesosKubernetes

… Thousands of containers

Thousands of nodes

Common monitoring, alerting, & enterprise-grade security

Page 38: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

#kubercon#kubercon

Kubernetes on DCOS

DCOSGoogle Container Engine

Cloud On-premise & hybrid

Page 39: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

● Kubernetes will then be available as a Universe package● `dcos package install kubernetes`

Integration with DC/OS

Page 40: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

● Unaltered upstream Kubernetes, unlike OpenShift● Stand-alone Kubernetes clusters are exposed, not a PaaS using Kubernetes● Simple install onto a DC/OS cluster● Integration with DC/OS data services● HA and Secure by default in EE● Customers have choice between Marathon and Kubernetes

Points of Differentiation

Page 41: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

Thank You!

Page 42: KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with

© 2017 Mesosphere, Inc. All Rights Reserved.

WHY KUBERNETES ON DC/OS?

100 % Upstream Easy Operations Unified Platform for Containers + Data

● Unmodified, directly from source (unlike Redhat Openshift)

● One click Installation● High Availability● Security ● Networking Integration

(Overlay + Ingress + Load Balancing)

● One platform for containers traditional apps and data services

● Easily onboard developers ● Leverage and use

community resources and integrations

● Easily troubleshoot Kubernetes components

● Kubernetes-as-a-Service● Multiple Kubernetes instances

on the same DC/OS cluster

● Hybrid cloud mobility for your entire app

● Increased resource utilization● Unified operation experience