The Experience of Java on Kubernetes with Microservices from HackFest

Yoshio Terada
Yoshio TeradaSenior Cloud Developer Advocate at Microsoft
Microsoft Corporation
Sr. Cloud Developer Advocate
Java Champion
Yoshio Terada
• GlassFish Evangelist at Sun
Microsystems 2001 - 2010
• Java SE/EE Evangelist at Oracle
Japan 2010 - 2015
• Java Evangelist
• Cloud Developer Advocate at
Microsoft Japan 2015 –
• Tech Conference Speaker in Japan
Self Introduction
The Experience of Java on Kubernetes with Microservices from HackFest
The Experience of Java on Kubernetes with Microservices from HackFest
I will share the Important Topic
Java - Basic
Docker - Basic
Kubernetes - Experience
Dev & DevOps
Java Fun Demo !
Bot on Serverless & Voice operate
k8s
When you touch a new technology,
You may encounter some problems,
But please Overcome it and
let's make a better future !!
The Experience of Java on Kubernetes with Microservices from HackFest
RUN /jdk-11/bin/jlink 
--module-path /jdk-11/jmods 
--add-modules java.base,java.logging,java.xml,
jdk.unsupported,java.sql,java.naming,
java.desktop,java.management,
java.security.jgss,java.instrument 
--compress 2 
--no-header-files 
--no-man-pages 
--output /tmp/custom-jdk-11-min
Create Custom JRE since Java 9
Improvement for Container since JDK10
Container detection and Resource
config usage
CPU and Memory allocation for
container become correct value.
Change RAM usage in Container
-XX:InitialRAMPercentage
-XX:MaxRAMPercentage
-XX:MinRAMPercentage
Take care of using
JDK 11
• java.xml.ws (JAX-WS、Web Services)
• java.xml.bind (JAXB)
• java.activation (JAF)
• java.xml.ws.annotation (Common Annotation)
• java.corba (CORBA)
• java.transaction (JTA)
• java.se.ee
• jdk.xml.ws (JAX-WS Tool)
• jdk.xml.bind (JAXB Tool)
Removed Package since JDK 11
Same Enterprise Application will not run on JDK 11.
Because many enterprise was using XML.
However we should
move forward to JDK 11
The Experience of Java on Kubernetes with Microservices from HackFest
The Experience of Java on Kubernetes with Microservices from HackFest
Don't use the latest tag
$ docker build -t myimage/app:latest .
$ docker tag myimage/app:latest 
private-repo.azurecr.io/myimage/app:latest
$ docker push
private-repo.azurecr.io/myimage/app:latest
Please Use BuildId instead of latest
Please create small size of Image
$ docker images|grep openjdk
openjdk 8u171-jre-alpine3.8 ccfb0c 83MB
openjdk 8u171-jre bef23b 443MB
openjdk latest 82f76 977MB
The case : Payara Micro Image
$ docker images |grep account
tyoshio2002/account-service 1.4 1fcf34937c1c
4 minutes ago 178MB
The Experience of Java on Kubernetes with Microservices from HackFest
Permission of User
FROM openjdk:8-jre-alpine
LABEL MAINTAINER Yoshio Terada
COPY ./target/front-end-svc-1.0-SNAPSHOT.jar
/tmp/app.jar
RUN addgroup -g 1000 java
RUN adduser -D -u 1000 -G java java
RUN chown java:java /tmp/payara-micro.jar
USER java
EXPOSE 8080
ENTRYPOINT java -jar /tmp/app.jar
The Experience of Java on Kubernetes with Microservices from HackFest
k8s is not Silver Bullet
It is not for Production !!
https://github.com/yoshioterada/k8s-Azure-Container-Service-AKS--on-Azure/blob/master/Kubernetes-Workshop3.md
Configuration for Deployment
Easy for
Hello World
https://github.com/yoshioterada/k8s-Azure-Container-Service-AKS--on-Azure/blob/master/Kubernetes-Workshop3.md
Many additional Configuragtion is Need
Request Limitation
$ kubectl top pod
NAME CPU(cores) MEMORY(bytes)
account-service-74b64648b7-2bqgs 3m 842Mi
account-service-74b64648b7-48kf8 3m 826Mi
For CPU entry:
The above 0.5(500m) is guaranteed to use the half CPU in
1 CPU. The expression 0.1 is equivalent to the expression
100m, which can be read as “one hundred millicpu”. CPU is
always requested as an absolute quantity, never as a
relative quantity.
For Memory entry:
You can express memory as a plain integer or as a fixed-
point integer using one of these suffixes: E, P, T, G, M, K.
You can also use the power-of-two equivalents: Ei, Pi, Ti,
Gi, Mi, Ki. For example, the following represent roughly
the same value:
Service
V1 Pod
Account
Service
V1 Pod
Account
Service
V2 Pod
Account
Service
V2 Pod
Account
Service
Account
Service
Understand “Label & Selector” is Important
I Recommended Customer
Not to use the
Persistence Volume on k8s
Not Only Azure,
But also it may occure on Others
Instead of mount the Volume
I recommend to use SDK !!
The Experience of Java on Kubernetes with Microservices from HackFest
Managed DB Access via Secure VNet
The Experience of Java on Kubernetes with Microservices from HackFest
1. Version UP
2. Staging & Production
3. High Availability
The Experience of Java on Kubernetes with Microservices from HackFest
Only “One Command” or “Push the Button” !
$ az aks upgrade --name yoshio-java-aks ¥
--resource-group yoshio-java-aks ¥
--kubernetes-version 1.11.3 --yes ¥
--debug
Sounds like Very Easy !!
Please Wait !!
7. Take Care of k8s Version Up ?
This is not only Azure but others too !
• If executed the command failed, what do you do ?
• If you version up the k8s, Old Configuration may not Run on new Version.
-> Need to modify YAML file.
-> Need to specify new command option
3rd Party utilities may not run on new Version
Best way is to create new k8s cluster environment
Version Up the k8s
Master VM (node) VM (node)
Version11.2
Master VM (node) VM (node)
Version 12.1
I recommend to create new Cluster
Dev & Staging & Production (Multi Tenant)
Master VM (node) VM (node)
Staging
Version11.2
Master VM (node) VM (node)
Production
Version 11.2
I recommend to create new Cluster
for safe resource Isolation
High Available k8s Env on 2 Region
Master VM (node) VM (node) Master VM (node) VM (node)
West Region East Region
Traffic Manager (DNS Base)
(LB West) (LB East)
The Experience of Java on Kubernetes with Microservices from HackFest
Trouble
1. Broken by upgrade k8s version (Ex:1.8 → 1.9)
2. Failed to scale the Linux VM
3. So many PODs course operation unavailable
4. YAML Configuration failed when upgrade
5. Attach/Detach PV failed
6. 3rd Party Tool(like Istio) version compatibility
Actual Trouble I faced
1. kubectl describe pod
2. kubectl logs POD_NAME
3. kubectl exec -it POD_NAME /bin/sh
4. kubectl get events –w
5. Deploy Ubuntu pod in same NameSpace
When you faced the problem
The Experience of Java on Kubernetes with Microservices from HackFest
Supported Java on Azure
The Experience of Java on Kubernetes with Microservices from HackFest
Free for Java Developer of Azure User
https://www.azul.com/downloads/azure-only/zulu/
Azul zule on Docker for Azure
$ docker pull
mcr.microsoft.com/java/jre:8u181-zulu-alpine
https://www.azul.com/downloads/azure-only/zulu/
These downloadable binaries are free to download but can only be used with Java applications or Java application
components that are being developed for deployment on Microsoft Azure Cloud or Azure Stack and are not
intended to be used for any other purpose.
The Experience of Java on Kubernetes with Microservices from HackFest
How many minutes?
Do you spend to create
DevOps Environment?
I spend 2-3 Day
to create DevOps Env.
(Aka :Visual Studio Team Services)
You can use it for any Environment include
AWS, GCP, Oracle
The Experience of Java on Kubernetes with Microservices from HackFest
Azure DevOps Providing
The Experience of Java on Kubernetes with Microservices from HackFest
Just only
Few Click !!
Free !! I’m not a Sales Person !!
The Experience of Java on Kubernetes with Microservices from HackFest
The Experience of Java on Kubernetes with Microservices from HackFest
Bot on Serverless & Void
Operate k8s Fan Demo
LUIS
Bot
クライアント
k8s operation by Slack & Voice Msg
https://www.luis.ai/
The Experience of Java on Kubernetes with Microservices from HackFest
When you touch a new technology,
You may encounter some problems,
But please Overcome it and
let's make a better future !!
The Experience of Java on Kubernetes with Microservices from HackFest
Engineer can change
the World !!
Microsoft Java
Microsoft Corporation
Sr. Cloud Developer Advocate
Java Champion
Yoshio Terada
1 of 70

