This document provides an overview of a hands-on workshop on cloud-native Java development with MicroProfile, Kubernetes, and OpenShift. The workshop contains 8 modules that cover topics like creating RESTful microservices, containerizing services, and deploying to Kubernetes. Additional reactive programming modules are also included. The workshop utilizes tools like Eclipse MicroProfile, Open Liberty, OpenJ9, Docker, and Kubernetes/OpenShift.
55. Regain control with Kubernetes
Organize and govern the container chaos
Kubernetes
Intelligent
Scheduling
Self-HealingHorizontal
Scaling
Automated
Rollouts &
Rollbacks
Secret &
Configuration
Management
Service Discovery &
Load Balancing
Provide the APIs and runtime capabilities that help with creating large numbers of collaborating services
Basically having something where you aren't required to do some steps before shutdown - that shooting a container won't leave you in a bad situation
Meaning if you just kill it, you don’t leave stuff hanging around.
The ‘weight’ of your cloud-native application should be proportional to what the application does/uses. You don’t want to be bringing along 0.5GB of runtime to serve up a simple servlet.
https://12factor.net/dev-prod-parity
Make the time gap small: a developer may write code and have it deployed hours or even just minutes later.
Make the personnel gap small: developers who wrote code are closely involved in deploying it and watching its behavior in production.
Make the tools gap small: keep development and production as similar as possible.
https://12factor.net/config
Resource handles to the database, Memcached, and other backing services
Credentials to external services such as Amazon S3 or Twitter
Per-deploy values such as the canonical hostname for the deploy
Dev env where testing is done is the same as production. Using the same OS, Runtime, etc. Docker. Immutable build… to make sure code doesn’t have to change.
Single build form the Dockerfile – don’t re-build.
Explicitly listing version in Dockerfiles
Availability of Docker images, single independent process, etc…
Advice:- This slide should be the last slide created prior to socialization. It should be presented first as a summary of the rest of the WAD.
While containers are great , managing a container infrastructure without a high degree of automation and orchestration can soon become a nightmare …
Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications. It groups containers that make up an application into logical units for easy management and discovery.
Horizontal scaling
Scale your application up and down with a simple command, with a UI, or automatically based on CPU usage.
Self-healing
Restarts containers that fail, replaces and reschedules containers when nodes die, kills containers that don’t respond to your user-defined health check, and doesn’t advertise them to clients until they are ready to serve.
Automated rollouts and rollbacks
Kubernetes progressively rolls out changes to your application or its configuration, while monitoring application health to ensure it doesn’t kill all your instances at the same time. If something goes wrong, Kubernetes will rollback the change for you. Take advantage of a growing ecosystem of deployment solutions.
Service discovery and load balancing
No need to modify your application to use an unfamiliar service discovery mechanism. Kubernetes gives Pods their own IP addresses and a single DNS name for a set of Pods, and can load-balance across them.
Open source container orchestration platform
Clear governance model with Linux Foundation
Jointed effort by IBM, Google, Huawei, Intel, Red Hat and many others
Operations rather than developer centric
Basic primitives support a rich set of features
Releases new versions every three months
New features preview in alpha/beta
Wide range of deployment options: bare metal, virtualized, private, public, hybrid, …