KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable)...
Transcript of KUBERNETES - DeveloperMarch...Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable)...
© 2017 Mesosphere, Inc. All Rights Reserved.
KUBERNETES
© 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
© 2017 Mesosphere, Inc. All Rights Reserved.
● What is Kubernetes?● Integration with DC/OS
Agenda
© 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?
© 2017 Mesosphere, Inc. All Rights Reserved.
clustering technology which provides a uniform platform for application deployment.
What is K8S
© 2017 Mesosphere, Inc. All Rights Reserved.
KUBERNETES ARCHITECTURE
© 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
© 2017 Mesosphere, Inc. All Rights Reserved.
●Etcd●API Server●Controller Manager Service●Scheduler Service
Master Node
© 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
© 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
© 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
© 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
© 2017 Mesosphere, Inc. All Rights Reserved.
●Etcd●API Server●Controller Manager Service●Scheduler Service
Master Node
© 2017 Mesosphere, Inc. All Rights Reserved.
●Docker●Kubelet Service●Proxy Service
Node
© 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
© 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
© 2017 Mesosphere, Inc. All Rights Reserved.
●process forwards requests to the correct containers●primitive load balancing
Proxy Service
© 2017 Mesosphere, Inc. All Rights Reserved.
●Docker●Kubelet Service●Proxy Service
Node
© 2017 Mesosphere, Inc. All Rights Reserved.
KUBERNETES ARCHITECTURE
© 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
© 2017 Mesosphere, Inc. All Rights Reserved.
Pods
© 2017 Mesosphere, Inc. All Rights Reserved.
Services
© 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
© 2017 Mesosphere, Inc. All Rights Reserved. �24
DC/OS Kubernetes Integration
© 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
© 2018 Mesosphere, Inc. All Rights Reserved. �26
Default Setup
© 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
© 2018 Mesosphere, Inc. All Rights Reserved. �28
Networking in Kubernetes on DC/OS
© 2018 Mesosphere, Inc. All Rights Reserved. �29
© 2018 Mesosphere, Inc. All Rights Reserved. �30
© 2018 Mesosphere, Inc. All Rights Reserved. �31
© 2018 Mesosphere, Inc. All Rights Reserved. �32
© 2018 Mesosphere, Inc. All Rights Reserved. �33
© 2018 Mesosphere, Inc. All Rights Reserved. �34
© 2018 Mesosphere, Inc. All Rights Reserved. �35
© 2018 Mesosphere, Inc. All Rights Reserved. �36
© 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
#kubercon#kubercon
Kubernetes on DCOS
DCOSGoogle Container Engine
Cloud On-premise & hybrid
© 2017 Mesosphere, Inc. All Rights Reserved.
● Kubernetes will then be available as a Universe package● `dcos package install kubernetes`
Integration with DC/OS
© 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
© 2017 Mesosphere, Inc. All Rights Reserved.
Thank You!
© 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