Skip to content

Sample code for Thriving on the Cloud-Native path with Java and Kubernetes

Notifications You must be signed in to change notification settings

ammbra/humor-dose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

humor-dose Project Setup

Provision the database with Helm

You can provision your MySQL instance using Helm charts:

helm repo add bitnami https://charts.bitnami.com/bitnami
helm install my-release bitnami/mysql

Deploy to Kubernetes

Please run the command below to deploy to Kubernetes

mvn clean package -Dquarkus.kubernetes.deploy=true

Obtain the path to the deployed service:

kubectl get service humor-dose -o jsonpath='{.status.loadBalancer.ingress[0].ip}'

Check the memory and CPU consumption:

kubectl get --raw /apis/metrics.k8s.io/v1beta1/namespaces/joke/pods/

Export URL to the service using:

export URL=http://$( kubectl get service fellowship -o jsonpath='{.status.loadBalancer.ingress[0].ip}')

Run the hey command bellow to determine how the resource usage:

hey -n 100 -c 20 $URL/jokes

Check again the memory and CPU consumption:

kubectl get --raw /apis/metrics.k8s.io/v1beta1/namespaces/joke/pods/

About

Sample code for Thriving on the Cloud-Native path with Java and Kubernetes

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published