<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                Dashboard 是基于網頁的 Kubernetes 用戶界面。 你可以使用 Dashboard 將容器應用部署到 Kubernetes 集群中,也可以對容器應用排錯,還能管理集群資源。 **** 參考文檔:https://kubernetes.io/zh-cn/docs/tasks/access-application-cluster/web-ui-dashboard/ <br/> >[info]不同版本的 Dashboard 支持的 Kubernetes 版本不同,可以到 https://github.com/kubernetes/dashboard/releases 查看說明。 >[warning]下面的操作都是在**主節點**上執行 **1. 創建 Dashboard** ```shell # kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.4.0/aio/deploy/recommended.yaml ``` <br/> **2. 查看是否已經創建完成** ```shell # kubectl get pods -n kubernetes-dashboard -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES dashboard-metrics-scraper-7bc864c59-bg8zz 1/1 Running 0 3m3s 10.244.1.4 k8s-node1 <none> <none> kubernetes-dashboard-6c7ccbcf87-k6sxk 1/1 Running 0 3m3s 10.244.2.3 k8s-node2 <none> <none> ``` <br/> **3. 設置允許遠程訪問** ```shell # kubectl -n kubernetes-dashboard edit service kubernetes-dashboard ``` ![](https://img.kancloud.cn/7e/38/7e38ef11ab86439dd2c935b7b8486ffd_1976x678.png) >[info]將`type: ClusterIP`修改成`type: NodePort`即可 <br/> **4. 創建訪問賬號與角色** ```shell # cat >dashboard-account.yaml<<EOF apiVersion: v1 kind: ServiceAccount metadata: name: admin-user namespace: kubernetes-dashboard --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: admin-user roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: cluster-admin subjects: - kind: ServiceAccount name: admin-user namespace: kubernetes-dashboard EOF # kubectl apply -f dashboard-account.yaml ``` >[info]什么都不用改,直接復制粘貼跑命令就行 <br/> **5. 創建 token** ```shell /* --duration=315360000s 為 token 有效時間,如果不指定則默認為 15 分鐘過期。*/ /* 315360000s 為 10 年。如果過期可以重新跑該命令生成新的 token */ # kubectl -n kubernetes-dashboard get secret $(kubectl -n kubernetes-dashboard get sa/admin-user -o jsonpath="{.secrets[0].name}") -o go-template="{{.data.token | base64decode}}" eyJhbGciOiJSUzI1NiIsImtpZ... ``` >[info]保存該 token 到自己的筆記本中,以后登錄 dashboard 就一直用該 token 了。 <br/> **6. 查看 dashboard 遠程訪問端口** ```shell # kubectl -n kubernetes-dashboard get service kubernetes-dashboard NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes-dashboard NodePort 10.101.50.137 <none> 443:31325/TCP 29m ``` >[info]443:31325/TCP 中的 31325 即為遠程訪問端口。 <br/> **7. 瀏覽器訪問dashboard:https://192.168.1.19:31325/** ``` 192.168.1.19 為主節點的 ipv4 ``` 輸入上面創建的 token 進行登錄。 ![](https://img.kancloud.cn/ee/53/ee532952f7cbcce4c229ac48f2c12712_1867x577.png) 登錄成功后的頁面。 ![](https://img.kancloud.cn/7a/08/7a089cb0103b33d97e742334d2e68f9c_2412x873.png)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看