SlideShare a Scribd company logo
1 of 21
Download to read offline
Running Kubernetes
Adam Hamsik
DevOps/Cloud Engineer
www.pixelfederation.com
Kubernetes deployment on AWS
TL;DR Summary
- Kubernetes deployment tools
- Kubernetes infrastructure components
- Pods, Services, Endpoints
- Workloads
• Deployments, Stateful sets, Replica Sets
- Demo
www.pixelfederation.com
1. Running Kubernetes version 1.9 on AWS
2. Deployed with Kops and Terraform
3. If possible we use managed services (RDS, Elasticache)
a. Better performance, easier to manage
4. Prometheus/Grafana used for monitoring
5. Elk stack for log gathering
Kubernetes deployment on AWS
Kubernetes @ Pixel
www.pixelfederation.com
Kubernetes deployment on AWS
Kubernetes deployment tools
Multiple available alternatives for kubernetes
deployment
1. Kops (AWS, GCE, digitalocean)
a. Automated deployment (Go binary orchestrating deployment)
2. Kube-up
a. Shell script
3. Kubespray
a. Automated deployment using ansible
4. Kubeadm
www.pixelfederation.com
Kubernetes deployment on AWS
Using Kops for Kubernetes Deployment
1. Cloud Architecture
a. Kops can create cloud components or it can generate Terraform templates
b. Cluster nodes are managed as cattle(immutable deployment)
2. Highly available deployment
a. Masters/Nodes running in multiple AZs
b. ASGs used to make sure we can detect/heal from server failure
3. Cluster Updates
a. Rolling update for cluster without outage
i. User-data script is used for kubernetes installation
www.pixelfederation.com
Kubernetes deployment on AWS
Kubernetes AWS architecture
www.pixelfederation.com
Kubernetes deployment on AWS
Kubernetes Components
1. Kubernetes master
a. Kubernetes-api
b. Kubernetes-scheduler
i. Scheduling pods in cluster, finds proper node for placement
(affinity/anti-affinity)
c. Etcd
i. Kubernetes datastore
d. networking CNI
2. Node
a. Docker/RKT/Container engine
b. Kubelet
i. Monitors Running Containers (health-checks)
c. Kube-proxy
i. Makes sure we can reach services/pods with traffic
www.pixelfederation.com
Kubernetes deployment on AWS
Kubernetes Components
www.pixelfederation.com
Kubernetes deployment on AWS
Kubernetes Components
www.pixelfederation.com
Addons
extend core Kubernetes functionality
1. External-dns
a. Create route53 dns entries based on kubernetes services
2. Cluster-autoscaler
a. Scale cluster nodes based on scheduler events
3. Prometheus
a. Monitor kubernetes cluster and applications running in it
Kubernetes deployment on AWS
Kubernetes Addons
www.pixelfederation.com
1. Trust your health-checks
a. liveness / readiness
2. Stateless applications
a. Sharing data between pods complicates cluster architecture
b. Sticky sessions possible, but problematic
3. One process per container
a. Use sidecar containers if needed
4. Scaling
a. Scale apps with HPA (Add pods based on cpu/mem metrics)
b. Scale cluster with cluster-autoscaler (Add nodes based on scheduler events)
Kubernetes deployment on AWS
Running applications on Kubernetes
www.pixelfederation.com
1. Use ingress controllers (traefik, nginx, haproxy, AWS ALB)
a. Cost effective solution for traffic proxy
b. Can forward different paths to different services
c. Use multiple ingress controllers for different types of traffic
2. Plan your updates native support for
a. Recreate
b. Rolling Update
c. Blue/Green,Canary,A/B needs to be scripted
3. Package your manifests with HELM
Kubernetes deployment on AWS
Running applications on Kubernetes vol. 2
www.pixelfederation.com
Kubernetes deployment on AWS
Application Pod with sidecar container
www.pixelfederation.com
1. Package manager for Kubernetes manifests
a. Client/Server deployment with server running inside Kubernetes
2. Use templates to develop reusable charts
a. Sharing charts is simple
3. Supports rollback to previous application versions
a. You can rollback to any application version installed before
4. Use hooks to manage/orchestrate complicated scenarios
Kubernetes deployment on AWS
Kubernetes Helm Package manager
www.pixelfederation.com
1. Pods
a. group of one or more containers running on a same physical host
2. Services
a. A Kubernetes Service is an abstraction which defines a logical set of
Pods and a policy by which to access them
b. Use selectors/labels to select right pods
3. Deployments, Stateful sets, Daemon Sets
a. Abstractions with different properties managing lifecycle and deployment of
pods
Kubernetes deployment on AWS
Kubernetes Service objects
www.pixelfederation.com
Kubernetes deployment on AWS
Kubernetes application architecture
www.pixelfederation.com
Kubernetes deployment on AWS
Questions ?
www.pixelfederation.com
Kubernetes deployment on AWS
Thanks !
ahamsik@pixelfederation.com
www.pixelfederation.com
Encapsulation based CNI
1. Flannel
2. Weave Net
Routing based CNI
1. Project Calico
2. Kube-router
3. amazon-vpc-cni-k8s
Kubernetes deployment on AWS
Kubernetes networking
www.pixelfederation.com
Kubernetes deployment on AWS
Kubernetes networking flannel
www.pixelfederation.com
1. Routing based CNI
a. Using BGP to share IP routes to pods/services
b. No traffic encapsulation/decapsulation
c. Scalable
d. Simple
e. Fine grained security policies
Kubernetes deployment on AWS
Kubernetes networking calico

