When developing a microservices architecture using containers, orchestration is key to provide an elastic scalable infrastructure. Kubernetes (w/ Docker) and Payara Micro 5 make this possible! This talk will showcase how to implement all of this for a real production scenario!
2. Before we Begin
• Intermediate knowledge of:
• Distributed Concepts & Clustering
• Container Technologies and Docker
• Questions at the end
3. Fabio Turizo
• IT Professional with over 9(y) of experience
• Oracle Certified Professional Java SE 8
• Oracle Certified Master Java EE 6
• Architecting with GKE Specialist
• Software Architecture Enthusiast
• Toptal Network FreelancerSenior Services Engineer
4. Payara Services Limited
• Payara Platform - Commercial Support
• OpenJDK Support via Azul Systems
Partnership
• Eclipse MicroProfile Founding Member
• EE4J Project Board Members
6. Domain Data Grid
• Large-scale grid structure
• Across a domain of Payara instances
• Across the nodes of a cluster topology
• Features:
• High Availability
• Scalability + Elasticity
7. Domain Data Grid
• Backed up by Hazelcast IMDG (Open Source)
• Cluster formed by auto-discovery via:
• Domain Information
• TCP IP
• DNS
• Multicast default
• Kubernetes (5.184 +)
8. Containers (Docker)
• Standard Unit of Software
• Executable Packages with:
• Application Code
• Runtime Environment
• System Dependencies (Libraries)
• Portable, Lightweight and Secure
9. Kubernetes (k8s)
• Container Infrastructure Orchestration
• On-premises
• Cloud Native
• Originally implemented by Google
• Donated to Cloud Native Computing Foundation
• Standard Container Support via OCI
11. k8s Concepts
• Clusters are controlled by objects
• Persistent State
• K8S Control Plane does the work!
• Fix with Remediation Actions
• Objects defined by specs
• YAML files
13. k8s – Nodes
• Worker Machines (minions)
• Maybe VM or Bare Metal
• Hosts both a kubelet and kube-proxy
• Usually auto-managed by Cloud Provider
• Zone + Regional Scaling (!)
14. k8s – Pods
• Most basic execution unit
• Can hold multiple containers
• Unique IP address
• Shared storage volumes (!)
• Usually managed by Controllers
• Deployments, StatefulSets, DaemonSets, Jobs
15. k8s – Deployments
• Sets the desired of Pods
• Favor declarative stance
• ReplicaSet handles replication
• Maintain specific versions of Pods
• Rolling Updates (!)
16. k8s – Deployments
• Updates / Upgrades:
• New ReplicaSets are created
• Plan strategy for availability
• Multiple upgrade strategies:
• Blue/Green Deployments
• Canary Deployments
17. k8s – Services
• Expose applications running on Pods
• Help Pods find each other
• IP Address and DNS Support
• Types:
• ClusterIP
• NodePort
• LoadBalancer
• Ingress
18. k8s – Pod Scaling
• Manual scaling is easy!
• But autoscaling is much better!
• Horizontal Pod Auto-scaler
• Works on multiple controllers
• Supported for Rolling Updates
19. k8s – Horizontal Pod AutoScaler
• Both resource and controller
• Queries Pod resources
• CPU and Memory by default
• Custom Metrics are supported (!)
• Supported on MicroProfile Metrics as Well.
• Target Deployments (and other controllers)