SlideShare uma empresa Scribd logo
1 de 27
Application Portability with Kubernetes
Oleg Chunikhin |CTO, Kublr
Production-Grade K8s
Reasons for Portability
• Move load quickly (geography, cost, features)
• Lifecycle (dev/test/staging/production)
• Disaster recovery
• Split-tier architecture (application tiers may reside
in different environments)
• Cloud-bursting
Best Practices for Portable Applications
12-factor app is your bible–especially verses 2, 3, 4, 6, 7, 12
2. Explicitly declare and isolate dependencies
3. Store configuration in the environment
4. Treat backing services as attached resources
6. Execute the app as one or more stateless processes
7. Export services via port binding
12. Run admin/management tasks as one-off processes
Hard Problems
Ingress traffic
• Routing
• HTTPS/SSL certificates
State persistence
• Shared file storage
• Reliable block storage
• Database
Messaging
Application Needs
Application
Database Exclusive FS Shared FS
Routing SSL TermBalancing
“Rich” Platform
Application
Database Exclusive FS Shared FS
Routing SSL TermBalancingPlatform
Platform
Not Quite as Rich of a Platform
Application
? Database ? Exclusive FS Shared FS
? Routing ? ? SSL Term ?Balancing
Platform
Platform
“Poor” Platform
Application
? Database ? Exclusive FS ? Shared FS?
? Routing ? ? SSL Term ?? Balancing ?
Platform
Kubernetes to the Rescue
• Extreme ease and flexibility of component configurations and connections
• Configuration templating tools
• Helm
• Abstractions and extensible framework for ingress traffic processing
• Service
• Ingress
• Ingress Controllers
• Abstractions and extensible framework for storage management
• Volumes
• Persistent Volumes
Service
External node ports or external load balancer
Kubernetes cluster
Pod A-1
10.0.0.3
Pod A-2
10.0.1.5
Pod B-1
10.0.0.8
SrvB
10.7.0.3
Internal service
SrvA
10.7.0.1
SrvC
10.7.0.5
Ext
Resource
Ingress
Kubernetes cluster
SrvA
10.7.0.1
SrvB
10.7.0.3
Ingress rule 1:
abc.com/abc > SrvA
Ingress rule 2:
def.com/def > SrvB
Pod A-1
Pod A-2
Pod B-1
Ingress Controller
Edge / entry point / load balancer
Kubernetes cluster
SrvA
10.7.0.1
SrvB
10.7.0.3
Ingress
controller
Ingress rule 1:
abc.com/abc > SrvA
Ingress rule 2:
def.com/def > SrvB
Pod A-1
Pod A-2
Pod B-1
Configurability and Persistence
Pod
Container 1 Container 2
Persistent Volume:
NFS, Gluster, ceph,
EBS, dir, etc
Volume
Volume
Claim
Volume
Mount
Volume
Mount
Config Map
Secret
Storage Class
Static or dynamically allocated
Demo Application
WordPress
MySql Shared FS MySql Data
Routing SSL TermBalancing
Demo Application Helm Package
WordPress Deployment
MySql PVC
MySql Service
WordPress Ingress
WordPress Service
MySql Deployment
Demo Environment
AWS Kubernetes
Master
Ubuntu
Worker 1
Ubuntu
Worker 2
Ubuntu
Worker 3
Ubuntu
Azure Kubernetes
Master
RHEL
Worker 1
RHEL
Worker 2
RHEL
Worker 3
RHEL
kubectl --context=aws ...
helm --kube-context=aws ...
kubectl --context=azure ...
helm --kube-context=azure ...
Demo Application – Evaluation
WordPress
MySql
Routing SSL TermBalancing
MySql Data emptyDir Shared FS
ephemeral storage
provided by Kubernetes
Accessible from inside the cluster only via HTTP
Demo Application – Evaluation – Ingress
AWS
WordPress
MySql MySql Data emptyDir
Ingress Routing
Ingress SSL
Term + LEGO
ELB Balancing
Shared FS
ephemeral storage
provided by Kubernetes
Accessible via HTTPS on ELB with the given host
Demo Application – Production – EBS
AWS
WordPress
MySql
Ingress Routing
Ingress SSL
Term + LEGO
ELB Balancing
EBS MySql Data AWS EFS
persistent storage on AWS EBS
allocated by Kubernetes
Accessible via HTTPS on ELB with the given host
Demo Application – Production – RDS
AWS
WordPress
AWS RDS MySql
Ingress Routing
Ingress SSL
Term + LEGO
ELB Balancing
AWS EBS AWS EFS
persistent storage on AWS RDS
allocated outside of Kubernetes
Accessible via HTTPS on ELB with the given host
Demo Application – Production – Rook/Ceph
Azure
WordPress
MySql
Ingress Routing
Ingress SSL
Term + LEGO
Azure LB
Rook operator and Ceph cluster
MySql Data on Ceph
replica pool Ceph File System
Accessible via HTTPS on Azure LB with the given host
persistent storage on self-hosted
MySql and Ceph
Managed / Self-Hosted Options
File system: AWS EFS; Rook; OpenEBS; GlusterFS
Database: AWS RDS; MySql; PostgreSQL
Ingress: AWS ELB/ALB/NLB; Ingress controller
Certificates: AWS Certs; Let’s Encrypt; manual; self-signed
Messaging: AWS SQS; RabbitMQ; ActiveMQ
Azure has equivalent managed services for most app needs
Gotchas
• Self-hosted is more difficult to
operate than managed
• Different implementations
have varying functionalities
and QoS
• Performance
• Standards compliance
For example
• AWS EBS is AZ local
• Let’s Encrypt limits certificate
issuance rate
• Managed services may be better
hardware tuned
• Self-hosted services may be
better application tuned
Takeaways
• Cloud native Kubernetes applications are
portable, and easy to test, experiment,
and configure
• Portability tools
• Helm configuration templating
• Kubernetes abstractions: PV, PVC,
Ingress, Service etc
• Using self-hosted resources where
managed are not available
• Managed vs self-hosted services
considerations
• Different platforms
• On AWS and Azure
• On Ubuntu and RHEL
• Different ingress options
• With and without reverse-proxy
• With and without SSL
• Different persistence options
• Ephemeral storage
• Managed database
• Managed block storage, self-hosted
database
• Self-hosted cloud native storage
Q&A
Oleg Chunikhin
Chief Technology Officer
oleg@kublr.com
Kublr | kublr.com
Thank you!

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Kubernetes as Infrastructure Abstraction
Kubernetes as Infrastructure AbstractionKubernetes as Infrastructure Abstraction
Kubernetes as Infrastructure Abstraction
 
