Week2: Graded lab, Connection Refused, k8s error

Hi all, echoing the error here. Setting the external IP refuses connection. A few of us have run into it.

EXTERNAL_IP=34.132.252.194
curl -d @locust/request-body.json -X POST http://${EXTERNAL_IP}:8501/v1/models/image_classifier:predict

>> Failed to connect to 34.132.252.194 port 8501: Connection refused

It could be from the face that kubectl get deployments never shows 1/1. You can see this discussion on needing to “restart kube-controller-manager” but nobody gives directions for GCP.

Hi Kevin! Have you retried the lab recently? I just did right now and didn’t encounter any issues. get deployments should indeed show 1/1 so this must be related to that. Are you able to successfully complete the previous checkpoint related to the configmap? Please check this post for more context. Since that is the only file we edit manually in this lab, I’m guessing the error is stemming from there. The deployment.yaml also depends on the configmap so if that has typos, then applying the deployment might also behave unexpectedly. Kindly check. Please also check that you haven’t skipped any kubectl apply type commands earlier to ensure that the environment is configured correctly. Hope this helps!