More Related Content

What's hot

Aws + kubernetes = ❤︎
Aws + kubernetes = ❤︎Aws + kubernetes = ❤︎
Aws + kubernetes = ❤︎Anthony Stanton
 
How we Auto Scale applications based on CPU with Kubernetes at M6Web?
 How we Auto Scale applications based on CPU with Kubernetes at M6Web? How we Auto Scale applications based on CPU with Kubernetes at M6Web?
How we Auto Scale applications based on CPU with Kubernetes at M6Web?Vincent Gallissot
 
Optimizing Kubernetes deployments with Helm
Optimizing Kubernetes deployments with HelmOptimizing Kubernetes deployments with Helm
Optimizing Kubernetes deployments with Helmerwindeg
 
DevOps: Kubernetes + Helm with Azure
DevOps: Kubernetes + Helm with AzureDevOps: Kubernetes + Helm with Azure
DevOps: Kubernetes + Helm with AzureJessica Deen
 
Autoscaling Kubernetes
Autoscaling KubernetesAutoscaling Kubernetes
Autoscaling Kubernetescraigbox
 
DevOps with Kubernetes and Helm - OSCON 2018
DevOps with Kubernetes and Helm - OSCON 2018DevOps with Kubernetes and Helm - OSCON 2018
DevOps with Kubernetes and Helm - OSCON 2018Jessica Deen
 
Kubernetes Kops - Automation Night
Kubernetes Kops - Automation NightKubernetes Kops - Automation Night
Kubernetes Kops - Automation NightKasper Nissen
 
Kubernetes Operations (KOPS)
Kubernetes Operations (KOPS)Kubernetes Operations (KOPS)
Kubernetes Operations (KOPS)Jakir Patel
 
Kubernetes on AWS gone wild
Kubernetes on AWS gone wildKubernetes on AWS gone wild
Kubernetes on AWS gone wildChristian Jantz
 
Automating Canary Deployments with Weaveworks Flagger and Aspen Mesh
Automating Canary Deployments with Weaveworks Flagger and Aspen MeshAutomating Canary Deployments with Weaveworks Flagger and Aspen Mesh
Automating Canary Deployments with Weaveworks Flagger and Aspen MeshWeaveworks
 