Introduction to Kubernetes RBAC
Introduction to Kubernetes RBACIntroduction to Kubernetes RBAC
Introduction to Kubernetes RBAC
 
Canary Releases on Kubernetes with Spinnaker, Istio, & Prometheus (2020)
Canary Releases on Kubernetes with Spinnaker, Istio, & Prometheus (2020)Canary Releases on Kubernetes with Spinnaker, Istio, & Prometheus (2020)
Canary Releases on Kubernetes with Spinnaker, Istio, & Prometheus (2020)
 
Openstack days sv building highly available services using kubernetes (preso)
Openstack days sv   building highly available services using kubernetes (preso)Openstack days sv   building highly available services using kubernetes (preso)
Openstack days sv building highly available services using kubernetes (preso)
 
Running I/O intensive workloads on Kubernetes, by Nati Shalom
Running I/O intensive workloads on Kubernetes, by Nati ShalomRunning I/O intensive workloads on Kubernetes, by Nati Shalom
Running I/O intensive workloads on Kubernetes, by Nati Shalom
 
Kubernetes 1.16 and rancher 2.3 enhancements
Kubernetes 1.16 and rancher 2.3 enhancementsKubernetes 1.16 and rancher 2.3 enhancements
Kubernetes 1.16 and rancher 2.3 enhancements
 
Advanced Scheduling in Kubernetes
Advanced Scheduling in KubernetesAdvanced Scheduling in Kubernetes
Advanced Scheduling in Kubernetes
 
