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: https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/

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

  1. sudo apt install docker.io -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 https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/deploy/recommended/kubernetes-dashboard.yaml" to create a dashboard on the main server, it is giving me the following error message.

Error message: unable to recognize "https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/deploy/recommended/kubernetes-dashboard.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused

          I have referred to this link [Installing kube-state-metrics into an existing cluster on GCE
https://stackoverflow.com/questions/55503297/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
6,912 views
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=10.244.0.0/16 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 https://raw.githubusercontent.com/coreos/flannel/a70459be0084506e4ec919aa1c114638878db11b/Documentation/kube-flannel.yml

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

~$ sudo kubeadm init --apiserver-advertise-address=192.168.31.137 --pod-network-cidr=10.244.0.0/1
[sudo] password for ev:
podSubnet: Invalid value: "10.244.0.0/1": 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=192.168.31.137 --pod-network-cidr=10.244.0.0/1

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

Use the following command

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

I am still getting the same after doing this sudo kubeadm init --apiserver-advertise-address=192.168.31.137 --pod-network-cidr=10.244.0.0/16. 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   192.168.31.137    nmentityvibes   <none>           <none>
kube-system   kube-apiserver-nmentityvibes               1/1     Running   0          44m   192.168.31.137    nmentityvibes   <none>           <none>
kube-system   kube-controller-manager-nmentityvibes      1/1     Running   2          44m   192.168.31.137    nmentityvibes   <none>           <none>
kube-system   kube-proxy-dlnzq                        1/1     Running   0          39m   192.168.122.127   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   192.168.31.137    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=10.244.0.0/16

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 https://raw.githubusercontent.com/coreos/flannel/a70459be0084506e4ec919aa1c114638878db11b/Documentation/kube-flannel.yml

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 https://www.edureka.co/blog/install-kubernetes-on-ubuntu

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 https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/

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
722 views
+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,294 views
+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
3,918 views
+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
2,296 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP