This tutorial guides you through deploying the Kubernetes Dashboard. Download the file for this pages guidance first.

Dashboard Installation

First, create a file with the name dashboard.yaml, after editing, follow the command below,

  • gedit dashboard.yaml &

    kubectl apply -f dashboard.yaml

    kubectl get deployment -n kubernetes-dashboard | grep dashboard

    kubectl get all -n kubernetes-dashboard

  • # apply means start the dashboard

    # grep dashboard means to query whether the dashboard is successfully opened or no

    # get all means view all dashboard details

    Now, edit admin-role.yaml , and start admin-role

    • kubectl apply -f admin-role.yaml

    • Get token by the following command,

      • kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin | awk '{print $1}') | grep token: | awk -F : '{print $2}' | xargs echo

      • After that, open the website and Paste the obtained token into the browser to log in. The login result is as follows,

        Kubernetes Helm Package

        Helm is Kubernetes package management tool, somewhat similar to ubuntu apt and centos of yum installation, can easily be packaged yaml and more efficient file deployed to kubernetes or even the version management, and through the chart form of release, So, Helm helps you manage Kubernetes applications. Helm Charts also help you define, install, and upgrade even the most complex Kubernetes application.

        Helm installation

        Now, Download the Helm package

        • wget https://get.helm.sh/helm-v3.4.2-linux-amd64.tar.gz

          tar xvfz helm-v3.4.2-linux-amd64.tar.gz

          cd linux-amd64

          mv helm /usr/local/bin

          helm version

        • Now initialize the package and use the helm repo command to manage, follow the command below,

          • helm repo add stable https://charts.helm.sh/stable

            helm search repo stable

            helm repo add aliyun https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts

            helm repo ls

            helm repo remove repoName

            helm repo update

          • Now the next step is to install chart,

            • helm install stable/mysql --generate-name

              kubectl run -i --tty ubuntu --image=ubuntu:16.04 --restart=Never -- bash -il

              apt-get update

              apt-get install mysql-client -y

              mysql -h mysql-1609235295 -p

              kubectl port-forward svc/mysql-1609235295 3306

              helm search repo mysql

              helm ls

            • Practice, Create a folder as abc

              Now enter the templates folder to delete all data and add deployment.yaml and service.yaml

              • helm create abc

                cd abc

                cd templates/

                rm -rf *

                gedit deployment.yaml service.yaml &

                helm install abc --generate-name

                helm ls

              • Now we try to see the deployment and service

                • kubectl get deployment

                  kubectl get service

                • And finally you can used curl to test