Setup Hybrid Clusters Using Kubernetes Federation
Setup Hybrid Clusters Using Kubernetes FederationSetup Hybrid Clusters Using Kubernetes Federation
Setup Hybrid Clusters Using Kubernetes Federation
 
Kubernetes Networking 101
Kubernetes Networking 101Kubernetes Networking 101
Kubernetes Networking 101
 
Container Runtime Security with Falco, by Néstor Salceda
Container Runtime Security with Falco, by Néstor SalcedaContainer Runtime Security with Falco, by Néstor Salceda
Container Runtime Security with Falco, by Néstor Salceda
 
K8s Pod Scheduling - Deep Dive. By Tsahi Duek.
K8s Pod Scheduling - Deep Dive. By Tsahi Duek.K8s Pod Scheduling - Deep Dive. By Tsahi Duek.
K8s Pod Scheduling - Deep Dive. By Tsahi Duek.
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 
Managing kubernetes deployment with operators
Managing kubernetes deployment with operatorsManaging kubernetes deployment with operators
Managing kubernetes deployment with operators
 
MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + KubernetesMongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
 
AWS Summit Singapore 2019 | Autoscaling Your Kubernetes Workloads
AWS Summit Singapore 2019 | Autoscaling Your Kubernetes WorkloadsAWS Summit Singapore 2019 | Autoscaling Your Kubernetes Workloads
AWS Summit Singapore 2019 | Autoscaling Your Kubernetes Workloads
 
WTF Do We Need a Service Mesh?
WTF Do We Need a Service Mesh? WTF Do We Need a Service Mesh?
WTF Do We Need a Service Mesh?
 
A Million ways of Deploying a Kubernetes Cluster
A Million ways of Deploying a Kubernetes ClusterA Million ways of Deploying a Kubernetes Cluster
A Million ways of Deploying a Kubernetes Cluster
 
Multi-Clusters Made Easy with Liqo:
Getting Rid of Your Clusters Keeping Them...
Multi-Clusters Made Easy with Liqo:
Getting Rid of Your Clusters Keeping Them...Multi-Clusters Made Easy with Liqo:
Getting Rid of Your Clusters Keeping Them...
Multi-Clusters Made Easy with Liqo:
Getting Rid of Your Clusters Keeping Them...
 
Zero-downtime deployment of Micro-services with Kubernetes
Zero-downtime deployment of Micro-services with KubernetesZero-downtime deployment of Micro-services with Kubernetes
Zero-downtime deployment of Micro-services with Kubernetes
 
OpenStack on Kubernetes (BOS Summit / May 2017 update)
OpenStack on Kubernetes (BOS Summit / May 2017 update)OpenStack on Kubernetes (BOS Summit / May 2017 update)
OpenStack on Kubernetes (BOS Summit / May 2017 update)
 

Semelhante a Application Portability with Kubernetes (k8)

Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
QAware GmbH
 
Red Hat Storage Day LA - Persistent Storage for Linux Containers
Red Hat Storage Day LA - Persistent Storage for Linux Containers Red Hat Storage Day LA - Persistent Storage for Linux Containers
Red Hat Storage Day LA - Persistent Storage for Linux Containers
Red_Hat_Storage
 
Azure Kubernetes Service 2019 ふりかえり
Azure Kubernetes Service 2019 ふりかえりAzure Kubernetes Service 2019 ふりかえり
Azure Kubernetes Service 2019 ふりかえり
Toru Makabe
 

Semelhante a Application Portability with Kubernetes (k8) (20)

Application portability with kubernetes
Application portability with kubernetesApplication portability with kubernetes
Application portability with kubernetes
 
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
 
AWS re:Invent 2016: Service Integration Delivery and Automation Using Amazon ...
AWS re:Invent 2016: Service Integration Delivery and Automation Using Amazon ...AWS re:Invent 2016: Service Integration Delivery and Automation Using Amazon ...
AWS re:Invent 2016: Service Integration Delivery and Automation Using Amazon ...
 
Red Hat Storage Day LA - Persistent Storage for Linux Containers
Red Hat Storage Day LA - Persistent Storage for Linux Containers Red Hat Storage Day LA - Persistent Storage for Linux Containers
Red Hat Storage Day LA - Persistent Storage for Linux Containers
 
