Installing Web UI Dashboard kubernetes-dashboard on main Ubuntu 16 04 6 LTS Xenial Xerus server

+4 votes

Trying to follow the tutorial on the official kubernetes:

I manage to install the following on Ubuntu 16.04.6 LTS (Xenial Xerus):

  1. sudo apt install -y
  2. sudo apt install -y apt-transport-https
  3. sudo apt install -y kubeadm kubelet kubectl

But when trying this command "kubectl apply -f" to create a dashboard on the main server, it is giving me the following error message.

Error message: unable to recognize "": Get http://localhost:8080/api?timeout=32s: dial tcp connect: connection refused

          I have referred to this link [Installing kube-state-metrics into an existing cluster on GCE] but did not understand. Could you help?

Apr 9, 2019 in Kubernetes by nmentityvibes
• 420 points
You don't know the solution and simply you are redirecting me to go here and there. Your answer is wrong. You don't even know the basics of networking. Don't misguide if you don't know the answer just be quite so that someone else could answer.

You can refer the Kubernetes Official Docs. It clearly mentions the usage of flannel.

For flannel to work correctly, you must pass --pod-network-cidr= to kubeadm init.

Set /proc/sys/net/bridge/bridge-nf-call-iptables to 1 by running sysctl net.bridge.bridge-nf-call-iptables=1 to pass bridged IPv4 traffic to iptables’ chains. This is a requirement for some CNI plugins to work, for more information please see here.

Note that flannel works on amd64, arm, arm64, ppc64le and s390x under Linux. Windows (amd64) is claimed as supported in v0.11.0 but the usage is undocumented.

kubectl apply -f

Ok. I will follow you on what you say. I just got this....

~$ sudo kubeadm init --apiserver-advertise-address= --pod-network-cidr=
[sudo] password for ev:
podSubnet: Invalid value: "": subnet is too small

          Let me know what needs to be done. I want the Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server. Till then I cannot mark your answer as correct.

The command you've used:

sudo kubeadm init --apiserver-advertise-address= --pod-network-cidr=

You missed out a digit at the end. --pod-networ-cidr=

Use the following command

$ kubeadm init --apiserver-advertise-address=<ip-address-of-kmaster-vm> --pod-network-cidr=

I am still getting the same after doing this sudo kubeadm init --apiserver-advertise-address= --pod-network-cidr= I don't see any flannel nodes running.

~$ kubectl get pods -o wide --all-namespaces
NAMESPACE     NAME                                    READY   STATUS    RESTARTS   AGE   IP                NODE         NOMINATED NODE   READINESS GATES
kube-system   coredns-fb8b8dccf-6c6nr                 0/1     Pending   0          45m   <none>            <none>       <none>           <none>
kube-system   coredns-fb8b8dccf-96d9l                 0/1     Pending   0          45m   <none>            <none>       <none>           <none>
kube-system   etcd-nmentityvibes                         1/1     Running   0          44m    nmentityvibes   <none>           <none>
kube-system   kube-apiserver-nmentityvibes               1/1     Running   0          44m    nmentityvibes   <none>           <none>
kube-system   kube-controller-manager-nmentityvibes      1/1     Running   2          44m    nmentityvibes   <none>           <none>
kube-system   kube-proxy-dlnzq                        1/1     Running   0          39m   worker01     <none>           <none>
kube-system   kube-proxy-mswdz                        0/1     Evicted   0          19m   <none>            nmentityvibes   <none>           <none>
kube-system   kube-scheduler-nmentityvibes               1/1     Running   1          44m    nmentityvibes   <none>           <none>
kube-system   kubernetes-dashboard-5f7b999d65-5fw4w   0/1     Pending   0          28m   <none>            <none>       <none>           <none>

1 answer to this question.

–2 votes

Follow these steps:

$ kubeadm reset

$ kubeadm init --apiserver-advertise-address=<ip-address-of-kmaster-vm> --pod-network-cidr=

Open another terminal and execute the following command as a non root user

$ mkdir -p $HOME/.kube
$ sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
$ sudo chown $(id -u):$(id -g) $HOME/.kube/config

and then use flannel as your CNI

$ kubectl apply -f

Level up your Kubernetes expertise with our industry-leading Kubernetes Course.

answered Apr 12, 2019 by Kalgi
• 52,360 points

reshown Apr 12, 2019 by Kalgi
i tried to follow this tutorial link of installing Kubernetes

but i in the step 6 to launch the dashboard of Kubernetes how can i do it during ubuntu server and it hasn't any browser to launch it ?is there is any command ?!

Thanks in advance

You can access Dashboard using the kubectl command-line tool by running the following command:

kubectl proxy

Kubectl will make Dashboard available at http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/.

The UI can only be accessed from the machine where the command is executed.

For more info refer to

Related Questions In Kubernetes

0 votes
1 answer

Install Kubernetes Dashboard on extrenal IP

You can expose services and pods in ...READ MORE

answered Sep 25, 2018 in Kubernetes by Kalgi
• 52,360 points
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
+1 vote
2 answers

Accessing Kubernetes Web UI (Dashboard)

To access Kubernetes dashboard, you need to ...READ MORE

answered Apr 16, 2019 in Kubernetes by Ray
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP