In this deck, we explore a scalable deployment of WSO2 API Manager with API analytics on Kubernetes. We further discuss how to deploy WSO2 API Manager with Analytics in Google Kubernetes Engine (GKE), autoscaling WSO2 API Manager based on the production load, how to apply WSO2 Update Manager (WUM) updates in a production Kubernetes environment and best practices for deploying WSO2 API Manager in Kubernetes.
Watch the On-Demand Webinar - https://wso2.com/library/webinars/2019/06/deploying-wso2-api-manager-in-production-grade-kubernetes/
Axa Assurance Maroc - Insurer Innovation Award 2024
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
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
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.