Recommended

NoOpsが目指す未来とコンテナ技術 by
NoOpsが目指す未来とコンテナ技術NoOpsが目指す未来とコンテナ技術
NoOpsが目指す未来とコンテナ技術Hiromasa Oka
3.3K views81 slides
[Docker Tokyo - DockerCon Recap] Updates from Microsoft by
[Docker Tokyo - DockerCon Recap] Updates from Microsoft[Docker Tokyo - DockerCon Recap] Updates from Microsoft
[Docker Tokyo - DockerCon Recap] Updates from MicrosoftNaoki (Neo) SATO
745 views44 slides
邁向 Windows Server 應用程式現代化 (Windows Server Application Modernization) by
邁向 Windows Server 應用程式現代化 (Windows Server Application Modernization)邁向 Windows Server 應用程式現代化 (Windows Server Application Modernization)
邁向 Windows Server 應用程式現代化 (Windows Server Application Modernization)Will Huang
1K views14 slides
Quarkus tips, tricks, and techniques by
Quarkus tips, tricks, and techniquesQuarkus tips, tricks, and techniques
Quarkus tips, tricks, and techniquesRed Hat Developers
1.3K views21 slides
DCSF19 Containers for Beginners by
DCSF19 Containers for BeginnersDCSF19 Containers for Beginners
DCSF19 Containers for BeginnersDocker, Inc.
736 views36 slides
SQL_HA_DR_Azure by
SQL_HA_DR_AzureSQL_HA_DR_Azure
SQL_HA_DR_AzureOleg Chorny
1.5K views20 slides

