SlideShare una empresa de Scribd logo
1 de 35
Descargar para leer sin conexión
Deploying WSO2 API Manager in
Production-Grade Kubernetes
Andrea Perera
Software Engineer
Pubudu Gunatilaka
Associate Technical Lead
Agenda
● Introduction to Kubernetes
● Why Kubernetes?
● K8s Deployment Architecture
● Demos on
○ Deploy WSO2 API Manager with Analytics in Google
Kubernetes Engine (GKE)
○ Autoscaling WSO2 API Manager based on the production
load
○ Apply WSO2 Update Manager (WUM) updates in a
production Kubernetes environment
● Best practices for deploying WSO2 API Manager in K8s
Kubernetes
● Kubernetes (K8s) is an open source system for
managing containerized applications across multiple
hosts, providing basic mechanisms for deployment,
maintenance, and scaling of applications
● By Google
○ Borg, Omega, and Kubernetes - Lessons learned over 3 container
management systems over a decade
○ https://ai.google/research/pubs/pub44843
Other Players...
● Docker Swarm
● OpenShift
● Apache Mesos + DCOS
● Pivotal Cloud Foundry (Diego runtime)
Why Kubernetes?
Why K8s? - Availability and Scalability
● Autohealing/ Autoscaling
○ If a container crashes in Docker, your application stops
working
○ K8s would automatically spin up a new container, and
ensure your application always has the specified number of
containers running
○ K8s can scale up/down dynamically based on the resource
usage (Horizontal Pod Autoscaling)
Why K8s? - Networking and Port Mapping
● Service Discovery
○ Need to scale up containers / restart an existing one? In
docker will need to handle wiring with IPs, etc.
○ K8s provides an abstraction over IP addresses, hence the
wiring part is automatic
○ Load balanced endpoints and consistent addressing is
available OOTB
Why K8s? - Networking and Port Mapping...
● Multi-host routing
○ By default uses bridge networking - limited to same docker
host!
○ A real deployment can span across multiple hosts
https://medium.com/google-cloud/kubernetes-nodeport-vs-loadbalancer-vs-ingress-when-should-i-use-what-922f010849e0
Why K8s? - Storage
● Storage consistency
○ Docker volume mounts - limited to the docker host machine
○ K8s Persistent Volumes - works across multiple machines,
has multi cloud support
○ Can extend support for multiple Cloud Storage Service
Providers
https://blog.lwolf.org/post/how-i-deployed-glusterfs-cluster-to-kubernetes/
Why K8s? - Health Checks and Monitoring
● K8s Probes
○ User defined criteria to determine health and service
readiness of the deployed Containers
○ K8s makes scaling, healing, and eviction decisions
based on these checks
Why K8s? - Health Checks and Monitoring...
● Logging and Stat Extensibility
○ K8s provides extensive support and seamless
integration with external log analyzers and metric
monitoring systems
■ Log Drivers
■ Prometheus
○ K8s itself packs a dashboard containing audit and
cluster health information
Why K8s? - Orchestration and DevOps
● K8s for an end user is a REST API
○ Can interact with YAML based declarative artifacts or direct
imperative commands
Why K8s? - Resource Management
● K8s can schedule workloads based on resource
availability
○ Each workload can define the resources it requires
for maximum loads and the resources it can work
with on average
K8s Deployment Architecture
Container Networking Interface
Node1
Container1
Docker Runtime
Container1Container1Container1Container1Container1ContainerN
Node2
Container1
Docker Runtime
Container1Container1Container1Container1Container1ContainerN
Node3
Container1
Docker Runtime
Container1Container1Container1Container1Container1ContainerN
K8s Master
kubectl (CLI)
https://medium.com/containermind/a-reference-architecture-for-deploying-wso2-middleware-on-kuberne
tes-d4dee7601e8e
Deploy WSO2 API Manager
with Analytics in Google
Kubernetes Engine (GKE)
Quick Start Guide
• Deploy WSO2 API Manager with Analytics in Google Kubernetes Engine
(GKE)
– Create a kubernetes Cluster in gcloud
– Create a Single node file server in gcloud
– Deploy WSO2 API Manager and Analytics
– Deploy NGINX Ingress Controller
– Access Management Consoles
– Deploy Sample Back end service
• Autoscaling WSO2 API Manager based on the production load
• Apply rolling updates on WSO2 API Manager with zero downtime
Install Prerequisites
● Install gcloud-sdk
○ https://cloud.google.com/sdk/install
● Install kubectl (compatible with v1.10)
○ https://kubernetes.io/docs/tasks/tools/install-kubectl/
● Install Git
○ https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
● Create a Google Cloud Platform Project
○ https://cloud.google.com/resource-manager/docs/creating-managing-
projects
In order to use WSO2 Kubernetes resources, you need an active WSO2 subscription. If you do not
possess an active WSO2 subscription already, you can sign up for a WSO2 Free Trial Subscription
from here.
Autoscaling WSO2 API
Manager based on the
production load
How does HPA work??
Apply rolling updates on
WSO2 API Manager with zero
downtime
Best practices for
deploying WSO2 API Manager
in Kubernetes
Reduce non-reproducible local storage
Containers are ephemeral
Avoid multiple complex configuration files
Config complexity dictates Container bootstrap complexity
Use a non-root user inside the container
Avoid access to the host as root user
Use Readiness and Liveness probes
Readiness → Is the app ready to start serving traffic?
Liveness → Is the app still running?
Set resource limits and requests for containers
resources:
requests:
memory: "2Gi"
cpu: "2000m"
limits:
memory: "3Gi"
cpu: "3000m"
Reduce cluttered logging
Output all to stdout
Target smaller Container image sizes
Less pulling to do, less time to startup
Try out WSO2 API Manager in Kubernetes
Kubernetes Demo (Samples-APIM)-
https://github.com/wso2/samples-apim/tree/master/kubernetes-demo
Kubernetes APIM - https://github.com/wso2/kubernetes-apim
THANK YOU
wso2.com

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Prometheus + Grafana = Awesome Monitoring
Prometheus + Grafana = Awesome MonitoringPrometheus + Grafana = Awesome Monitoring
Prometheus + Grafana = Awesome Monitoring
 
