-1

In the Amazon Linux machine while trying to install a Kubernetes dashboard there was an error which is been unpredictable.

This is a new Amazon Linux server in AWS,there was an error while installing the Kubernetes dashboard regarding host and port issue, but so nothing has configured in it as a new server. And I've installed kubectl and awscli for checking but it doesn't work. I've tried on all community support but there is no issue placed like mine.

while running the command

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

It throws the error

The connection to the server localhost:8080 was refused - did you specify the right host or port?
Sivakumar
  • 30
  • 5
  • Are you tried to install like this? `kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta4/aio/deploy/recommended.yaml` [installetion guide](https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/) – coaxium Oct 21 '19 at 07:27
  • Yeah i've tried it, again the same error is thrown – Sivakumar Oct 21 '19 at 09:14
  • ``` unable to recognize "https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta4/aio/deploy/recommended.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused ``` – Sivakumar Oct 21 '19 at 09:14
  • Do you experience this problem only when creating new resource ? What about other operations that make calls against the api-server like `kubectl get nodes` or `kubectl get pods` ? – mario Oct 21 '19 at 12:48
  • Are you sure that you `kubectl` works? – coaxium Oct 21 '19 at 13:02

1 Answers1

0

setup kubectl correctly

add admin.conf (your cluster config) in your KUBECONFIG

Example:

export KUBECONFIG=$HOME/.kube/admin.conf
coaxium
  • 113
  • 1
  • 5