SlideShare a Scribd company logo
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

PDF
Kubernetes @ pixel
PPTX
Aws summit 2019 running kubernetes
PDF
Kubernetes Deployment Tutorial | Kubernetes Tutorial For Beginners | Kubernet...
PPTX
DevOps with Azure, Kubernetes, and Helm Webinar
PPTX
kubernates and micro-services
PDF
Prometheus kubernetes tech talk
PPTX
CNCF Rajkot group- Know the magic of kubernetes with AWS EKS
PDF
Helm chart-introduction
Kubernetes @ pixel
Aws summit 2019 running kubernetes
Kubernetes Deployment Tutorial | Kubernetes Tutorial For Beginners | Kubernet...
DevOps with Azure, Kubernetes, and Helm Webinar
kubernates and micro-services
Prometheus kubernetes tech talk
CNCF Rajkot group- Know the magic of kubernetes with AWS EKS
Helm chart-introduction

What's hot (19)

PDF
Aws + kubernetes = ❤︎
PPTX
How we Auto Scale applications based on CPU with Kubernetes at M6Web?
PDF
Optimizing Kubernetes deployments with Helm
PPTX
DevOps: Kubernetes + Helm with Azure
PPTX
Serverless on Kubernetes
PDF
Autoscaling Kubernetes
PPTX
DevOps with Kubernetes and Helm - OSCON 2018
PDF
Kubernetes Kops - Automation Night
PDF
Kubernetes Operations (KOPS)
PDF
Kubernetes on AWS gone wild
PPTX
Kubernetes in AWS
PPTX
PPTX
Automating Canary Deployments with Weaveworks Flagger and Aspen Mesh
PPTX
Why Kubernetes on Azure
PDF
Roman Gorshunov - Airship project onboarding
PPTX
Deploying and scaling kubernetes using Rancher CNCF meetup June 2017
PDF
Training TensorFlow Models at Scale with Kubernetes on Azure
PDF
Introduction to EKS and eksctl
PDF
Kubernetes in Azure
Aws + kubernetes = ❤︎
How we Auto Scale applications based on CPU with Kubernetes at M6Web?
Optimizing Kubernetes deployments with Helm
DevOps: Kubernetes + Helm with Azure
Serverless on Kubernetes
Autoscaling Kubernetes
DevOps with Kubernetes and Helm - OSCON 2018
Kubernetes Kops - Automation Night
Kubernetes Operations (KOPS)
Kubernetes on AWS gone wild
Kubernetes in AWS
Automating Canary Deployments with Weaveworks Flagger and Aspen Mesh
Why Kubernetes on Azure
Roman Gorshunov - Airship project onboarding
Deploying and scaling kubernetes using Rancher CNCF meetup June 2017
Training TensorFlow Models at Scale with Kubernetes on Azure
Introduction to EKS and eksctl
Kubernetes in Azure
Ad

Similar to Running Kubernetes (20)

PDF
kubernetes on awsjourneryssdddddddddddddd
PDF
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
PPTX
Amazon Elastic Container Service for Kubernetes (Amazon EKS) I AWS Dev Day 2018
PDF
Kubernetes on aws
PPTX
Kubernetes Internals
PDF
DevOps in AWS with Kubernetes
PDF
EKS Workshop
PDF
Getting Started with Kubernetes
PPTX
Amazon EKS: Getting Started
PPTX
Kuberenetes - From Zero to Hero
PDF
Mastering Kubernetes on AWS - Tel Aviv Summit
PPTX
Introduction+to+Kubernetes-Details-D.pptx
PPTX
Eks and fargate
PDF
Introduction to kubernetes
PDF
Introduction to Kubernetes Workshop
PPTX
DevOps with Kubernetes
PDF
[AWS Container Service] Getting Started with Kubernetes on AWS
PPTX
Kubernetes: від знайомства до використання у CI/CD
PPTX
Introduction kubernetes 2017_12_24
PDF
Staying out of_trouble_with_k8s_on_aws
kubernetes on awsjourneryssdddddddddddddd
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
Amazon Elastic Container Service for Kubernetes (Amazon EKS) I AWS Dev Day 2018
Kubernetes on aws
Kubernetes Internals
DevOps in AWS with Kubernetes
EKS Workshop
Getting Started with Kubernetes
Amazon EKS: Getting Started
Kuberenetes - From Zero to Hero
Mastering Kubernetes on AWS - Tel Aviv Summit
Introduction+to+Kubernetes-Details-D.pptx
Eks and fargate
Introduction to kubernetes
Introduction to Kubernetes Workshop
DevOps with Kubernetes
[AWS Container Service] Getting Started with Kubernetes on AWS
Kubernetes: від знайомства до використання у CI/CD
Introduction kubernetes 2017_12_24
Staying out of_trouble_with_k8s_on_aws
Ad

More from Pixel Federation (6)

PDF
Seaport - Using data to design onboarding
PDF
Migration of a legacy project to Symfony
PDF
DDD in Pixel Federation v1 | TechForce Meetup vol.3
PDF
Continuous integration
PDF
Tracing in distributed systems
PDF
DDD in Pixel Federation volume 2
Seaport - Using data to design onboarding
Migration of a legacy project to Symfony
DDD in Pixel Federation v1 | TechForce Meetup vol.3
Continuous integration
Tracing in distributed systems
DDD in Pixel Federation volume 2

Recently uploaded (20)

PDF
Fluorescence-microscope_Botany_detailed content
PDF
Mega Projects Data Mega Projects Data
PDF
.pdf is not working space design for the following data for the following dat...
PPTX
Computer network topology notes for revision
PPT
Reliability_Chapter_ presentation 1221.5784
PPTX
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
PDF
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
PPT
Miokarditis (Inflamasi pada Otot Jantung)
PDF
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
PDF
annual-report-2024-2025 original latest.
PPTX
Business Acumen Training GuidePresentation.pptx
PPTX
Qualitative Qantitative and Mixed Methods.pptx
PPT
ISS -ESG Data flows What is ESG and HowHow
PPTX
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
PPTX
Supervised vs unsupervised machine learning algorithms
PPTX
Database Infoormation System (DBIS).pptx
PPTX
IB Computer Science - Internal Assessment.pptx
PPTX
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
PDF
Foundation of Data Science unit number two notes
PPTX
IBA_Chapter_11_Slides_Final_Accessible.pptx
Fluorescence-microscope_Botany_detailed content
Mega Projects Data Mega Projects Data
.pdf is not working space design for the following data for the following dat...
Computer network topology notes for revision
Reliability_Chapter_ presentation 1221.5784
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
Miokarditis (Inflamasi pada Otot Jantung)
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
annual-report-2024-2025 original latest.
Business Acumen Training GuidePresentation.pptx
Qualitative Qantitative and Mixed Methods.pptx
ISS -ESG Data flows What is ESG and HowHow
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
Supervised vs unsupervised machine learning algorithms
Database Infoormation System (DBIS).pptx
IB Computer Science - Internal Assessment.pptx
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
Foundation of Data Science unit number two notes
IBA_Chapter_11_Slides_Final_Accessible.pptx

Running 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