Django On GKE: LoadBalancer Refused To Connect

Qm
1 min readNov 26, 2020

Recently i have deployed my containerized django app to the Google Kubernetes Engine used the Deployment config with 3 replicas and it consists with the LoadBalancer, Cloud SQL instance and Storage Bucket.

After I built my image as local and pushed to Google Container Registry and started all my pods and 3 services, I tried to access the app with the external IP and port provided by the LoadBalancer Service.

But the web browser or curl always gave me the Refused to Connect Error.

All the checks I have done to debug:

(1) double checked all my Pods exist and all my services exist and healthy!

kubectl get pods; kubectl get svc;

(2) checked Deployment label that match the selector of the Service. Because if this doesnt match, the service may not apply for the pods;

--

--

Qm

currently a data engineer and working hard to be a full stack