Open so0k opened 5 years ago
for frontEnd svc use the -w
flag to wait for externalIP, then fetch with
IP=$(kubectl get services frontend -o json | jq -r .status.loadBalancer.ingress[].ip)
If you get
curl -k https://$IP
curl: (7) Failed to connect to 35.192.222.87 port 443: Connection refused
Check endpoints of the svc...
alias k=kubectl
k describe svc frontend
Name: frontend
Namespace: default
...
Selector: app=frontend
...
Endpoints: <none>
No endpoints, check the label query
k get po -l app=frontend
NAME READY STATUS RESTARTS AGE
frontend-f685c7476-v2lgc 0/1 Pending 0 4m
turns out the pod is pending, we can see why through describe
k describe po frontend-....
...
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 7m (x5 over 8m) default-scheduler 0/3 nodes are available: 3 Insufficient cpu.
Normal Scheduled 3m default-scheduler Successfully assigned
...
delete some of the other pods to make space:
$ k delete po -l app=monolith
pod "monolith" deleted
pod "secure-monolith" deleted
and soon enough, the frontend pod should start running and you can complete the lab
For the nodePort 31000 service... The Lab mentions connection times out, but the error message is
refused
this is confusing, but do not worry - refused is the expected behaviour at that stage in the lab
Follow the instructions and the problem will be resolved