FairwindsOps / charts

Fairwinds helm chart repository
https://fairwinds.com
Apache License 2.0
141 stars 154 forks source link

[stable/goldilocks] Update port-forward to service #1500

Closed kirananil007 closed 5 months ago

kirananil007 commented 5 months ago

Why This PR? Installed goldilocks using helm. helm_install_goldilocks

While trying to access the dashboard using pod, getting this error:

$ kubectl -n goldilocks port-forward goldilocks-dashboard-f89794564-pbbwt 8080:80
Forwarding from 127.0.0.1:8080 -> 80
Forwarding from [::1]:8080 -> 80
Handling connection for 8080
Handling connection for 8080
E0611 19:32:59.240457   17523 portforward.go:409] an error occurred forwarding 8080 -> 80: error forwarding port 80 to pod 7d19cca61c6e8b1dab80d902986c66d39b0e4debf3d957e401c0e67ba4bef38f, uid : failed to execute portforward in network namespace "/var/run/netns/cni-cac88060-d0e6-9f7a-b967-23eebd741896": failed to connect to localhost:80 inside namespace "7d19cca61c6e8b1dab80d902986c66d39b0e4debf3d957e401c0e67ba4bef38f", IPv4: dial tcp4 127.0.0.1:80: connect: connection refused IPv6 dial tcp6: address localhost: no suitable address found

Fixes #

This error can be avoided if port forwarding and service is used.

$ kubectl -n goldilocks port-forward svc/goldilocks-dashboard 8080:80

Changes Changes proposed in this pull request:

Checklist:

CLAassistant commented 5 months ago

CLA assistant check
All committers have signed the CLA.

sudermanjr commented 5 months ago

Thanks for the detailed PR!