Training TensorFlow Models at Scale with Kubernetes on Azure
Training TensorFlow Models at Scale with Kubernetes on AzureTraining TensorFlow Models at Scale with Kubernetes on Azure
Training TensorFlow Models at Scale with Kubernetes on AzureRita Zhang
 
Deploying and scaling kubernetes using Rancher CNCF meetup June 2017
Deploying and scaling kubernetes using Rancher CNCF meetup June 2017Deploying and scaling kubernetes using Rancher CNCF meetup June 2017
Deploying and scaling kubernetes using Rancher CNCF meetup June 2017Sebastiaan van Steenis
 
Introduction to EKS and eksctl
Introduction to EKS and eksctlIntroduction to EKS and eksctl
Introduction to EKS and eksctlWeaveworks
 
Kubernetes in Azure
Kubernetes in AzureKubernetes in Azure
Kubernetes in AzureKarl Ots
 

What's hot (19)

Aws + kubernetes = ❤︎
Aws + kubernetes = ❤︎Aws + kubernetes = ❤︎
Aws + kubernetes = ❤︎
 
How we Auto Scale applications based on CPU with Kubernetes at M6Web?
 How we Auto Scale applications based on CPU with Kubernetes at M6Web? How we Auto Scale applications based on CPU with Kubernetes at M6Web?
How we Auto Scale applications based on CPU with Kubernetes at M6Web?
 
Optimizing Kubernetes deployments with Helm
Optimizing Kubernetes deployments with HelmOptimizing Kubernetes deployments with Helm
Optimizing Kubernetes deployments with Helm
 
DevOps: Kubernetes + Helm with Azure
DevOps: Kubernetes + Helm with AzureDevOps: Kubernetes + Helm with Azure
DevOps: Kubernetes + Helm with Azure
 
Serverless on Kubernetes
Serverless on KubernetesServerless on Kubernetes
Serverless on Kubernetes
 
Autoscaling Kubernetes
Autoscaling KubernetesAutoscaling Kubernetes
Autoscaling Kubernetes
 
DevOps with Kubernetes and Helm - OSCON 2018
DevOps with Kubernetes and Helm - OSCON 2018DevOps with Kubernetes and Helm - OSCON 2018
DevOps with Kubernetes and Helm - OSCON 2018
 
Kubernetes Kops - Automation Night
Kubernetes Kops - Automation NightKubernetes Kops - Automation Night
Kubernetes Kops - Automation Night
 
Kubernetes Operations (KOPS)
Kubernetes Operations (KOPS)Kubernetes Operations (KOPS)
Kubernetes Operations (KOPS)
 
Kubernetes on AWS gone wild
Kubernetes on AWS gone wildKubernetes on AWS gone wild
Kubernetes on AWS gone wild
 
Kubernetes in AWS
Kubernetes in AWSKubernetes in AWS
Kubernetes in AWS
 
AKS
AKSAKS
AKS
 
Automating Canary Deployments with Weaveworks Flagger and Aspen Mesh
Automating Canary Deployments with Weaveworks Flagger and Aspen MeshAutomating Canary Deployments with Weaveworks Flagger and Aspen Mesh
Automating Canary Deployments with Weaveworks Flagger and Aspen Mesh
 
Why Kubernetes on Azure
Why Kubernetes on AzureWhy Kubernetes on Azure
Why Kubernetes on Azure
 
Roman Gorshunov - Airship project onboarding
Roman Gorshunov - Airship project onboardingRoman Gorshunov - Airship project onboarding
Roman Gorshunov - Airship project onboarding
 
Training TensorFlow Models at Scale with Kubernetes on Azure
Training TensorFlow Models at Scale with Kubernetes on AzureTraining TensorFlow Models at Scale with Kubernetes on Azure
Training TensorFlow Models at Scale with Kubernetes on Azure
 
