I’m trying to get Drone working in Kubernetes. I had the service and statefulset working yesterday, but it appears I might have made changes to configs that is causing the server port to change, making it inaccessible.
I’ve attached my kibana logs. You can see that yesterday it was starting the server on port 80. Then today its starting it on 443 with the IP address included. But in reality the server is completely inaccessible.
I’ve tried port-forwarding to ports 80, 443 and 8000 of the pod, and when I curl it the connection is always refused:
$ kc port-forward pod/drone-server-0 8000:80 -n drone Forwarding from 127.0.0.1:8000 -> 80 Forwarding from [::1]:8000 -> 80 Handling connection for 8000 E0328 13:04:53.046536 5562 portforward.go:331] an error occurred forwarding 8000 -> 80: error forwarding port 80 to pod d3e349ef5ae522344e350de9508ae93df598f8ae18c20c22611eb3a9e6eb8c37, uid : exit status 1: 2019/03/28 19:04:53 socat E connect(5, AF=2 127.0.0.1:80, 16): Connection refused
The same thing happens for ports 443 and 8000 on the pod. I’ve also tried
kubectl execing into the pod and trying to curl from there. Same thing…connection is always refused.
$ kc exec -it drone-server-0 -n drone -- /bin/sh ... (install curl) / # curl localhost:80 curl: (7) Failed to connect to localhost port 80: Connection refused / # curl localhost:443 curl: (7) Failed to connect to localhost port 443: Connection refused / # curl localhost:8000 curl: (7) Failed to connect to localhost port 8000: Connection refused / # curl tcp://localhost:80
What could be causing drone to change the server? You can also see I changed the ENV variable
DRONE_SERVER_PROTO from http to https and that doesn’t seem to make any difference either.