Description
I'm currently trying to run this application in Kubernetes, but with no luck. I fixed a couple of problems with the deployments in my forked version: https://github.com/pulnara/ftgo-application
I'm using a Minikube Kubernetes cluster and the kubernetes-deploy-all.sh
script. After executing it, pods responsible for Kafka, MySQL etc. are successfully running, but the ones for business logic (like accounting service, consumer service etc.) not. After a while (and multiple restarts) they're eventually going into the CrashLoopBackOff
status, since all the time they don't meet the liveness probe - getting "connection refused" for the Spring Boot's /actuator/health
endpoint.
This is my result of the kubectl get pods
command:
NAME READY STATUS RESTARTS AGE
ftgo-accounting-service-55bd94d788-sh62d 0/1 Running 4 11m
ftgo-api-gateway-79948fdfbc-mxndr 0/1 Running 5 11m
ftgo-cdc-service-58fcf454b5-fdf67 0/1 Running 5 11m
ftgo-consumer-service-59fd7cd94d-wstrr 0/1 Running 4 11m
ftgo-dynamodb-local-0 1/1 Running 0 13m
ftgo-dynamodb-local-init-4kpf5 1/1 Running 0 11m
ftgo-dynamodb-local-init-mntsj 0/1 Error 0 13m
ftgo-kafka-0 1/1 Running 0 13m
ftgo-kitchen-service-868476cb5c-rpxfc 0/1 Running 4 11m
ftgo-mysql-0 1/1 Running 0 13m
ftgo-order-history-service-b84cb6f49-8qtv6 0/1 Running 5 11m
ftgo-order-service-58b776fc7c-q4l22 0/1 Running 4 11m
ftgo-restaurant-service-5fdf567678-ffdvc 0/1 Running 4 11m
ftgo-zookeeper-0 1/1 Running 0 13m
This are events from the ftgo-accounting-service pod's description:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 5m52s default-scheduler Successfully assigned default/ftgo-accounting-service-55bd94d788-sh62d to minikube
Normal Pulled 5m25s kubelet Successfully pulled image "msapatterns/ftgo-accounting-service:latest" in 8.6026105s
Normal Pulled 2m55s kubelet Successfully pulled image "msapatterns/ftgo-accounting-service:latest" in 2.0851995s
Normal Created 2m54s (x2 over 5m25s) kubelet Created container ftgo-accounting-service
Normal Started 2m53s (x2 over 5m24s) kubelet Started container ftgo-accounting-service
Warning Unhealthy 68s (x6 over 4m7s) kubelet Liveness probe failed: Get "http://172.17.0.9:8080/actuator/health": dial tcp 172.17.0.9:8080: connect: connection refused
Normal Killing 67s (x2 over 3m27s) kubelet Container ftgo-accounting-service failed liveness probe, will be restarted
Warning Unhealthy 49s (x8 over 4m9s) kubelet Readiness probe failed: Get "http://172.17.0.9:8080/actuator/health": dial tcp 172.17.0.9:8080: connect: connection refused
Normal Pulling 35s (x3 over 5m33s) kubelet Pulling image "msapatterns/ftgo-accounting-service:latest"
Normal Pulled 31s kubelet Successfully pulled image "msapatterns/ftgo-accounting-service:latest" in 3.8507742s
Did anyone happen to have a similar problem? I tried multiple times and on 2 different OS (Ubuntu, Mac OS), and getting the same error on both. I have no idea how to fix it.