Deploying and scaling kubernetes using Rancher CNCF meetup June 2017
Deploying and scaling kubernetes using Rancher CNCF meetup June 2017Deploying and scaling kubernetes using Rancher CNCF meetup June 2017
Deploying and scaling kubernetes using Rancher CNCF meetup June 2017
 
Introduction to EKS and eksctl
Introduction to EKS and eksctlIntroduction to EKS and eksctl
Introduction to EKS and eksctl
 
Kubernetes in Azure
Kubernetes in AzureKubernetes in Azure
Kubernetes in Azure
 

Similar to Adam Hamsik - Kubernetes

04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
04_Azure Kubernetes Service: Basic Practices for Developers_GAB201904_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019Kumton Suttiraksiri
 
Accelerate Application Innovation Journey with Azure Kubernetes Service
Accelerate Application Innovation Journey with Azure Kubernetes Service Accelerate Application Innovation Journey with Azure Kubernetes Service
Accelerate Application Innovation Journey with Azure Kubernetes Service WinWire Technologies Inc
 
Kubernetes on on on on on on on on on on on on on on Azure Deck.pptx
Kubernetes on on on on on on on on on on on on on on Azure Deck.pptxKubernetes on on on on on on on on on on on on on on Azure Deck.pptx
Kubernetes on on on on on on on on on on on on on on Azure Deck.pptxHectorSebastianMendo
 
Kubernetes VS. App Service: When the orchestrator challenges the platform
Kubernetes VS. App Service: When the orchestrator challenges the platformKubernetes VS. App Service: When the orchestrator challenges the platform
Kubernetes VS. App Service: When the orchestrator challenges the platformLorenzo Barbieri
 
Azure Kubernetes Service 2019 ふりかえり
Azure Kubernetes Service 2019 ふりかえりAzure Kubernetes Service 2019 ふりかえり
Azure Kubernetes Service 2019 ふりかえりToru Makabe
 
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...NETWAYS
 
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...NETWAYS
 
Kubernetes and bluemix
Kubernetes  and  bluemixKubernetes  and  bluemix
Kubernetes and bluemixDuckDuckGo
 
Running Containers on Azure
Running Containers on AzureRunning Containers on Azure
Running Containers on AzureNick Trogh
 
DevOps in AWS with Kubernetes
DevOps in AWS with KubernetesDevOps in AWS with Kubernetes
DevOps in AWS with KubernetesOleg Chunikhin
 
KUBERNETES AS A FRAMEWORK FOR WRITING DEVOPS & MICROSERVICES TOOLING
KUBERNETES AS A FRAMEWORK FOR WRITING DEVOPS & MICROSERVICES TOOLINGKUBERNETES AS A FRAMEWORK FOR WRITING DEVOPS & MICROSERVICES TOOLING
KUBERNETES AS A FRAMEWORK FOR WRITING DEVOPS & MICROSERVICES TOOLINGCodeOps Technologies LLP
 
aks_training_document_Azure_kuberne.pptx
aks_training_document_Azure_kuberne.pptxaks_training_document_Azure_kuberne.pptx
aks_training_document_Azure_kuberne.pptxWaseemShare
 
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and KubelessBuilding Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and KubelessBitnami
 
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)Amazon Web Services Korea
 
Kubernetes for .NET Developers
Kubernetes for .NET DevelopersKubernetes for .NET Developers
Kubernetes for .NET DevelopersLorenzo Barbieri
 
Kubernetes and Hybrid Deployments
Kubernetes and Hybrid DeploymentsKubernetes and Hybrid Deployments
Kubernetes and Hybrid DeploymentsSandeep Parikh
 

Similar to Adam Hamsik - Kubernetes (20)

04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
04_Azure Kubernetes Service: Basic Practices for Developers_GAB201904_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
 
Accelerate Application Innovation Journey with Azure Kubernetes Service
Accelerate Application Innovation Journey with Azure Kubernetes Service Accelerate Application Innovation Journey with Azure Kubernetes Service
Accelerate Application Innovation Journey with Azure Kubernetes Service
 