More Related Content

What's hot

Windows 與 Azure 的容器旅程 @ Skilltree Day by
Windows 與 Azure 的容器旅程 @ Skilltree DayWindows 與 Azure 的容器旅程 @ Skilltree Day
Windows 與 Azure 的容器旅程 @ Skilltree DayJeff Chu
343 views84 slides
Unikernelize your Java Application by
Unikernelize your Java ApplicationUnikernelize your Java Application
Unikernelize your Java ApplicationMario Žagar
544 views67 slides
Azure Stack Hub Development Kit (ASDK)のAzure上への構築方法 by
Azure Stack Hub Development Kit (ASDK)のAzure上への構築方法Azure Stack Hub Development Kit (ASDK)のAzure上への構築方法
Azure Stack Hub Development Kit (ASDK)のAzure上への構築方法Masahiko Ebisuda
772 views10 slides
Containers on Microsoft Azure by
Containers on Microsoft AzureContainers on Microsoft Azure
Containers on Microsoft AzureToru Makabe
2.2K views24 slides
[113] lessons from realm by
[113] lessons from realm[113] lessons from realm
[113] lessons from realmNAVER D2
10.8K views63 slides
[DO16] Mesosphere : Microservices meet Fast Data on Azure by
[DO16] Mesosphere : Microservices meet Fast Data on Azure [DO16] Mesosphere : Microservices meet Fast Data on Azure
[DO16] Mesosphere : Microservices meet Fast Data on Azure de:code 2017
442 views42 slides

What's hot(20)

