Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/claudioaltamura/spring-boot-jib

Demo project for Spring Boot with Jib
https://github.com/claudioaltamura/spring-boot-jib

github-actions jib maven minikube spring-boot

Last synced: 9 days ago
JSON representation

Demo project for Spring Boot with Jib

Awesome Lists containing this project

README

        

![GitHub Workflow Status (with branch)](https://img.shields.io/github/actions/workflow/status/claudioaltamura/spring-boot-jib/maven-build.yml?branch=main)

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

# spring-boot-jib

Demo project for Spring Boot with Jib

* added Spring DevTools
* using minikube private registry

## Minikube

#### Private Registry with minikube

minikube addons enable registry

https://minikube.sigs.k8s.io/docs/handbook/registry/#using-a-private-registry

#### Start

minikube start

## Build

eval $(minikube docker-env)

https://minikube.sigs.k8s.io/docs/handbook/pushing/#1-pushing-directly-to-the-in-cluster-docker-daemon-docker-env

mvn compile jib:build

or

mvn package

check image

export REGISTRY_PORT=61363

curl http://localhost:$REGISTRY_PORT/v2/_catalog | jq .

curl http://localhost:$REGISTRY_PORT/v2/spring-boot-jib/tags/list | jq .

https://docs.docker.com/registry/spec/api/

## Run app

minikube kubectl -- create deployment spring-boot-jib --image=localhost:$REGISTRY_PORT/spring-boot-jib:latest
minikube kubectl -- get deployments

minikube kubectl -- expose deployment spring-boot-jib --type=NodePort --port=8080
minikube kubectl -- get svc

export NODE_PORT=$(minikube kubectl -- get services/spring-boot-jib -o go-template='{{(index .spec.ports 0).nodePort}}')
echo NODE_PORT=$NODE_PORT

curl http://$(minikube ip):$NODE_PORT/superheroes | jq .

ps -ef | grep [email protected]

## Cleanup

minikube kubectl -- delete svc spring-boot-jib
minikube kubectl -- get svc

minikube kubectl -- delete deployment spring-boot-jib
minikube kubectl -- get deployments