美文网首页
2020-04-08 Kubernetes Dashboard

2020-04-08 Kubernetes Dashboard

作者: 番茄晓蛋 | 来源:发表于2020-04-09 03:27 被阅读0次

Ref this doc: Bypassing authentication for the local Kubernetes Cluster Dashboard

open the downloaded file in your favorite text editor, I’ll use VS Code.

code .\kubernetes-dashboard.yaml

Locate the container -> args section under the Dashboard-Deployment section (around line 116) and add the following command line arguments:

--enable-skip-login
--disable-settings-authorizer

Your modified args section should look like the following

spec:
      containers:
      - name: kubernetes-dashboard
        image: k8s.gcr.io/kubernetes-dashboard-amd64:v1.10.1
        ports:
        - containerPort: 8443
          protocol: TCP
        args:
          - --enable-skip-login
          - --disable-settings-authorizer        
          - --auto-generate-certificates
          # Uncomment the following line to manually specify Kubernetes API server Host
          # If not specified, Dashboard will attempt to auto discover the API server and connect
          # to it. Uncomment only if the default does not work.
          # - --apiserver-host=http://my-address:port
        volumeMounts:
        - name: kubernetes-dashboard-certs
          mountPath: /certs

Save your changes and exit the text editor then install the dashboard from a PowerShell prompt in the same directory as the kubernetes-dashboard.yaml file:

kubectl apply -f .\kubernetes-dashboard.yaml 

The output should look something like this:

secret "kubernetes-dashboard-certs" created
serviceaccount "kubernetes-dashboard" created
role.rbac.authorization.k8s.io "kubernetes-dashboard-minimal" created
rolebinding.rbac.authorization.k8s.io "kubernetes-dashboard-minimal" created
deployment.apps "kubernetes-dashboard" created
service "kubernetes-dashboard" created

相关文章

网友评论

      本文标题:2020-04-08 Kubernetes Dashboard

      本文链接:https://www.haomeiwen.com/subject/ignfmhtx.html