Kubernetes on on on on on on on on on on on on on on Azure Deck.pptx
Kubernetes on on on on on on on on on on on on on on Azure Deck.pptxKubernetes on on on on on on on on on on on on on on Azure Deck.pptx
Kubernetes on on on on on on on on on on on on on on Azure Deck.pptx
 
Managing containers at scale
Managing containers at scale          Managing containers at scale
Managing containers at scale
 
Openshift Workshop
Openshift Workshop Openshift Workshop
Openshift Workshop
 
Kubernetes VS. App Service: When the orchestrator challenges the platform
Kubernetes VS. App Service: When the orchestrator challenges the platformKubernetes VS. App Service: When the orchestrator challenges the platform
Kubernetes VS. App Service: When the orchestrator challenges the platform
 
Azure Kubernetes Service 2019 ふりかえり
Azure Kubernetes Service 2019 ふりかえりAzure Kubernetes Service 2019 ふりかえり
Azure Kubernetes Service 2019 ふりかえり
 
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...
 
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...
 
Kubernetes and bluemix
Kubernetes  and  bluemixKubernetes  and  bluemix
Kubernetes and bluemix
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Kubernetes Intro @HaufeDev
Kubernetes Intro @HaufeDev Kubernetes Intro @HaufeDev
Kubernetes Intro @HaufeDev
 
Running Containers on Azure
Running Containers on AzureRunning Containers on Azure
Running Containers on Azure
 
DevOps in AWS with Kubernetes
DevOps in AWS with KubernetesDevOps in AWS with Kubernetes
DevOps in AWS with Kubernetes
 
KUBERNETES AS A FRAMEWORK FOR WRITING DEVOPS & MICROSERVICES TOOLING
KUBERNETES AS A FRAMEWORK FOR WRITING DEVOPS & MICROSERVICES TOOLINGKUBERNETES AS A FRAMEWORK FOR WRITING DEVOPS & MICROSERVICES TOOLING
KUBERNETES AS A FRAMEWORK FOR WRITING DEVOPS & MICROSERVICES TOOLING
 
aks_training_document_Azure_kuberne.pptx
aks_training_document_Azure_kuberne.pptxaks_training_document_Azure_kuberne.pptx
aks_training_document_Azure_kuberne.pptx
 
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and KubelessBuilding Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
 
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
 
Kubernetes for .NET Developers
Kubernetes for .NET DevelopersKubernetes for .NET Developers
Kubernetes for .NET Developers
 
Kubernetes and Hybrid Deployments
Kubernetes and Hybrid DeploymentsKubernetes and Hybrid Deployments
Kubernetes and Hybrid Deployments
 

