kubernetes dashboard showing http: proxy error: dial tcp [::1]:8080: connect: connection refused

12/3/2018

I installed kubeadm to deploy multi node kubernetes cluster. Added two nodes. Those are ready. I am able to run my app using node port service. While i am trying yo access the dashboard facing an issue. I am following the steps to install dashboard in this link

kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml

dash-admin.yaml:
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
   name: kubernetes-dashboard
   labels:
     k8s-app: kubernetes-dashboard
roleRef:
   apiGroup: rbac.authorization.k8s.io
   kind: ClusterRole
   name: cluster-admin
subjects:
- kind: ServiceAccount
   name: kubernetes-dashboard
   namespace: kube-system

kubectl create -f dashboard-admin.yaml

nohup kubectl proxy --address="172.20.22.101" -p 443 --accept-hosts='^*
#x27; &

Its running well and saving the output in nohup.out

When i try to access the site using the url: 172.20.22.101:443/api/v1/namespaces/kube-system/services/…. it's showing connection refused. I observed the output in the nohup.out, it's showing the below error:

I1203 12:28:05.880828 15591 log.go:172] http: proxy error: dial tcp [::1]:8080: connect: connection refused –

-- samba
dashboard
kubernetes

1 Answer

5/19/2019

You are not running it with root or sudo permission.

I have encountered this issue, and after running using root. I was able to access it with no errors.

-- Ryan Aquino
Source: StackOverflow