[FOLLOW UP QUESTION TO #7548]
But then I was not able to execute the urls http://ec2-instance-name:9090 and http://ec2-instance-name:3000 mentioned in Step 4b. Both threw refused connection error. How to address this issue?
I ignored the url error and moved forwarded with Step 5
The next issue which I faced was with port forward.
~/kubernetes-workshop-online/week6-App-in-k8s> kubectl -n my-app port-forward --address 0.0.0.0 pod/astra-backend 9090 & [1] 2253079 ~/kubernetes-workshop-online/week6-App-in-k8s> Forwarding from 0.0.0.0:9090 -> 9090 ~/kubernetes-workshop-online/week6-App-in-k8s> Handling connection for 9090 Handling connection for 9090 E0809 14:18:15.369013 2253079 portforward.go:400] an error occurred forwarding 9090 -> 9090: error forwarding port 9090 to pod 4d851590abf69a6832a3e29f56d8fa8ed07bfd001311dd4ea7fa19439d29cdbf, uid : failed to execute portforward in network namespace "/var/run/netns/cni-9fcb4d8f-3b2c-d182-9071-a812c1316d8c": socat command returns error: exit status 1, stderr: "2020/08/09 14:18:15 socat[19005] E connect(5, AF=2 127.0.0.1:9090, 16): Connection refused\n" E0809 14:18:15.370011 2253079 portforward.go:400] an error occurred forwarding 9090 -> 9090: error forwarding port 9090 to pod 4d851590abf69a6832a3e29f56d8fa8ed07bfd001311dd4ea7fa19439d29cdbf, uid : failed to execute portforward in network namespace "/var/run/netns/cni-9fcb4d8f-3b2c-d182-9071-a812c1316d8c": socat command returns error: exit status 1, stderr: "2020/08/09 14:18:15 socat[19006] E connect(5, AF=2 127.0.0.1:9090, 16): Connection refused\n"
How to resolve this port forward error?
Meanwhile I replayed your Day 6 video for the execution steps and then i changed the port forward statement as
~/kubernetes-workshop-online/week6-App-in-k8s> kubectl -n my-app port-forward pods/astra-backend 9090:9090 After this I did not get the above mentioned errors. I got the message Forwarding from [::1]:9090 -> 9090 But still my url did not work http://<ec2-instance-name>:9090 and http://<ec2-instance-name>:3000 http://<ec2-instance-name>:9090 - threw ERR_EMPTY_RESPONSE error http://<ec2-instance-name>:3000 - threw Invalid host header
How to resolve the errors?