Recently uploaded

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Recently uploaded (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Adam Hamsik - Kubernetes

  • 2. www.pixelfederation.com Kubernetes deployment on AWS TL;DR Summary - Kubernetes deployment tools - Kubernetes infrastructure components - Pods, Services, Endpoints - Workloads • Deployments, Stateful sets, Replica Sets - Demo
  • 3. www.pixelfederation.com 1. Running Kubernetes version 1.9 on AWS 2. Deployed with Kops and Terraform 3. If possible we use managed services (RDS, Elasticache) a. Better performance, easier to manage 4. Prometheus/Grafana used for monitoring 5. Elk stack for log gathering Kubernetes deployment on AWS Kubernetes @ Pixel
  • 4. www.pixelfederation.com Kubernetes deployment on AWS Kubernetes deployment tools Multiple available alternatives for kubernetes deployment 1. Kops (AWS, GCE, digitalocean) a. Automated deployment (Go binary orchestrating deployment) 2. Kube-up a. Shell script 3. Kubespray a. Automated deployment using ansible 4. Kubeadm
  • 5. www.pixelfederation.com Kubernetes deployment on AWS Using Kops for Kubernetes Deployment 1. Cloud Architecture a. Kops can create cloud components or it can generate Terraform templates b. Cluster nodes are managed as cattle(immutable deployment) 2. Highly available deployment a. Masters/Nodes running in multiple AZs b. ASGs used to make sure we can detect/heal from server failure 3. Cluster Updates a. Rolling update for cluster without outage i. User-data script is used for kubernetes installation
  • 6. www.pixelfederation.com Kubernetes deployment on AWS Kubernetes AWS architecture
  • 7. www.pixelfederation.com Kubernetes deployment on AWS Kubernetes Components 1. Kubernetes master a. Kubernetes-api b. Kubernetes-scheduler i. Scheduling pods in cluster, finds proper node for placement (affinity/anti-affinity) c. Etcd i. Kubernetes datastore d. networking CNI 2. Node a. Docker/RKT/Container engine b. Kubelet i. Monitors Running Containers (health-checks) c. Kube-proxy i. Makes sure we can reach services/pods with traffic
  • 10. www.pixelfederation.com Addons extend core Kubernetes functionality 1. External-dns a. Create route53 dns entries based on kubernetes services 2. Cluster-autoscaler a. Scale cluster nodes based on scheduler events 3. Prometheus a. Monitor kubernetes cluster and applications running in it Kubernetes deployment on AWS Kubernetes Addons
  • 11. www.pixelfederation.com 1. Trust your health-checks a. liveness / readiness 2. Stateless applications a. Sharing data between pods complicates cluster architecture b. Sticky sessions possible, but problematic 3. One process per container a. Use sidecar containers if needed 4. Scaling a. Scale apps with HPA (Add pods based on cpu/mem metrics) b. Scale cluster with cluster-autoscaler (Add nodes based on scheduler events) Kubernetes deployment on AWS Running applications on Kubernetes
  • 12. www.pixelfederation.com 1. Use ingress controllers (traefik, nginx, haproxy, AWS ALB) a. Cost effective solution for traffic proxy b. Can forward different paths to different services c. Use multiple ingress controllers for different types of traffic 2. Plan your updates native support for a. Recreate b. Rolling Update c. Blue/Green,Canary,A/B needs to be scripted 3. Package your manifests with HELM Kubernetes deployment on AWS Running applications on Kubernetes vol. 2
  • 13. www.pixelfederation.com Kubernetes deployment on AWS Application Pod with sidecar container
  • 14. www.pixelfederation.com 1. Package manager for Kubernetes manifests a. Client/Server deployment with server running inside Kubernetes 2. Use templates to develop reusable charts a. Sharing charts is simple 3. Supports rollback to previous application versions a. You can rollback to any application version installed before 4. Use hooks to manage/orchestrate complicated scenarios Kubernetes deployment on AWS Kubernetes Helm Package manager
  • 15. www.pixelfederation.com 1. Pods a. group of one or more containers running on a same physical host 2. Services a. A Kubernetes Service is an abstraction which defines a logical set of Pods and a policy by which to access them b. Use selectors/labels to select right pods 3. Deployments, Stateful sets, Daemon Sets a. Abstractions with different properties managing lifecycle and deployment of pods Kubernetes deployment on AWS Kubernetes Service objects
  • 16. www.pixelfederation.com Kubernetes deployment on AWS Kubernetes application architecture
  • 18. www.pixelfederation.com Kubernetes deployment on AWS Thanks ! ahamsik@pixelfederation.com
  • 19. www.pixelfederation.com Encapsulation based CNI 1. Flannel 2. Weave Net Routing based CNI 1. Project Calico 2. Kube-router 3. amazon-vpc-cni-k8s Kubernetes deployment on AWS Kubernetes networking
  • 20. www.pixelfederation.com Kubernetes deployment on AWS Kubernetes networking flannel
  • 21. www.pixelfederation.com 1. Routing based CNI a. Using BGP to share IP routes to pods/services b. No traffic encapsulation/decapsulation c. Scalable d. Simple e. Fine grained security policies Kubernetes deployment on AWS Kubernetes networking calico