Quarkus k8s
requires: docker network create quarkus-kubernetes-example || echo oops
./mvnw -Pfabric8-jvm clean compile quarkus:build docker:build docker:start
#for id in $(docker ps -q) ; do docker inspect $id | jq '.[].NetworkSettings.Ports."8080/tcp"[].HostPort' -r ; done
#for id in $(docker ps -q) ; do http :$(docker inspect $id | jq '.[].NetworkSettings.Ports."8080/tcp"[].HostPort' -r) ; done
http :8080
http :8081
./mvnw -Pfabric8-jvm docker:stop docker:remove
./mvnw -Pnative -Dquarkus.native.container-build=true clean compile quarkus:build
./mvnw -Pfabric8-native docker:build docker:start
#for id in $(docker ps -q) ; do docker inspect $id | jq '.[].NetworkSettings.Ports."8080/tcp"[].HostPort' -r ; done
#for id in $(docker ps -q) ; do http :$(docker inspect $id | jq '.[].NetworkSettings.Ports."8080/tcp"[].HostPort' -r) ; done
http :8080
http :8081
./mvnw -Pfabric8-native docker:stop docker:remove
./mvnw -Pfabric8-jvm clean compile quarkus:build docker:build docker:push
kubectl get pods -o wide -w &
kubectl apply -f k8s/ -f k8s/ingress/docker.yaml -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud-generic.yaml
# wait for bootstrap...
http :/
http :/backend
http :30080/
http :30081/
kubectl delete -f k8s/ -f k8s/ingress/docker.yaml -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud-generic.yaml
./mvnw -Pfabric8-jvm clean compile quarkus:build docker:build docker:push
k3d create --name k3s --api-port 6551 --publish 80:80 --publish 30080:30080 --publish 30081:30081 --workers 2
sleep 10s ; export KUBECONFIG="$(k3d get-kubeconfig --name='k3s')" ; kubectl get pods -o wide -w &
kubectl apply -f k8s/ -f k8s/ingress/traefik.yaml
# wait for bootstrap...
http :/
http :/backend
http :30080/
http :30081/
kubectl delete -f k8s/ -f k8s/ingress/traefik.yaml
k3d stop --name=k3s -a ; rm -rf ~/.config/k3d/k3s
./mvnw -Pnative -Dquarkus.native.container-build=true clean compile quarkus:build
./mvnw -Pfabric8-native docker:build docker:push
kubectl get pods -o wide -w &
kubectl apply -f k8s/ -f k8s/ingress/docker.yaml -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud-generic.yaml
# wait for bootstrap...
http :/
http :/backend
http :30080/
http :30081/
kubectl delete -f k8s/ -f k8s/ingress/docker.yaml -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud-generic.yaml
./mvnw -Pnative -Dquarkus.native.container-build=true clean compile quarkus:build
./mvnw -Pfabric8-native docker:build docker:push
k3d create --name k3s --api-port 6551 --publish 80:80 --publish 30080:30080 --publish 30081:30081 --workers 2
sleep 10s ; export KUBECONFIG="$(k3d get-kubeconfig --name='k3s')" ; kubectl get pods -o wide -w &
kubectl apply -f k8s/ -f k8s/ingress/traefik.yaml
# wait for bootstrap...
http :/
http :/backend
http :30080/
http :30081/
kubectl delete -f k8s/ -f k8s/ingress/traefik.yaml
k3d stop --name=k3s -a ; rm -rf ~/.config/k3d/k3s ; docker rm -fv `docker ps -aq`
- native app
- global headers
- mustache reactive vertx handlebars templating
- build and push docker images by using fabric8 docker-maven-plugin
- correct docker container CMD and ENTRYPOINT usage
- application is running in docker with qaurkus user
- k3d / k3s k8s CI / local testing
- k3d / k3s import-images from local docker k3d import-images feature introduced by PR #83, works with rancher/k3s tag of v0.7.0-rc2 or later due to a hard requirement on ctr inside the k3s