Hello,
actually i am playing around with my first 2 node kubernetes cluster (hosted in 2 vm's on proxmox host).
I did a fresh install, the master node is init, the worker already joined - everything seems fine so far.
Now i would like to run the kubernetes dashboard and get access to it from outside the cluster (both nodes are running on headless debian 11).
I already tried it with proxy and port forwarding, but without success:
root@kube01:~# kubectl get services --all-namespaces NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE default kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 31m kube-system kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP,9153/TCP 31m kubernetes-dashboard dashboard-metrics-scraper ClusterIP 10.98.176.161 <none> 8000/TCP 6m26s kubernetes-dashboard kubernetes-dashboard ClusterIP 10.96.169.44 <none> 443/TCP 6m26s
At the beginning port forwarding looks fine:
root@kube01:~# kubectl port-forward -n kubernetes-dashboard service/kubernetes-dashboard 10443:443 --address 0.0.0.0 Forwarding from 0.0.0.0:10443 -> 8443
But when i call the dashboard in my browser (from outside the cluster) i get this error message and the service stops:
Handling connection for 10443 E0208 21:02:38.845683 16694 portforward.go:406] an error occurred forwarding 10443 -> 8443: error forwarding port 8443 to pod 2baa1be6282275294fc218b8341e4d23850f448314f3f49114494c299b10b5fd, uid : exit status 1: 2022/02/08 21:02:38 socat[32157] E connect(5, AF=2 127.0.0.1:8443, 16): Connection refused E0208 21:02:38.846490 16694 portforward.go:234] lost connection to pod
Any ideas, whats the problem and how to solve it?
Thanks in advance,
Alex