Windows 與 Azure 的容器旅程 @ Skilltree Day by Jeff Chu
Windows 與 Azure 的容器旅程 @ Skilltree DayWindows 與 Azure 的容器旅程 @ Skilltree Day
Windows 與 Azure 的容器旅程 @ Skilltree Day
Jeff Chu343 views
Unikernelize your Java Application by Mario Žagar
Unikernelize your Java ApplicationUnikernelize your Java Application
Unikernelize your Java Application
Mario Žagar544 views
Azure Stack Hub Development Kit (ASDK)のAzure上への構築方法 by Masahiko Ebisuda
Azure Stack Hub Development Kit (ASDK)のAzure上への構築方法Azure Stack Hub Development Kit (ASDK)のAzure上への構築方法
Azure Stack Hub Development Kit (ASDK)のAzure上への構築方法
Masahiko Ebisuda772 views
Containers on Microsoft Azure by Toru Makabe
Containers on Microsoft AzureContainers on Microsoft Azure
Containers on Microsoft Azure
Toru Makabe2.2K views
[113] lessons from realm by NAVER D2
[113] lessons from realm[113] lessons from realm
[113] lessons from realm
NAVER D210.8K views
[DO16] Mesosphere : Microservices meet Fast Data on Azure by de:code 2017
[DO16] Mesosphere : Microservices meet Fast Data on Azure [DO16] Mesosphere : Microservices meet Fast Data on Azure
[DO16] Mesosphere : Microservices meet Fast Data on Azure
de:code 2017442 views
Cloud infrastructures - Slide Set 6 - BOSH | anynines by anynines GmbH
Cloud infrastructures - Slide Set 6 - BOSH | anyninesCloud infrastructures - Slide Set 6 - BOSH | anynines
Cloud infrastructures - Slide Set 6 - BOSH | anynines
anynines GmbH937 views
우아한 모노리스 by Arawn Park
우아한 모노리스우아한 모노리스
우아한 모노리스
Arawn Park6.7K views
Visual Studio Team Services を使った Serverless のための継続的デリバリ by Tsuyoshi Ushio
Visual Studio Team Services を使った Serverless のための継続的デリバリVisual Studio Team Services を使った Serverless のための継続的デリバリ
Visual Studio Team Services を使った Serverless のための継続的デリバリ
Tsuyoshi Ushio2.9K views
Azure Cognitive Services로 똑똑한 서비스 만들 by Hong Min Kim
Azure Cognitive Services로 똑똑한 서비스 만들Azure Cognitive Services로 똑똑한 서비스 만들
Azure Cognitive Services로 똑똑한 서비스 만들
Hong Min Kim243 views
今Serverlessが面白いわけ by Yoichi Kawasaki
今Serverlessが面白いわけ今Serverlessが面白いわけ
今Serverlessが面白いわけ
Yoichi Kawasaki23.8K views
利用.NET Core 與 Azure Kubernetes Service (AKS) 建立高彈性 Microservices (Azure TechDay) by Will Huang
利用.NET Core 與 Azure Kubernetes Service (AKS) 建立高彈性 Microservices (Azure TechDay)利用.NET Core 與 Azure Kubernetes Service (AKS) 建立高彈性 Microservices (Azure TechDay)
利用.NET Core 與 Azure Kubernetes Service (AKS) 建立高彈性 Microservices (Azure TechDay)
Will Huang1.4K views
Kubernetes for data scientist by Lukasz Kaluzny
Kubernetes for data scientistKubernetes for data scientist
Kubernetes for data scientist
Lukasz Kaluzny919 views
The Automated Container Deployment Pipeline- JAXDevOps by Kontena, Inc.
The Automated Container Deployment Pipeline- JAXDevOpsThe Automated Container Deployment Pipeline- JAXDevOps
The Automated Container Deployment Pipeline- JAXDevOps
Kontena, Inc.288 views
Advanced nginx in mercari - How to handle over 1,200,000 HTTPS Reqs/Min by Masahiro Nagano
Advanced nginx in mercari - How to handle over 1,200,000 HTTPS Reqs/MinAdvanced nginx in mercari - How to handle over 1,200,000 HTTPS Reqs/Min
Advanced nginx in mercari - How to handle over 1,200,000 HTTPS Reqs/Min
Masahiro Nagano48.1K views
App Service x Jenkins 20171003 by Issei Hiraoka
App Service x Jenkins 20171003App Service x Jenkins 20171003
App Service x Jenkins 20171003
Issei Hiraoka2.1K views
Azure Artifactsを触ってみよう by DevTakas
Azure Artifactsを触ってみようAzure Artifactsを触ってみよう
Azure Artifactsを触ってみよう
DevTakas 560 views
CD NYC From Source Code to Production by Kontena, Inc.
CD NYC From Source Code to ProductionCD NYC From Source Code to Production
CD NYC From Source Code to Production
Kontena, Inc.321 views
Cloud Spanner をより便利にする運用支援ツールの紹介 by gree_tech
Cloud Spanner をより便利にする運用支援ツールの紹介Cloud Spanner をより便利にする運用支援ツールの紹介
Cloud Spanner をより便利にする運用支援ツールの紹介
gree_tech685 views
Netflix and Containers: Not A Stranger Thing by aspyker
Netflix and Containers:  Not A Stranger ThingNetflix and Containers:  Not A Stranger Thing
Netflix and Containers: Not A Stranger Thing
aspyker2.3K views

Similar to The Experience of Java on Kubernetes with Microservices from HackFest

Start Counting: How We Unlocked Platform Efficiency and Reliability While Sav... by
Start Counting: How We Unlocked Platform Efficiency and Reliability While Sav...Start Counting: How We Unlocked Platform Efficiency and Reliability While Sav...
Start Counting: How We Unlocked Platform Efficiency and Reliability While Sav...VMware Tanzu
230 views29 slides
KVM and docker LXC Benchmarking with OpenStack by
KVM and docker LXC Benchmarking with OpenStackKVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStackBoden Russell
131.8K views72 slides
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ... by
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...Amazon Web Services
332 views51 slides
Faq websphere performance by
Faq websphere performanceFaq websphere performance
Faq websphere performancebudakia
291 views11 slides
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ... by
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...Amazon Web Services
800 views52 slides
Production Grade Kubernetes Applications by
Production Grade Kubernetes ApplicationsProduction Grade Kubernetes Applications
Production Grade Kubernetes ApplicationsNarayanan Krishnamurthy
488 views39 slides

