building kubernetes cloud: real world deployment examples ... · building kubernetes cloud: real...
TRANSCRIPT
![Page 1: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/1.jpg)
Building Kubernetes cloud: real world deployment examples, challenges and approaches
Alena Prokharchyk, Rancher Labs
![Page 2: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/2.jpg)
Making a right choice is not easy
![Page 3: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/3.jpg)
![Page 4: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/4.jpg)
The illustrated children guide to Kubernetes
https://www.youtube.com/watch?v=4ht22ReBjno
![Page 5: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/5.jpg)
Kubernetes cluster components
Image courtesy of Julia Evans https://stripe.com/blog/operating-kubernetes
![Page 6: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/6.jpg)
How do I architect my Kubernetes cluster? Or clusters?
What is my infrastructure
Do I need one big cluster, or many small ones
Challenges specific to a particular installation
![Page 7: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/7.jpg)
Today we are going to build Kubernetes clusters for …
![Page 8: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/8.jpg)
a Big Corporate Company
![Page 9: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/9.jpg)
and a Franchise Chain
![Page 10: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/10.jpg)
Questions to answer
Do I provision k8s on baremetal hosts or vms
If I chose vms, do I host them on premises or in the cloud
If in the cloud, do I use hosted k8s service, or provision k8s myself
How to structure k8s cluster - one big cluster or multiple smaller ones
![Page 11: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/11.jpg)
Bare metal or vm
Bare metal
Pros: performance, customization
Cons: time consuming to provision and maintain
Edge: usually bare metal - a host or a device
![Page 12: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/12.jpg)
VM: on premises or in the cloud
Cloud
Pros: autoscaling, pay-as-you-go
Cons: less control over infrastructure, vendor lock in, security
![Page 13: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/13.jpg)
Cloud managed Kubernetes
Pros: HA is managed by a cloud vendor
Cons: less control over Kubernetes configuration
![Page 14: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/14.jpg)
How to structure your k8s cluster
One big cluster cross all the hosts
or
Many smaller clusters collocated by a location or device
![Page 15: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/15.jpg)
The Big Corporate Company
One cluster might work if the company is not Geo distributed
Otherwise deploy one cluster per region
![Page 16: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/16.jpg)
The Franchise Chain
One cluster per
Location
Device
Image courtesy of Daniel sanchehttps://goo.gl/AbMUjS
![Page 17: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/17.jpg)
In any case you need a cluster management platform
Rancher
OpenShift
Pivotal
![Page 18: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/18.jpg)
Rancher 2.0Built on top of Kubernetes, with etcd as a database
Written in Go
Rancher API extends Kubernetes API
Every Rancher resource is a Kubernetes CRD (Custom resource definition)
Functional components run as Kubernetes controllers
![Page 19: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/19.jpg)
Rancher Architecture
![Page 20: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/20.jpg)
The Big Corporate Company
![Page 21: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/21.jpg)
Things to take care of
Multi tenancy (RBAC)
Network isolation between tenants via Network Policies
Resource quotas
![Page 22: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/22.jpg)
RBAC in RancherExtends Kubernetes RBAC
Introduces a concept of a Project to allow namespaces grouping
Self service access - once user is added to the project, it automatically inherits all the permissions
![Page 23: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/23.jpg)
Network Isolation via Network policies
![Page 24: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/24.jpg)
Network Isolation via Network policies
![Page 25: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/25.jpg)
Resource quotas
![Page 26: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/26.jpg)
If you have multiple clusters, you might want to provide a global access across them
![Page 27: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/27.jpg)
Public access cross clusters using Global DNS
Rancher dynamically collects public endpoints from user clusters
Programs them to an external DNS
External DNS provider is pluggable
![Page 28: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/28.jpg)
The Franchise Chain
![Page 29: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/29.jpg)
Things to take care of
Cluster should be able to run on a really small device
ARM support is desirable
A manageable way to push an application to multiple clusters and do its upgrade with 1 click
![Page 30: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/30.jpg)
Kubernetes distro is not small
Running it on 1GB RAM node can be problematic
![Page 31: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/31.jpg)
k3s: The lightweight Kubernetes distribution built for the Edge
Production grade and certified
One Kubernetes binary with zero host dependencies
Using containerd instead of Docker as a runtime
SQLite as an optional datastore
40 Megabytes in size
Opensource
![Page 32: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/32.jpg)
k3s
![Page 33: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/33.jpg)
Edge use case also calls for
Ability to push the same app to many clusters at once
With a way to override the config on per cluster level
Do an upgrade with 1 click
![Page 34: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/34.jpg)
Multi cluster app
![Page 35: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/35.jpg)
Multi cluster appA single global Interface to deploy same application to multiple Kubernetes clusters
User can choose clusters/projects to target app scheduling and customize the configuration per target cluster
The app can be deployed in Kubernetes clusters no matter how the clusters are provisioned, with no cloud provider lock-in
Using Helm Support, deploy/upgrade functionality helps to manage the multi cluster app and maintain versioning
![Page 36: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/36.jpg)
Common and crucial to have for all types of clusters
Monitoring
Alerting
Logging
![Page 37: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/37.jpg)
Built in Prometheus metrics
On multiple levels:
Cluster
Node
Project
Pod
![Page 38: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/38.jpg)
Demo time
![Page 39: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/39.jpg)
Links
Rancher - Kubernetes management system - https://github.com/rancher/rancher
k3s - lightweight Kubernetes - https://github.com/rancher/k3s
Kubernetes multi cluster app https://rancher.com/blog/2019/introducing-multi-cluster-apps/
![Page 40: Building Kubernetes cloud: real world deployment examples ... · Building Kubernetes cloud: real world deployment examples, challenges and approaches Alena Prokharchyk, Rancher Labs](https://reader035.vdocuments.us/reader035/viewer/2022081402/605410b0265fb23b4d61cb5b/html5/thumbnails/40.jpg)
Thank you!