Kubernetes v1.10----Deployment Kubernetes-dashboard v1.83

Source: Internet
Author: User
Tags k8s

Kubernetes v1.10----Deployment Kubernetes-dashboard v1.83

1. Download Kubernetes-dashboard yaml file

#因为文件中的image指定的是谷歌, so you cannot deploy directly using apply

wget Https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml

Modify Iamge

Kubernetes-dashboard.yaml

....    Spec:      serviceaccountname:kubernetes-dashboard      containers:      -Name:kubernetes-dashboard        
....

Wq Save

2. Edit the Kubernetes-rbac.yaml file for subsequent user authentication

ApiVersion:v1kind:ServiceAccountmetadata:  name:kubernetes-dashboard  namespace:kube-system---kind: Clusterrolebindingapiversion:rbac.authorization.k8s.io/v1beta1metadata:  name:kubernetes-dashboardsubjects:  -Kind:serviceaccount    name:kubernetes-dashboard    namespace:kube-systemroleref:  kind:clusterrole  name:cluster-admin  ApiGroup:rbac.authorization.k8s.io

3. Add Users

Vim/etc/kubernetes/pki/basic_auth_file

4. Modify the Kube-apiserver configuration

Vim/etc/kubernetes/manifests/kube-apiserver.yaml

Spec:  containers:  -command:    -kube-apiserver    ...     ---anonymous-auth=false    ---insecure-bind-address=127.0.0.1    ---insecure-port=8080    --- Basic-auth-file=/etc/kubernetes/pki/basic_auth_file...    livenessprobe:      failurethreshold:8      HttpGet:        127.0.0.1        path:/healthz        8080        scheme:http

  

5. Restart the service

Systemctl Restart Kubelet

Verify that the service is working

6. Installing Dashboard

Execute separately

Kubectl apply-f kubernetes-dashboard.yamlkubectl apply-f kubernetes-rbac.yamlkubectl Create clusterrolebinding Login-dashboard-admin--clusterrole=cluster-admin--user=admin

7. See if the service is running

8. Access

https://master:6443/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

10. Login Verification

Enter just our user name in the file: admin password: admin Click Login, success.

Kubernetes v1.10----Deployment Kubernetes-dashboard v1.83

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.