Similar to The Experience of Java on Kubernetes with Microservices from HackFest(20)

Start Counting: How We Unlocked Platform Efficiency and Reliability While Sav... by VMware Tanzu
Start Counting: How We Unlocked Platform Efficiency and Reliability While Sav...Start Counting: How We Unlocked Platform Efficiency and Reliability While Sav...
Start Counting: How We Unlocked Platform Efficiency and Reliability While Sav...
VMware Tanzu230 views
KVM and docker LXC Benchmarking with OpenStack by Boden Russell
KVM and docker LXC Benchmarking with OpenStackKVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStack
Boden Russell131.8K views
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ... by Amazon Web Services
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
Faq websphere performance by budakia
Faq websphere performanceFaq websphere performance
Faq websphere performance
budakia291 views
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ... by Amazon Web Services
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
OSCON 2011 - Node.js Tutorial by Tom Croucher
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js Tutorial
Tom Croucher5.3K views
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2... by Frank Munz
What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
Frank Munz21.2K views
Best Practices for performance evaluation and diagnosis of Java Applications ... by IndicThreads
Best Practices for performance evaluation and diagnosis of Java Applications ...Best Practices for performance evaluation and diagnosis of Java Applications ...
Best Practices for performance evaluation and diagnosis of Java Applications ...
IndicThreads2.7K views
VMworld 2013: Virtualizing and Tuning Large Scale Java Platforms by VMworld
VMworld 2013: Virtualizing and Tuning Large Scale Java Platforms VMworld 2013: Virtualizing and Tuning Large Scale Java Platforms
VMworld 2013: Virtualizing and Tuning Large Scale Java Platforms
VMworld1.1K views
EM12C High Availability without SLB and RAC by Secure-24
EM12C High Availability without SLB and RACEM12C High Availability without SLB and RAC
EM12C High Availability without SLB and RAC
Secure-243.8K views
WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016) by Roman Kharkovski
WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)
WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)
Roman Kharkovski59.3K views
Java and windows azure cloud service by Jeffray Huang
Java and windows azure cloud serviceJava and windows azure cloud service
Java and windows azure cloud service
Jeffray Huang857 views
Tales from the four-comma club: Managing Kafka as a service at Salesforce | L... by HostedbyConfluent
Tales from the four-comma club: Managing Kafka as a service at Salesforce | L...Tales from the four-comma club: Managing Kafka as a service at Salesforce | L...
Tales from the four-comma club: Managing Kafka as a service at Salesforce | L...
HostedbyConfluent418 views
Clustered Architecture Patterns Delivering Scalability And Availability by ConSanFrancisco123
Clustered Architecture Patterns Delivering Scalability And AvailabilityClustered Architecture Patterns Delivering Scalability And Availability
Clustered Architecture Patterns Delivering Scalability And Availability
ConSanFrancisco1231.2K views
1 Win7 For Devs Fund Search by llangit
1 Win7 For Devs Fund Search1 Win7 For Devs Fund Search
1 Win7 For Devs Fund Search
llangit1.2K views
OS for AI: Elastic Microservices & the Next Gen of ML by Nordic APIs
OS for AI: Elastic Microservices & the Next Gen of MLOS for AI: Elastic Microservices & the Next Gen of ML
OS for AI: Elastic Microservices & the Next Gen of ML
Nordic APIs264 views
Deploying your web application with AWS ElasticBeanstalk by Julien SIMON
Deploying your web application with AWS ElasticBeanstalkDeploying your web application with AWS ElasticBeanstalk
Deploying your web application with AWS ElasticBeanstalk
Julien SIMON2.2K views

More from Yoshio Terada