Wicked Easy Ceph Block Storage & OpenStack Deployment with Crowbar
Wicked Easy Ceph Block Storage & OpenStack Deployment with CrowbarWicked Easy Ceph Block Storage & OpenStack Deployment with Crowbar
Wicked Easy Ceph Block Storage & OpenStack Deployment with Crowbar
 
Advanced Container Scheduling
Advanced Container SchedulingAdvanced Container Scheduling
Advanced Container Scheduling
 
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
 
Best Practices with Azure Kubernetes Services
Best Practices with Azure Kubernetes ServicesBest Practices with Azure Kubernetes Services
Best Practices with Azure Kubernetes Services
 
Container & kubernetes
Container & kubernetesContainer & kubernetes
Container & kubernetes
 
Open stack in sina
Open stack in sinaOpen stack in sina
Open stack in sina
 
Red Hat Storage Day Atlanta - Persistent Storage for Linux Containers
Red Hat Storage Day Atlanta - Persistent Storage for Linux Containers Red Hat Storage Day Atlanta - Persistent Storage for Linux Containers
Red Hat Storage Day Atlanta - Persistent Storage for Linux Containers
 
Intro into Rook and Ceph on Kubernetes
Intro into Rook and Ceph on KubernetesIntro into Rook and Ceph on Kubernetes
Intro into Rook and Ceph on Kubernetes
 
Distribua, gerencie e escale suas aplicações com o aws elastic beanstalk
Distribua, gerencie e escale suas aplicações com o aws elastic beanstalkDistribua, gerencie e escale suas aplicações com o aws elastic beanstalk
Distribua, gerencie e escale suas aplicações com o aws elastic beanstalk
 
Building a Cloud Native Service - Docker Meetup Santa Clara (July 20, 2017)
Building a Cloud Native Service - Docker Meetup Santa Clara (July 20, 2017)Building a Cloud Native Service - Docker Meetup Santa Clara (July 20, 2017)
Building a Cloud Native Service - Docker Meetup Santa Clara (July 20, 2017)
 
Storage 101: Rook and Ceph - Open Infrastructure Denver 2019
Storage 101: Rook and Ceph - Open Infrastructure Denver 2019Storage 101: Rook and Ceph - Open Infrastructure Denver 2019
Storage 101: Rook and Ceph - Open Infrastructure Denver 2019
 
Discovery Day 2019 Sofia - Big data clusters
Discovery Day 2019 Sofia - Big data clustersDiscovery Day 2019 Sofia - Big data clusters
Discovery Day 2019 Sofia - Big data clusters
 
Best Practices for Running Kafka on Docker Containers
Best Practices for Running Kafka on Docker ContainersBest Practices for Running Kafka on Docker Containers
Best Practices for Running Kafka on Docker Containers
 
Azure Kubernetes Service 2019 ふりかえり
Azure Kubernetes Service 2019 ふりかえりAzure Kubernetes Service 2019 ふりかえり
Azure Kubernetes Service 2019 ふりかえり
 
Dragonflow Austin Summit Talk
Dragonflow Austin Summit Talk Dragonflow Austin Summit Talk
Dragonflow Austin Summit Talk
 
Deploying your web application with AWS ElasticBeanstalk
Deploying your web application with AWS ElasticBeanstalkDeploying your web application with AWS ElasticBeanstalk
Deploying your web application with AWS ElasticBeanstalk
 

Mais de Kublr

Mais de Kublr (13)

Container Runtimes and Tooling, v2
Container Runtimes and Tooling, v2Container Runtimes and Tooling, v2
Container Runtimes and Tooling, v2
 
Container Runtimes and Tooling
Container Runtimes and ToolingContainer Runtimes and Tooling
Container Runtimes and Tooling
 
Kubernetes in Hybrid Environments with Submariner
Kubernetes in Hybrid Environments with SubmarinerKubernetes in Hybrid Environments with Submariner
Kubernetes in Hybrid Environments with Submariner
 
