order to apply kubernetes-dashboard ? before I join the worker nodes or after the join of the worker node ?

–1 vote
The reason :

apply before joining the worker nodes, the the dashboard will be on the master node. (g99k8s  = master node)

kube-system   kubernetes-dashboard-77fd78f978-sxr98   1/1     Running   1          2d19h   10.244.0.25    g99k8s           <none>

apply after the joining of the worker nodes, due to the auto scaling, the dashboard will be scaling to the worker node.

Is that true ?

Thanks,
Mar 15 in Kubernetes by Tinh
• 110 points
31 views

1 answer to this question.

0 votes
Not really. There are a few things you have to keep in mind:

1) Kubernetes Dashboard will only work on Master node; it will not be available on Slave node. That is the way Kubernetes is configured by default.

2) Because of this reason, Kubernetes Dashboard will not be a part of so called auto-scaling.
answered Mar 18 by Vardhan
• 11,410 points

Thanks for the information. However, the information did not answer my question: 

My question was: the order of the execution: 

for example:

1- init :

kubeadm init --apiserver-advertise-address=xx.xx.xx.0 --pod-network-cidr=xx.xx.0.0/16

2- deploy the flannel/calico/weavernet network to the kubernetes cluster

kubectl apply -f https://raw.githubuserxxxx.x.xxx/xxxx.yaml

3- the question is on this step.. (should I join the worker nodes or apply the dashboard on this step ?

Hey @Tinh, You start with initializing your cluster using the following command:

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

Then execute the following commands 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

Check the pods status:

$ kubectl get pods -o wide --all-namespaces

Install CNI, you can either use calico, flannel or weave. The below command installs Calico network

$ kubectl apply -f https://docs.projectcalico.org/v3.0/getting-started/kubernetes/installation/hosted/kubeadm/1.7/calico.yaml 

Execute the join command on all your nodes and once these nodes have joined the cluster finally install the dashboard:

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

Have a look at this blog for a detailed explanation.

    Related Questions In Kubernetes

    0 votes
    1 answer

    How do I sign-in to kubernetes dashboard?

    Since version 1.7 Dashboard uses more secure ...READ MORE

    answered Sep 7, 2018 in Kubernetes by DareDev
    • 6,810 points
    97 views
    0 votes
    1 answer

    Not able to access the kubernetes dashboard

    Have you executed this proxy command? kubectl proxy Try ...READ MORE

    answered Oct 8, 2018 in Kubernetes by Kalgi
    • 37,320 points
    68 views
    +2 votes
    5 answers
    0 votes
    1 answer
    0 votes
    1 answer
    0 votes
    1 answer

    Unable to access kubernetes dashboard

    You’re trying to access a private IP. ...READ MORE

    answered Aug 27, 2018 in Kubernetes by Kalgi
    • 37,320 points
    143 views
    0 votes
    2 answers

    The Status of nodes shown unknown

    This worked for me In Azure, if you ...READ MORE

    answered Aug 30, 2018 in Kubernetes by Nilesh
    • 6,900 points
    165 views