AI-Java-for-Financial.pdf by
AI-Java-for-Financial.pdfAI-Java-for-Financial.pdf
AI-Java-for-Financial.pdfYoshio Terada
308 views29 slides
Java-Virtual-Thread-LT.pdf by
Java-Virtual-Thread-LT.pdfJava-Virtual-Thread-LT.pdf
Java-Virtual-Thread-LT.pdfYoshio Terada
1.2K views9 slides
Cloud Native Architecture ことはじめ 最適な実行環境を選ぶポイント by
Cloud Native Architecture ことはじめ 最適な実行環境を選ぶポイントCloud Native Architecture ことはじめ 最適な実行環境を選ぶポイント
Cloud Native Architecture ことはじめ 最適な実行環境を選ぶポイントYoshio Terada
327 views31 slides
Jakarta EE Microproile Update JJUG 2020 May by
Jakarta EE Microproile Update JJUG 2020 MayJakarta EE Microproile Update JJUG 2020 May
Jakarta EE Microproile Update JJUG 2020 MayYoshio Terada
1K views15 slides
Azure RedHat OpenShift - Red Hat Forum 2019 by
Azure RedHat OpenShift - Red Hat Forum 2019Azure RedHat OpenShift - Red Hat Forum 2019
Azure RedHat OpenShift - Red Hat Forum 2019Yoshio Terada
320 views54 slides
JakartaOne 2020 Japan Announce by
JakartaOne 2020 Japan AnnounceJakartaOne 2020 Japan Announce
JakartaOne 2020 Japan AnnounceYoshio Terada
560 views15 slides

More from Yoshio Terada(20)

AI-Java-for-Financial.pdf by Yoshio Terada
AI-Java-for-Financial.pdfAI-Java-for-Financial.pdf
AI-Java-for-Financial.pdf
Yoshio Terada308 views
Java-Virtual-Thread-LT.pdf by Yoshio Terada
Java-Virtual-Thread-LT.pdfJava-Virtual-Thread-LT.pdf
Java-Virtual-Thread-LT.pdf
Yoshio Terada1.2K views
Cloud Native Architecture ことはじめ 最適な実行環境を選ぶポイント by Yoshio Terada
Cloud Native Architecture ことはじめ 最適な実行環境を選ぶポイントCloud Native Architecture ことはじめ 最適な実行環境を選ぶポイント
Cloud Native Architecture ことはじめ 最適な実行環境を選ぶポイント
Yoshio Terada327 views
Jakarta EE Microproile Update JJUG 2020 May by Yoshio Terada
Jakarta EE Microproile Update JJUG 2020 MayJakarta EE Microproile Update JJUG 2020 May
Jakarta EE Microproile Update JJUG 2020 May
Yoshio Terada1K views
Azure RedHat OpenShift - Red Hat Forum 2019 by Yoshio Terada
Azure RedHat OpenShift - Red Hat Forum 2019Azure RedHat OpenShift - Red Hat Forum 2019
Azure RedHat OpenShift - Red Hat Forum 2019
Yoshio Terada320 views
JakartaOne 2020 Japan Announce by Yoshio Terada
JakartaOne 2020 Japan AnnounceJakartaOne 2020 Japan Announce
JakartaOne 2020 Japan Announce
Yoshio Terada560 views
Jjug CCC 2019 Fall Azure Spring Cloud by Yoshio Terada
Jjug CCC 2019 Fall Azure Spring CloudJjug CCC 2019 Fall Azure Spring Cloud
Jjug CCC 2019 Fall Azure Spring Cloud
Yoshio Terada1.4K views
Sapporo Developer Festa 2019 by Yoshio Terada
Sapporo Developer Festa 2019Sapporo Developer Festa 2019
Sapporo Developer Festa 2019
Yoshio Terada415 views
AKS (k8s) Hands on Lab Contents by Yoshio Terada
AKS (k8s) Hands on Lab ContentsAKS (k8s) Hands on Lab Contents
AKS (k8s) Hands on Lab Contents
Yoshio Terada829 views
Oisix ra Daichi Microservice with Kubernetes by Yoshio Terada
Oisix ra Daichi Microservice with Kubernetes Oisix ra Daichi Microservice with Kubernetes
Oisix ra Daichi Microservice with Kubernetes
Yoshio Terada13.5K views
Virtual Kubelet and Virtual Node by Yoshio Terada
Virtual Kubelet and Virtual NodeVirtual Kubelet and Virtual Node
Virtual Kubelet and Virtual Node
Yoshio Terada536 views
Japan Container Day 2018 by Yoshio Terada
Japan Container Day 2018Japan Container Day 2018
Japan Container Day 2018
Yoshio Terada57.2K views
Java on Kubernetes on Azure by Yoshio Terada
Java on Kubernetes on AzureJava on Kubernetes on Azure
Java on Kubernetes on Azure
Yoshio Terada16.4K views
Application Development Vision by Yoshio Terada
Application Development VisionApplication Development Vision
Application Development Vision
Yoshio Terada12.9K views
How to face the Kubernetes ? by Yoshio Terada
How to face the Kubernetes ? How to face the Kubernetes ?
How to face the Kubernetes ?
Yoshio Terada3.2K views
JavaOne 2016 Report for Java EE by Yoshio Terada
JavaOne 2016 Report for Java EEJavaOne 2016 Report for Java EE
JavaOne 2016 Report for Java EE
Yoshio Terada535 views
Istio on k8s on Azure (AKS) by Yoshio Terada
Istio on k8s on Azure (AKS)Istio on k8s on Azure (AKS)
Istio on k8s on Azure (AKS)
Yoshio Terada6.7K views
Payara Scale (Hazelcast Enterprise) on Azure by Yoshio Terada
Payara Scale (Hazelcast Enterprise) on AzurePayara Scale (Hazelcast Enterprise) on Azure
Payara Scale (Hazelcast Enterprise) on Azure
Yoshio Terada1.1K views