Hybrid architecture solutions with kubernetes and the cloud native stack
Hybrid architecture solutions with kubernetes and the cloud native stackHybrid architecture solutions with kubernetes and the cloud native stack
Hybrid architecture solutions with kubernetes and the cloud native stack
 
Multi-cloud Kubernetes BCDR with Velero
Multi-cloud Kubernetes BCDR with VeleroMulti-cloud Kubernetes BCDR with Velero
Multi-cloud Kubernetes BCDR with Velero
 
Kubernetes Ingress 101
Kubernetes Ingress 101Kubernetes Ingress 101
Kubernetes Ingress 101
 
Kubernetes persistence 101
Kubernetes persistence 101Kubernetes persistence 101
Kubernetes persistence 101
 
Portable CI/CD Environment as Code with Kubernetes, Kublr and Jenkins
Portable CI/CD Environment as Code with Kubernetes, Kublr and JenkinsPortable CI/CD Environment as Code with Kubernetes, Kublr and Jenkins
Portable CI/CD Environment as Code with Kubernetes, Kublr and Jenkins
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Setting up CI/CD Pipeline with Kubernetes and Kublr step by-step
Setting up CI/CD Pipeline with Kubernetes and Kublr step by-stepSetting up CI/CD Pipeline with Kubernetes and Kublr step by-step
Setting up CI/CD Pipeline with Kubernetes and Kublr step by-step
 
How to Run Kubernetes in Restrictive Environments
How to Run Kubernetes in Restrictive EnvironmentsHow to Run Kubernetes in Restrictive Environments
How to Run Kubernetes in Restrictive Environments
 
How Self-Healing Nodes and Infrastructure Management Impact Reliability
How Self-Healing Nodes and Infrastructure Management Impact ReliabilityHow Self-Healing Nodes and Infrastructure Management Impact Reliability
How Self-Healing Nodes and Infrastructure Management Impact Reliability
 
Kubernetes in Highly Restrictive Environments
Kubernetes in Highly Restrictive EnvironmentsKubernetes in Highly Restrictive Environments
Kubernetes in Highly Restrictive Environments
 

