Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Effective Kubernetes for Jakarta EE and MicroPr...

Effective Kubernetes for Jakarta EE and MicroProfile Developers

This session outlines several key techniques to understand while using Kubernetes with Java EE, Jakarta EE and MicroProfile applications. There are several key techniques to understand while using Kubernetes with Java EE, Jakarta EE and MicroProfile applications.
Examples include:

* How Kubernetes primitives (such as deployments and services) align with application server administration, clustering, auto-discovery, and load-balancing.
* How to add self-healing capabilities using Kubernetes probes and monitoring with open source tools like Prometheus/Grafana
* How the CI/CD pipeline of your application can be adapted to Kubernetes
* How Kubernetes can be extended using Operators to effectively manage application server clusters.

This entirely session walks through each of these considerations in turn.
At the end of the session, you will have all the demos on GitHub so you can explore them on your own.

https://www.eclipsecon.org/2023/java-community-day

Avatar for David Minkovski

David Minkovski

October 16, 2023
Tweet

More Decks by David Minkovski

Other Decks in Technology

Transcript

  1. Table of Contents • Kubernetes with: • Cluster • Auto-Scaling

    • Auto-discovery • Load-balancing • Self-healing capabilities using Kubernetes probes • Monitoring using Prometheus & Grafana • Kubernetes Operators to more effectively manage application server clusters • CI/CD pipeline with Kubernetes
  2. Who am I? David Minkovski Cloud Solution Architect Developer Advocate

    https://www.linkedin.com/in/davidminkovski Software Developer Passionate Blogger Guitar Player
  3. What are we working with? The average Java Café. Shoutout

    to Colombia Java User Group! Cafe CRUD for Coffee Management Coffee House Orders coffee every 45 seconds
  4. Resource Efficiency Use case: Data center with multiple servers. Without

    Kubernetes: Manually deploy applications on specific servers. With Kubernetes: Intelligently allocates resources, ensuring optimal usage.
  5. Isolation and Security Use case: Financial institution handling sensitive data.

    Kubernetes: Provides a way to isolate these applications. Each application runs in its own container with its own set of permissions.
  6. High Availability Use case: Healthcare system where downtime is not

    an option. Kubernetes: Ensures that if a server or container fails, the application is quickly restarted on another node, minimizing downtime.
  7. Scalability Use case: Big sale event, an e-commerce platform experiences

    a surge in traffic. Kubernetes: Allows the platform to automatically add more resources to handle the increased load. After the event, it can scale back down to save costs.
  8. Development Sandbox Use case: Software development team, each developer can

    have their own mini-Kubernetes cluster on their local machine. Kubernetes: Allows them to develop, test, and debug in an environment that closely mirrors production. It reduces the likelihood of "it works on my machine" scenarios.
  9. Future-Ready Use case: Company might currently run on-premises due to

    regulatory reasons, but they foresee the potential benefits of the cloud in the future. Kubernetes: By using Kubernetes on-premises, you're preparing for an easier transition to a cloud-based infrastructure when the time comes.
  10. Try out this repository and be guided step by step

    on deploying Java effectively on Kubernetes. https://aka.ms/java-k8s Shoutout Colombia Java User Group Egypt Java User Group
  11. Container Time Anything that can be containerized can run on

    Kubernetes. Simply use a Docker file, build the image, push it to a registry, declare a Kubernetes deployment file and you can start your application on Kubernetes. Lucky for us – there are many Docker files ready.
  12. What‘s a container again? How do they differ from VMS?

    Unlike virtual machines that require a full operating system for each instance, containers share the host OS, making them lightweight and efficient. Containers are like self-contained lunchboxes. Each lunchbox has its own unique meal, utensils, and napkin, but they all fit neatly inside a lunch bag.
  13. Running your own registry $ docker run -d -p 5000:5000

    --restart always --name registry registry:2
  14. Okay, but I need them to talk to each other.

    What can I do to get the IP? Where do I store them? How do I update them?
  15. Auto-Discovery for Seamless Integration Kubernetes Service Discovery simplifies microservices integration

    by automatically managing endpoints. It maps the service names to the right services and thus the pods. Simply call a service using its Name.
  16. Nice. Traffic increases! How do I run more Apps? I

    want to control how many there are? What if I need to limit the number?
  17. Auto-Scaling for Efficiency. Kubernetes Auto-Scaling dynamically adjusts resources, ensuring optimal

    performance while reducing costs. kubectl autoscale deployment coffeehouse --cpu-percent=50 --min=1 --max=5
  18. Load-Balancing for Even Workloads Kubernetes Load-Balancing evenly distributes traffic among

    pods, improving application responsiveness. kubectl expose deployment coffeehouse--port=8080 --target-port=8080 - -name=coffeehouse-lb --type=LoadBalancer
  19. We want to see what‘s happening! How much Memory is

    consumed? How are the response times? What is happening to the CPU? And other metrics!
  20. Monitoring for Insights Kubernetes Monitoring tools like Prometheus & Grafana

    provide real- time visibility into cluster performance, helping you make informed decisions.
  21. I have a highly complex database system. Now what? It

    needs specific configuration. Replication, backup, scaling. That’s always a lot of work. Even with Kubernetes…or is it?
  22. Operators for Application Management Kubernetes Operators automate complex application management

    tasks, simplifying deployment, scaling, and updates. Find Operators on OperatorHub.io.
  23. Ingress 1. Like a traffic cop for your applications. 2.

    Directs internet visitors to the right places inside your cluster, so they can access your services. 3. One main entrance that manages all the traffic for you. 4. Helps to keep your applications safe by handling things like encryption and making sure each visitor gets to the right place.
  24. CI / CD Pipelines Implement Continuous Integration and Continuous Deployment

    (CI/CD) pipelines to automate application delivery and updates in Kubernetes.
  25. Thank you. Try out this repository and be guided step

    by step on deploying Java effectively on Kubernetes. https://aka.ms/java-k8s