All Projects → joshlong → cloud-native-java-2020

joshlong / cloud-native-java-2020

Licence: Apache-2.0 license
Cloud Native Java, 2020 Redux

Programming Languages

java
68154 projects - #9 most used programming language

Cloud Native Java 2020

Cloud Native Java, 2020 Redux. This contains the code to the updated version of my talk "Cloud Native Java," as of Q4 2020.

Bootiful Kubernetes

  • Build a Spring Boot application that uses Packeto and Buildacks and publishes it to a registry
  • Here's how you publish it to a registry like Google's Container Registry:

export APP_NAME=hello-java
export PROJECT_ID=bootiful

mvn -DskipTests=true clean spring-boot:build-image
image_id=$(docker images -q $APP_NAME)

docker tag "${image_id}" gcr.io/${PROJECT_ID}/${APP_NAME}
docker push gcr.io/${PROJECT_ID}/${APP_NAME}
docker pull gcr.io/${PROJECT_ID}/${APP_NAME}:latest

kubectl create deployment ${APP_NAME} --image=gcr.io/${PROJECT_ID}/${APP_NAME}
kubectl expose deployment ${APP_NAME} --port=80 --target-port=8080 --name=${APP_NAME} --type=LoadBalancer

kubectl describe services $APP_NAME

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].