Recently uploaded

SAP Automation Using Bar Code and FIORI.pdf by
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdfVirendra Rai, PMP
25 views38 slides
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...Jasper Oosterveld
27 views49 slides
Case Study Copenhagen Energy and Business Central.pdf by
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdfAitana
17 views3 slides
SUPPLIER SOURCING.pptx by
SUPPLIER SOURCING.pptxSUPPLIER SOURCING.pptx
SUPPLIER SOURCING.pptxangelicacueva6
20 views1 slide
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc
72 views29 slides
"Node.js Development in 2024: trends and tools", Nikita Galkin by
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin Fwdays
17 views38 slides

Recently uploaded(20)

SAP Automation Using Bar Code and FIORI.pdf by Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by Jasper Oosterveld
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
Case Study Copenhagen Energy and Business Central.pdf by Aitana
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdf
Aitana17 views
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc72 views
"Node.js Development in 2024: trends and tools", Nikita Galkin by Fwdays
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin
Fwdays17 views
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab23 views
Unit 1_Lecture 2_Physical Design of IoT.pdf by StephenTec
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdf
StephenTec15 views
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe by Simone Puorto
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe
Simone Puorto13 views
Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely29 views
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf by Dr. Jimmy Schwarzkopf
STKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdfSTKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdf
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf
HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn26 views

