Align helm chart values.yaml to the default url deployment via deploy/recommended.yaml.
To have a working out-of-the box deployment.
I've tried to deploy the dashboard using the helm chart as documented in the README, however it did not work out of the box and I found out that there were differences between the usual deploy/recommended.yaml and the default chart values, (eg. metricsScraper is disabled by default).
Pod properly started but could not reach/open UI (got scrambled https payload error when using the documented forward method, no exposed endpoints when trying via api proxy).
Did not dig in the config as I had no time and I reverted to the initial apply url deployment (that worked out directly).
Would be great to have the same seamless experience when using the chart.
Hi,
Regarding the exposed endpoint, I think it comes from the Service in the Helm Chart stating a name, and, in a weird way, make the port mandatory when using the proxy:
http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:443/proxy/. I am not sure if the documented way should state this in the README.md of the project or if we should remove the name from the Service in helm. In any cases, https://github.com/kubernetes/dashboard/tree/master/aio/deploy/helm-chart/kubernetes-dashboard#using-the-dashboard-with-kubectl-proxy is wrong indeed.
Regarding the forward method, what do you mean, using kubectl port-forward?
Regarding the default deployment of the metrics-server, it has been agreed to make it opt-in since it can already be installed in the destination cluster, but it's open for discussion and it would be a breaking change.
@desaintmartin I can confirm that adding the port (or https) fixes the issue.
Regarding the forward method, what do you mean, using kubectl port-forward?
Yep.
Regarding the default deployment of the metrics-server, it has been agreed to make it opt-in since it can already be installed in the destination cluster, but it's open for discussion and it would be a breaking change.
Ok, maybe add something in the readme to explain the differences vs. recommended.yaml and the reasoning behind them.
You're right, PRs welcome! ;)
@desaintmartin I did retry the port-forward way that is documented: eg:
kubectl -n kubernetes-dashboard port-forward $POD_NAME 8443:8443
And go to https://127.0.0.1:8443/
But I still got You cannot visit 127.0.0.1 at the moment because the website sent scrambled credentials that Google Chrome cannot process..
Do you know what I'm doing wrong?
The kubectl proxy way does work.
Same issue here.
You cannot visit 127.0.0.1 at the moment because the website sent scrambled credentials that Google Chrome cannot process. Network errors and attacks are usually temporary, so this page will probably work later.
This is not related to the helm chart. When you are using port forward, you are accessing Dashboard directly and over HTTPS it autogenerates very basic certificates without any trusted CA. You'd have to allow your browser to trust such certificate or whitelist localhost as trusted domain. Firefox in example doesn't have such strict rules and allows to visit the page anyway. This depends on your browser. You can also provide your own custom certificates but this is out of scope here.
Since I'm using Firefox, I was about to try to reproduce with a clean install and chrome, thanks for the tip. ;)
I ran into these inconsistencies as well when switching to the helm chart. Adding the port to the URL does fix it, but it's a bummer to have that be inconsistent. Also had to turn on the metric scraper as noted above. For posterity here is what I had to use to get things going:
$ helm install metrics-server metrics-server --repo https://charts.bitnami.com/bitnami --version 4.3.1 --namespace kube-system --set apiService.create=true
$ helm install kubernetes-dashboard kubernetes-dashboard --repo https://kubernetes.github.io/dashboard --version 2.7.1 --create-namespace --namespace kubernetes-dashboard --set metricsScraper.enabled=true
http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:443/proxy/#/overview?namespace=default
The port should probably be added to the documentation at this point. Especially when deploying with helm, in the main README as a note.
I'll take a look at this tomorrow. Something might have changed in the new K8S version, so we'll have to cover both ways.
Most helpful comment
I ran into these inconsistencies as well when switching to the helm chart. Adding the port to the URL does fix it, but it's a bummer to have that be inconsistent. Also had to turn on the metric scraper as noted above. For posterity here is what I had to use to get things going:
http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:443/proxy/#/overview?namespace=default