/ktorjib

simple ktor docker application packed with jib

Primary LanguageKotlin

Continuous Delivery to Kubernetes with jib, skaffold and ktor

preconditions

Continuous delivery

skaffold dev

other terminal:

./web.sh

The bash script checks the service endpoint for code changes becoming effective. The script also assumes kubernetes runs on minikube and the web kubernetes service is already deployed.

Screencast

asciicast

Run application with Jib & Docker

./gradlew jibDockerBuild && docker run --rm -p 8080:8080 ktor01:1.0-SNAPSHOT
# specify docker image name
./gradlew jibDockerBuild --image=myimagename && docker run --rm -p 8080:8080 myimagename

access the endpoint:

curl http://0.0.0.0:8080

Run application with Gradle

./gradlew run

access the endpoint:

curl http://0.0.0.0:8080

Test application

./gradlew test

Clean up with Gradle

./gradlew clean
docker rmi $(docker images -q)

Blog post

Further reading