The Experience of Java on Kubernetes with Microservices from HackFest

  • 1. Microsoft Corporation Sr. Cloud Developer Advocate Java Champion Yoshio Terada
  • 2. • GlassFish Evangelist at Sun Microsystems 2001 - 2010 • Java SE/EE Evangelist at Oracle Japan 2010 - 2015 • Java Evangelist • Cloud Developer Advocate at Microsoft Japan 2015 – • Tech Conference Speaker in Japan Self Introduction
  • 5. I will share the Important Topic Java - Basic Docker - Basic Kubernetes - Experience Dev & DevOps Java Fun Demo ! Bot on Serverless & Voice operate k8s
  • 6. When you touch a new technology, You may encounter some problems, But please Overcome it and let's make a better future !!
  • 8. RUN /jdk-11/bin/jlink --module-path /jdk-11/jmods --add-modules java.base,java.logging,java.xml, jdk.unsupported,java.sql,java.naming, java.desktop,java.management, java.security.jgss,java.instrument --compress 2 --no-header-files --no-man-pages --output /tmp/custom-jdk-11-min Create Custom JRE since Java 9
  • 9. Improvement for Container since JDK10 Container detection and Resource config usage CPU and Memory allocation for container become correct value. Change RAM usage in Container -XX:InitialRAMPercentage -XX:MaxRAMPercentage -XX:MinRAMPercentage
  • 10. Take care of using JDK 11
  • 11. • java.xml.ws (JAX-WS、Web Services) • java.xml.bind (JAXB) • java.activation (JAF) • java.xml.ws.annotation (Common Annotation) • java.corba (CORBA) • java.transaction (JTA) • java.se.ee • jdk.xml.ws (JAX-WS Tool) • jdk.xml.bind (JAXB Tool) Removed Package since JDK 11 Same Enterprise Application will not run on JDK 11. Because many enterprise was using XML.
  • 12. However we should move forward to JDK 11
  • 15. Don't use the latest tag $ docker build -t myimage/app:latest . $ docker tag myimage/app:latest private-repo.azurecr.io/myimage/app:latest $ docker push private-repo.azurecr.io/myimage/app:latest
  • 16. Please Use BuildId instead of latest
  • 17. Please create small size of Image $ docker images|grep openjdk openjdk 8u171-jre-alpine3.8 ccfb0c 83MB openjdk 8u171-jre bef23b 443MB openjdk latest 82f76 977MB
  • 18. The case : Payara Micro Image $ docker images |grep account tyoshio2002/account-service 1.4 1fcf34937c1c 4 minutes ago 178MB
  • 20. Permission of User FROM openjdk:8-jre-alpine LABEL MAINTAINER Yoshio Terada COPY ./target/front-end-svc-1.0-SNAPSHOT.jar /tmp/app.jar RUN addgroup -g 1000 java RUN adduser -D -u 1000 -G java java RUN chown java:java /tmp/payara-micro.jar USER java EXPOSE 8080 ENTRYPOINT java -jar /tmp/app.jar
  • 22. k8s is not Silver Bullet
  • 23. It is not for Production !! https://github.com/yoshioterada/k8s-Azure-Container-Service-AKS--on-Azure/blob/master/Kubernetes-Workshop3.md Configuration for Deployment
  • 26. Request Limitation $ kubectl top pod NAME CPU(cores) MEMORY(bytes) account-service-74b64648b7-2bqgs 3m 842Mi account-service-74b64648b7-48kf8 3m 826Mi For CPU entry: The above 0.5(500m) is guaranteed to use the half CPU in 1 CPU. The expression 0.1 is equivalent to the expression 100m, which can be read as “one hundred millicpu”. CPU is always requested as an absolute quantity, never as a relative quantity. For Memory entry: You can express memory as a plain integer or as a fixed- point integer using one of these suffixes: E, P, T, G, M, K. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki. For example, the following represent roughly the same value:
  • 27. Service V1 Pod Account Service V1 Pod Account Service V2 Pod Account Service V2 Pod Account Service Account Service Understand “Label & Selector” is Important
  • 28. I Recommended Customer Not to use the Persistence Volume on k8s
  • 29. Not Only Azure, But also it may occure on Others
  • 30. Instead of mount the Volume I recommend to use SDK !!
  • 32. Managed DB Access via Secure VNet
  • 34. 1. Version UP 2. Staging & Production 3. High Availability
  • 36. Only “One Command” or “Push the Button” ! $ az aks upgrade --name yoshio-java-aks ¥ --resource-group yoshio-java-aks ¥ --kubernetes-version 1.11.3 --yes ¥ --debug Sounds like Very Easy !!
  • 38. 7. Take Care of k8s Version Up ? This is not only Azure but others too ! • If executed the command failed, what do you do ? • If you version up the k8s, Old Configuration may not Run on new Version. -> Need to modify YAML file. -> Need to specify new command option 3rd Party utilities may not run on new Version Best way is to create new k8s cluster environment
  • 39. Version Up the k8s Master VM (node) VM (node) Version11.2 Master VM (node) VM (node) Version 12.1 I recommend to create new Cluster
  • 40. Dev & Staging & Production (Multi Tenant) Master VM (node) VM (node) Staging Version11.2 Master VM (node) VM (node) Production Version 11.2 I recommend to create new Cluster for safe resource Isolation
  • 41. High Available k8s Env on 2 Region Master VM (node) VM (node) Master VM (node) VM (node) West Region East Region Traffic Manager (DNS Base) (LB West) (LB East)
  • 44. 1. Broken by upgrade k8s version (Ex:1.8 → 1.9) 2. Failed to scale the Linux VM 3. So many PODs course operation unavailable 4. YAML Configuration failed when upgrade 5. Attach/Detach PV failed 6. 3rd Party Tool(like Istio) version compatibility Actual Trouble I faced
  • 45. 1. kubectl describe pod 2. kubectl logs POD_NAME 3. kubectl exec -it POD_NAME /bin/sh 4. kubectl get events –w 5. Deploy Ubuntu pod in same NameSpace When you faced the problem
  • 49. Free for Java Developer of Azure User https://www.azul.com/downloads/azure-only/zulu/
  • 50. Azul zule on Docker for Azure $ docker pull mcr.microsoft.com/java/jre:8u181-zulu-alpine https://www.azul.com/downloads/azure-only/zulu/ These downloadable binaries are free to download but can only be used with Java applications or Java application components that are being developed for deployment on Microsoft Azure Cloud or Azure Stack and are not intended to be used for any other purpose.
  • 52. How many minutes? Do you spend to create DevOps Environment?
  • 53. I spend 2-3 Day to create DevOps Env.
  • 54. (Aka :Visual Studio Team Services) You can use it for any Environment include AWS, GCP, Oracle
  • 59. Free !! I’m not a Sales Person !!
  • 62. Bot on Serverless & Void Operate k8s Fan Demo
  • 66. When you touch a new technology, You may encounter some problems, But please Overcome it and let's make a better future !!
  • 70. Microsoft Corporation Sr. Cloud Developer Advocate Java Champion Yoshio Terada