Building Repeatable Infrastructure using Terraform
Building Repeatable Infrastructure using TerraformBuilding Repeatable Infrastructure using Terraform
Building Repeatable Infrastructure using Terraform
 
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
 
PostgreSQLをKubernetes上で活用するためのOperator紹介!(Cloud Native Database Meetup #3 発表資料)
PostgreSQLをKubernetes上で活用するためのOperator紹介!(Cloud Native Database Meetup #3 発表資料)PostgreSQLをKubernetes上で活用するためのOperator紹介!(Cloud Native Database Meetup #3 発表資料)
PostgreSQLをKubernetes上で活用するためのOperator紹介!(Cloud Native Database Meetup #3 発表資料)
 
DevOps intro
DevOps introDevOps intro
DevOps intro
 
Performance Engineering Masterclass: Efficient Automation with the Help of SR...
Performance Engineering Masterclass: Efficient Automation with the Help of SR...Performance Engineering Masterclass: Efficient Automation with the Help of SR...
Performance Engineering Masterclass: Efficient Automation with the Help of SR...
 
Terraform 101
Terraform 101Terraform 101
Terraform 101
 
Taller docker _es-cl
Taller docker _es-clTaller docker _es-cl
Taller docker _es-cl
 
Getting Started Monitoring with Prometheus and Grafana
Getting Started Monitoring with Prometheus and GrafanaGetting Started Monitoring with Prometheus and Grafana
Getting Started Monitoring with Prometheus and Grafana
 
Exploring the power of OpenTelemetry on Kubernetes
Exploring the power of OpenTelemetry on KubernetesExploring the power of OpenTelemetry on Kubernetes
Exploring the power of OpenTelemetry on Kubernetes
 
Room 2 - 3 - Nguyễn Hoài Nam & Nguyễn Việt Hùng - Terraform & Pulumi Comparin...
Room 2 - 3 - Nguyễn Hoài Nam & Nguyễn Việt Hùng - Terraform & Pulumi Comparin...Room 2 - 3 - Nguyễn Hoài Nam & Nguyễn Việt Hùng - Terraform & Pulumi Comparin...
Room 2 - 3 - Nguyễn Hoài Nam & Nguyễn Việt Hùng - Terraform & Pulumi Comparin...
 
Apache Spark on Kubernetes入門(Open Source Conference 2021 Online Hiroshima 発表資料)
Apache Spark on Kubernetes入門(Open Source Conference 2021 Online Hiroshima 発表資料)Apache Spark on Kubernetes入門(Open Source Conference 2021 Online Hiroshima 発表資料)
Apache Spark on Kubernetes入門(Open Source Conference 2021 Online Hiroshima 発表資料)
 
CI-Jenkins.pptx
CI-Jenkins.pptxCI-Jenkins.pptx
CI-Jenkins.pptx
 
Building infrastructure as code using Terraform - DevOps Krakow
Building infrastructure as code using Terraform - DevOps KrakowBuilding infrastructure as code using Terraform - DevOps Krakow
Building infrastructure as code using Terraform - DevOps Krakow
 
An introduction to terraform
An introduction to terraformAn introduction to terraform
An introduction to terraform
 
Terraform modules restructured
Terraform modules restructuredTerraform modules restructured
Terraform modules restructured
 
Kubernetes and Prometheus
Kubernetes and PrometheusKubernetes and Prometheus
Kubernetes and Prometheus
 
CD using ArgoCD(KnolX).pdf
CD using ArgoCD(KnolX).pdfCD using ArgoCD(KnolX).pdf
CD using ArgoCD(KnolX).pdf
 
Multibranch pipelineでいろいろ学んだこと
Multibranch pipelineでいろいろ学んだことMultibranch pipelineでいろいろ学んだこと
Multibranch pipelineでいろいろ学んだこと
 
CI/CD on AWS
CI/CD on AWSCI/CD on AWS
CI/CD on AWS
 

Similar a Deploying WSO2 API Manager in Production-Grade Kubernetes

Similar a Deploying WSO2 API Manager in Production-Grade Kubernetes (20)

GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
 
DCSF19 How Docker Simplifies Kubernetes for the Masses
DCSF19 How Docker Simplifies Kubernetes for the Masses  DCSF19 How Docker Simplifies Kubernetes for the Masses
DCSF19 How Docker Simplifies Kubernetes for the Masses
 
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
 
Scalable Spark deployment using Kubernetes
Scalable Spark deployment using KubernetesScalable Spark deployment using Kubernetes
Scalable Spark deployment using Kubernetes
 
Running Production-Grade Kubernetes on AWS
Running Production-Grade Kubernetes on AWSRunning Production-Grade Kubernetes on AWS
Running Production-Grade Kubernetes on AWS
 
Kochi Mulesoft Meetup #11 - Runtime Fabric on Google Kubernetes Engine (GKE)
Kochi Mulesoft Meetup #11 - Runtime Fabric on Google Kubernetes Engine (GKE)Kochi Mulesoft Meetup #11 - Runtime Fabric on Google Kubernetes Engine (GKE)
Kochi Mulesoft Meetup #11 - Runtime Fabric on Google Kubernetes Engine (GKE)
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
CI/CD on Google Cloud Platform
CI/CD on Google Cloud PlatformCI/CD on Google Cloud Platform
CI/CD on Google Cloud Platform
 
Better code, faster with kubernetes in google cloud
Better code, faster with kubernetes in google cloudBetter code, faster with kubernetes in google cloud
Better code, faster with kubernetes in google cloud
 
Getting started with kubernetes
Getting started with kubernetesGetting started with kubernetes
Getting started with kubernetes
 
Free GitOps Workshop (with Intro to Kubernetes & GitOps)
Free GitOps Workshop (with Intro to Kubernetes & GitOps)Free GitOps Workshop (with Intro to Kubernetes & GitOps)
Free GitOps Workshop (with Intro to Kubernetes & GitOps)
 
Nugwc k8s session-16-march-2021
Nugwc k8s session-16-march-2021Nugwc k8s session-16-march-2021
Nugwc k8s session-16-march-2021
 
From airflow to google cloud composer
From airflow to google cloud composerFrom airflow to google cloud composer
From airflow to google cloud composer
 
Mattia Gandolfi - Improving utilization and portability with Containers and C...
Mattia Gandolfi - Improving utilization and portability with Containers and C...Mattia Gandolfi - Improving utilization and portability with Containers and C...
Mattia Gandolfi - Improving utilization and portability with Containers and C...
 
The ultimate Kubernetes Deployment Checklist - Infra to Microservices
The ultimate Kubernetes Deployment Checklist - Infra to MicroservicesThe ultimate Kubernetes Deployment Checklist - Infra to Microservices
The ultimate Kubernetes Deployment Checklist - Infra to Microservices
 
Deploying WSO2 Middleware on Kubernetes
Deploying WSO2 Middleware on KubernetesDeploying WSO2 Middleware on Kubernetes
Deploying WSO2 Middleware on Kubernetes
 
Session 4 GCCP.pptx
Session 4 GCCP.pptxSession 4 GCCP.pptx
Session 4 GCCP.pptx
 
Kubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containersKubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containers
 
Web後端技術的演變
Web後端技術的演變Web後端技術的演變
Web後端技術的演變
 
Altinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdf
Altinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdfAltinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdf
Altinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdf
 

Más de WSO2

Más de WSO2 (20)

Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
WSO2CON 2024 - Elevating the Integration Game to the Cloud
WSO2CON 2024 - Elevating the Integration Game to the CloudWSO2CON 2024 - Elevating the Integration Game to the Cloud
WSO2CON 2024 - Elevating the Integration Game to the Cloud
 
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & InnovationWSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
 
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital Businesses
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of TransformationWSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
 
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
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
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

Deploying WSO2 API Manager in Production-Grade Kubernetes

  • 1. Deploying WSO2 API Manager in Production-Grade Kubernetes Andrea Perera Software Engineer Pubudu Gunatilaka Associate Technical Lead
  • 2. Agenda ● Introduction to Kubernetes ● Why Kubernetes? ● K8s Deployment Architecture ● Demos on ○ Deploy WSO2 API Manager with Analytics in Google Kubernetes Engine (GKE) ○ Autoscaling WSO2 API Manager based on the production load ○ Apply WSO2 Update Manager (WUM) updates in a production Kubernetes environment ● Best practices for deploying WSO2 API Manager in K8s
  • 3. Kubernetes ● Kubernetes (K8s) is an open source system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications ● By Google ○ Borg, Omega, and Kubernetes - Lessons learned over 3 container management systems over a decade ○ https://ai.google/research/pubs/pub44843
  • 4. Other Players... ● Docker Swarm ● OpenShift ● Apache Mesos + DCOS ● Pivotal Cloud Foundry (Diego runtime)
  • 6. Why K8s? - Availability and Scalability ● Autohealing/ Autoscaling ○ If a container crashes in Docker, your application stops working ○ K8s would automatically spin up a new container, and ensure your application always has the specified number of containers running ○ K8s can scale up/down dynamically based on the resource usage (Horizontal Pod Autoscaling)
  • 7. Why K8s? - Networking and Port Mapping ● Service Discovery ○ Need to scale up containers / restart an existing one? In docker will need to handle wiring with IPs, etc. ○ K8s provides an abstraction over IP addresses, hence the wiring part is automatic ○ Load balanced endpoints and consistent addressing is available OOTB
  • 8. Why K8s? - Networking and Port Mapping... ● Multi-host routing ○ By default uses bridge networking - limited to same docker host! ○ A real deployment can span across multiple hosts
  • 10. Why K8s? - Storage ● Storage consistency ○ Docker volume mounts - limited to the docker host machine ○ K8s Persistent Volumes - works across multiple machines, has multi cloud support ○ Can extend support for multiple Cloud Storage Service Providers
  • 12. Why K8s? - Health Checks and Monitoring ● K8s Probes ○ User defined criteria to determine health and service readiness of the deployed Containers ○ K8s makes scaling, healing, and eviction decisions based on these checks
  • 13. Why K8s? - Health Checks and Monitoring... ● Logging and Stat Extensibility ○ K8s provides extensive support and seamless integration with external log analyzers and metric monitoring systems ■ Log Drivers ■ Prometheus ○ K8s itself packs a dashboard containing audit and cluster health information
  • 14. Why K8s? - Orchestration and DevOps ● K8s for an end user is a REST API ○ Can interact with YAML based declarative artifacts or direct imperative commands
  • 15. Why K8s? - Resource Management ● K8s can schedule workloads based on resource availability ○ Each workload can define the resources it requires for maximum loads and the resources it can work with on average
  • 17. Container Networking Interface Node1 Container1 Docker Runtime Container1Container1Container1Container1Container1ContainerN Node2 Container1 Docker Runtime Container1Container1Container1Container1Container1ContainerN Node3 Container1 Docker Runtime Container1Container1Container1Container1Container1ContainerN K8s Master kubectl (CLI)
  • 19. Deploy WSO2 API Manager with Analytics in Google Kubernetes Engine (GKE)
  • 20.
  • 21. Quick Start Guide • Deploy WSO2 API Manager with Analytics in Google Kubernetes Engine (GKE) – Create a kubernetes Cluster in gcloud – Create a Single node file server in gcloud – Deploy WSO2 API Manager and Analytics – Deploy NGINX Ingress Controller – Access Management Consoles – Deploy Sample Back end service • Autoscaling WSO2 API Manager based on the production load • Apply rolling updates on WSO2 API Manager with zero downtime
  • 22. Install Prerequisites ● Install gcloud-sdk ○ https://cloud.google.com/sdk/install ● Install kubectl (compatible with v1.10) ○ https://kubernetes.io/docs/tasks/tools/install-kubectl/ ● Install Git ○ https://git-scm.com/book/en/v2/Getting-Started-Installing-Git ● Create a Google Cloud Platform Project ○ https://cloud.google.com/resource-manager/docs/creating-managing- projects In order to use WSO2 Kubernetes resources, you need an active WSO2 subscription. If you do not possess an active WSO2 subscription already, you can sign up for a WSO2 Free Trial Subscription from here.
  • 23. Autoscaling WSO2 API Manager based on the production load
  • 24. How does HPA work??
  • 25. Apply rolling updates on WSO2 API Manager with zero downtime
  • 26. Best practices for deploying WSO2 API Manager in Kubernetes
  • 27. Reduce non-reproducible local storage Containers are ephemeral
  • 28. Avoid multiple complex configuration files Config complexity dictates Container bootstrap complexity
  • 29. Use a non-root user inside the container Avoid access to the host as root user
  • 30. Use Readiness and Liveness probes Readiness → Is the app ready to start serving traffic? Liveness → Is the app still running?
  • 31. Set resource limits and requests for containers resources: requests: memory: "2Gi" cpu: "2000m" limits: memory: "3Gi" cpu: "3000m"
  • 33. Target smaller Container image sizes Less pulling to do, less time to startup
  • 34. Try out WSO2 API Manager in Kubernetes Kubernetes Demo (Samples-APIM)- https://github.com/wso2/samples-apim/tree/master/kubernetes-demo Kubernetes APIM - https://github.com/wso2/kubernetes-apim