Último

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
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

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
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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...
 
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...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Application Portability with Kubernetes (k8)

  • 1. Application Portability with Kubernetes Oleg Chunikhin |CTO, Kublr
  • 3. Reasons for Portability • Move load quickly (geography, cost, features) • Lifecycle (dev/test/staging/production) • Disaster recovery • Split-tier architecture (application tiers may reside in different environments) • Cloud-bursting
  • 4. Best Practices for Portable Applications 12-factor app is your bible–especially verses 2, 3, 4, 6, 7, 12 2. Explicitly declare and isolate dependencies 3. Store configuration in the environment 4. Treat backing services as attached resources 6. Execute the app as one or more stateless processes 7. Export services via port binding 12. Run admin/management tasks as one-off processes
  • 5. Hard Problems Ingress traffic • Routing • HTTPS/SSL certificates State persistence • Shared file storage • Reliable block storage • Database Messaging
  • 6. Application Needs Application Database Exclusive FS Shared FS Routing SSL TermBalancing
  • 7. “Rich” Platform Application Database Exclusive FS Shared FS Routing SSL TermBalancingPlatform Platform
  • 8. Not Quite as Rich of a Platform Application ? Database ? Exclusive FS Shared FS ? Routing ? ? SSL Term ?Balancing Platform Platform
  • 9. “Poor” Platform Application ? Database ? Exclusive FS ? Shared FS? ? Routing ? ? SSL Term ?? Balancing ? Platform
  • 10. Kubernetes to the Rescue • Extreme ease and flexibility of component configurations and connections • Configuration templating tools • Helm • Abstractions and extensible framework for ingress traffic processing • Service • Ingress • Ingress Controllers • Abstractions and extensible framework for storage management • Volumes • Persistent Volumes
  • 11. Service External node ports or external load balancer Kubernetes cluster Pod A-1 10.0.0.3 Pod A-2 10.0.1.5 Pod B-1 10.0.0.8 SrvB 10.7.0.3 Internal service SrvA 10.7.0.1 SrvC 10.7.0.5 Ext Resource
  • 12. Ingress Kubernetes cluster SrvA 10.7.0.1 SrvB 10.7.0.3 Ingress rule 1: abc.com/abc > SrvA Ingress rule 2: def.com/def > SrvB Pod A-1 Pod A-2 Pod B-1
  • 13. Ingress Controller Edge / entry point / load balancer Kubernetes cluster SrvA 10.7.0.1 SrvB 10.7.0.3 Ingress controller Ingress rule 1: abc.com/abc > SrvA Ingress rule 2: def.com/def > SrvB Pod A-1 Pod A-2 Pod B-1
  • 14. Configurability and Persistence Pod Container 1 Container 2 Persistent Volume: NFS, Gluster, ceph, EBS, dir, etc Volume Volume Claim Volume Mount Volume Mount Config Map Secret Storage Class Static or dynamically allocated
  • 15. Demo Application WordPress MySql Shared FS MySql Data Routing SSL TermBalancing
  • 16. Demo Application Helm Package WordPress Deployment MySql PVC MySql Service WordPress Ingress WordPress Service MySql Deployment
  • 17. Demo Environment AWS Kubernetes Master Ubuntu Worker 1 Ubuntu Worker 2 Ubuntu Worker 3 Ubuntu Azure Kubernetes Master RHEL Worker 1 RHEL Worker 2 RHEL Worker 3 RHEL kubectl --context=aws ... helm --kube-context=aws ... kubectl --context=azure ... helm --kube-context=azure ...
  • 18. Demo Application – Evaluation WordPress MySql Routing SSL TermBalancing MySql Data emptyDir Shared FS ephemeral storage provided by Kubernetes Accessible from inside the cluster only via HTTP
  • 19. Demo Application – Evaluation – Ingress AWS WordPress MySql MySql Data emptyDir Ingress Routing Ingress SSL Term + LEGO ELB Balancing Shared FS ephemeral storage provided by Kubernetes Accessible via HTTPS on ELB with the given host
  • 20. Demo Application – Production – EBS AWS WordPress MySql Ingress Routing Ingress SSL Term + LEGO ELB Balancing EBS MySql Data AWS EFS persistent storage on AWS EBS allocated by Kubernetes Accessible via HTTPS on ELB with the given host
  • 21. Demo Application – Production – RDS AWS WordPress AWS RDS MySql Ingress Routing Ingress SSL Term + LEGO ELB Balancing AWS EBS AWS EFS persistent storage on AWS RDS allocated outside of Kubernetes Accessible via HTTPS on ELB with the given host
  • 22. Demo Application – Production – Rook/Ceph Azure WordPress MySql Ingress Routing Ingress SSL Term + LEGO Azure LB Rook operator and Ceph cluster MySql Data on Ceph replica pool Ceph File System Accessible via HTTPS on Azure LB with the given host persistent storage on self-hosted MySql and Ceph
  • 23. Managed / Self-Hosted Options File system: AWS EFS; Rook; OpenEBS; GlusterFS Database: AWS RDS; MySql; PostgreSQL Ingress: AWS ELB/ALB/NLB; Ingress controller Certificates: AWS Certs; Let’s Encrypt; manual; self-signed Messaging: AWS SQS; RabbitMQ; ActiveMQ Azure has equivalent managed services for most app needs
  • 24. Gotchas • Self-hosted is more difficult to operate than managed • Different implementations have varying functionalities and QoS • Performance • Standards compliance For example • AWS EBS is AZ local • Let’s Encrypt limits certificate issuance rate • Managed services may be better hardware tuned • Self-hosted services may be better application tuned
  • 25. Takeaways • Cloud native Kubernetes applications are portable, and easy to test, experiment, and configure • Portability tools • Helm configuration templating • Kubernetes abstractions: PV, PVC, Ingress, Service etc • Using self-hosted resources where managed are not available • Managed vs self-hosted services considerations • Different platforms • On AWS and Azure • On Ubuntu and RHEL • Different ingress options • With and without reverse-proxy • With and without SSL • Different persistence options • Ephemeral storage • Managed database • Managed block storage, self-hosted database • Self-hosted cloud native storage
  • 26. Q&A
  • 27. Oleg Chunikhin Chief Technology Officer oleg@kublr.com Kublr | kublr.com Thank you!

