kubernetes - an architectural deep dive · inside kubernetes an architectural deep dive anthony e....

21
Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino [email protected]

Upload: others

Post on 09-Sep-2019

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

Inside KubernetesAn Architectural Deep Dive

Anthony E. [email protected]

Page 2: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

Anthony E. Nocentino• Consultant and Trainer

• Founder and President of Centino Systems

• Specialize in system architecture and performance

• Masters Computer Science

• Microsoft MVP - Data Platform - 2017 - 2018

• Linux Foundation Certified Engineer

• Friend of Redgate - 2015-2019

• email: [email protected]

• Twitter: @nocentino

• Blog: www.centinosystems.com/blog

• Pluralsight Author: www.pluralsight.com

Page 3: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

Agenda

• What is Kubernetes

• Kubernetes API Objects

• Exploring Kubernetes Architecture

• Deploying Applications

• Production Ready Clusters

Page 4: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

What is Kubernetes?

• Container Orchestrator

• Infrastructure Abstraction

• Desired State

Page 5: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

Kubernetes API

• API Objects - Represent resources in your system

• Pods - your container based applications

• Controllers - maintain desired state

• Services - persistent access to your apps

• Storage - persistent storage for your data

• …and more

Page 6: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

Kubernetes Cluster

Web 1

SQL Web 2

Caching

Cluster

Page 7: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

Exploring Kubernetes Architecture

Master

API Server

Cluster Store

Scheduler

Controller Manager

Kubelet

Kube-proxy

Container Runtime

Node

kubectl

Page 8: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

PodPod

Pod

kubectl

Pod

API Server

Cluster Store

Scheduler

Controller Manager

Kubelet

Kube-proxy

Container Runtime

Master

Node

Kubelet

Kube-proxy

Container Runtime

Node

Controller Operations - ReplicaSet

Page 9: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

PodPod

Pod

Pod HTTP

Cluster Service

Pod

XServices

ReplicaSet

Page 10: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

Pod v1 HTTP

Cluster Service

Controller Operations - Deployment

Pod v1

Pod v2 Pod v2

ReplicaSet

ReplicaSet

Page 11: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

Deploying Applications

• Imperative

• Declarative

• YAML and JSON

Page 12: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

Declarative Deployment - Manifests

apiVersion: v1kind: Podmetadata: name: nginx-podspec: containers: - name: nginx image: nginx ports: - containerPort: 80

kubectl apply -f nginx.yaml

Page 13: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

Application Deployment Process

Pod

kubectlMaster

AP

I Server

Cluster Store

Scheduler

Controller Manager

Kubelet

Kube-proxy

Container Runtime

Node

apply

Page 14: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

TCP/1433

Cluster

ReplicaSet

Service

Decoupling Data and Computation

SQL v1

SQL v2 ReplicaSet

Storage

Page 15: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

Demo!

• Deploying SQL Server in a Deployment with Persistent Storage

• Recovery Scenario

• Upgrading SQL Server

kubectl

API Server

Cluster Store

Scheduler

Controller Manager

Kubelet

Kube-proxy

Container Runtime

Master

Node

Page 16: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

Building Production Ready Clusters

• Scalability - number of Nodes

• Intra-cluster communication patterns (Network connectivity)

• High Availability

• API Server - Load Balanced

• etcd - Multiple Replicas

• Disaster Recovery

• etcd Backups

• Persistent Volumes

Page 17: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

From: https://docs.microsoft.com/en-us/sql/big-data-cluster/big-data-cluster-overview?view=sqlallproducts-allversions

Page 18: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

Review

• What is Kubernetes

• Kubernetes API Objects

• Exploring Kubernetes Architecture

• Deploying Applications

• Production Ready Clusters

Page 19: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

More Resources• Docker for Windows/Mac

• Minikube

• Managed Service Providers

• Azure Kubernetes Service (AKS)

• https://docs.microsoft.com/en-us/azure/aks/kubernetes-walkthrough

• Elastic Container Service for Kubernetes (EKS)

• https://aws.amazon.com/getting-started/projects/deploy-kubernetes-app-amazon-eks/

• Google Kubernetes Engine (GKE)

• https://cloud.google.com/kubernetes-engine/docs/how-to/

• Pluralsight! - Kubernetes Installation and Configuration Fundamentals

• https://app.pluralsight.com/profile/author/anthony-nocentino

Page 20: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

Need more data or help?http://www.centinosystems.com/blog/talks/

Links to resources Demos

Presentation Pluralsight

[email protected]@nocentino

www.centinosystems.com

Solving tough business challenges with technical innovation

Page 21: Kubernetes - An Architectural Deep Dive · Inside Kubernetes An Architectural Deep Dive Anthony E. Nocentino aen@centinosystems.com

Thank You!