Notas do Editor

  1. Kublr CTO Building Kublr – a platform for managing Kubernetes clusters in an enterprise Let me know if you cannot hear me Feel free to ask questions as you have them
  2. As they say, good portability is a two way street. Application should be designed for portability, but technology stack and environments you use should support it too. We will focus on technology stack and environment, but here is also a brief note on application design.
  3. Messaging is out of scope for the demo
  4. Explain application structure
  5. Show helm package Explain the demo application structure: WP Ingress WP Service WP Deployment MS Service MS Deployment MS PVC
  6. Describe demo environment Show clusters AWS: https://52.44.251.85/ui Azure: https://52.224.67.214/ui
  7. Deploy evaluation on AWS: helm --kube-context=aws upgrade -i demo demo-wordpress -f values-evaluation.yaml Show values-evaluation.yaml Only service inside the cluster Accessible from inside the cluster or through k8s port forwarding No persistence, ephemeral storage 1-2m Start port forwarding: kubectl --context aws port-forward \ $(kubectl --context aws get pods -l app=demo-demo-wordpress-wordpress -o custom-columns=name:metadata.name --no-headers=true) \ 8080:80 Open localhost:8080
  8. Deploy with Ingress and SSL termination helm --kube-context=aws upgrade -i demo demo-wordpress -f values-evaluation-ingress-ssl-host-aws.yaml Show values-evaluation-ingress-ssl-host-aws.yaml Using Ingress with SSL termination and automatic certificate acquisition through Letsencrypt using LEGO Still no persistence, ephemeral storage Demo Wordpress access via http://wp.port-aws.demo.kublr.com/ Gets redirected to https://wp.port-aws.demo.kublr.com/ with correct certificate
  9. Deploy AWS with EBS persistence: helm --kube-context=aws upgrade -i demo demo-wordpress -f values-persistent-ingress-ssl-host-aws.yaml Show values-persistent-ingress-ssl-host-aws.yaml Using Ingress with SSL termination and automatic certificate acquisition through Letsencrypt using LEGO Persistence is based on dynamically allocated EBS In UI see PV, PVC, and restarted MySql pods Open http://wp.port-aws.demo.kublr.com/ Error because DB has been recreated Delete wordpress pod Open http://wp.port-aws.demo.kublr.com/ Init site Login show works Kill mysql show that it continues working 3m
  10. Show values-persistent-rds-ingress-ssl-host-aws.yaml Explain using external RDS on the diagrams and yaml files (no demo) 1m
  11. 1. Using Ingress with SSL termination and automatic certificate acquisition through Letsencrypt using LEGO Persistence is based on dynamically allocated Ceph disk image in a self-hosted Ceph cluster 2. Deploy Rook operator to Azure kubectl --context=azure apply -f rook/rook-operator.yaml Check that it is deployed (1 operator, 1 agent per node should be available) kubectl --context=azure get -n rook-system pods 3. Deploy cluster and tools # cluster kubectl --context=azure apply -f rook/rook-cluster.yaml # check deployed (1 api, 1 mgr, 3 mon, 1 osd per node) kubectl --context=azure get -n rook pods # tools kubectl --context=azure apply -f rook/rook-tools.yaml # test cluster and tools kubectl --context=azure exec -n rook rook-tools -- rookctl status 4. Prepare Ceph replica pool and storage class kubectl --context=azure apply -f rook/rook-storageclass.yaml # check pools (replicapool) kubectl --context=azure exec -n rook rook-tools -- ceph osd pool ls detail 5. Deploy demo application with Ceph persistence to AWS helm --kube-context=azure upgrade -i demo demo-wordpress -f values-persistent-ingress-ssl-host-azure.yaml 5m - switch to the next slide for some time (3-5m) 6. Check that the application is working Open http://wp.port-azure.demo.kublr.com/ Review objects in K8S UI - app, Ceph cluster, and Rook Ceph operator