<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # Kubernetes可視化界面kubesphere ## 前言 Kubernetes也提供了默認的dashboard頁面,但是功能不是很強大,這里就不使用了 而是采用Kubesphere大桶全部的devops鏈路,通過kubesphere集成了很多套件 - https://kubesphere.io/zh/ :集群要求高 - https://kuboard.cn/:開源kuboard也不錯,集群要求不高【輕量級】 ## 簡介 KubeSphere是一款面向云原生設計的開源項目,在目前主流容器調度平臺Kubernetes之上構建的分布式多租戶容器管理平臺,提供簡單易用的操作界面以及向導式操作方式,在降低用戶使用容器調度平臺學習成本的同時,極大降低開發、測試、運維的日常工作的復雜度。 ## 安裝 ### 前提條件 https://kubesphere.com.cn/docs/quick-start/minimal-kubesphere-on-k8s/ - Kubernetes 版本必須為 “1.15.x,1.16.x,1.17.x 或 1.18.x”; - 確保您的計算機滿足最低硬件要求:CPU > 1 核,內存 > 2 G; - 在安裝之前,需要配置 Kubernetes 集群中的默認存儲類; - 當使用 `--cluster-signing-cert-file` 和 `--cluster-signing-key-file` 參數啟動時,在 kube-apiserver 中會激活 CSR 簽名功能。 請參閱 [RKE 安裝問題](https://github.com/kubesphere/kubesphere/issues/1925#issuecomment-591698309); - 有關在 Kubernetes 上安裝 KubeSphere 的前提條件的詳細信息,請參閱[前提條件](https://kubesphere.com.cn/docs/installing-on-kubernetes/introduction/prerequisites/)。 ### 安裝helm 下面我們需要在 **master** 節點安裝 **helm** Helm是Kubernetes的包管理器。包管理器類似于我們在 **Ubuntu** 中使用的 **apt**。**Centos** 中使用的 **yum** 或者**Python** 中的 **pip** 一樣,能快速查找、下載和安裝軟件包。Helm由客戶端組件helm和服務端組件Tiller組成,能夠將一組K8S資源打包統一管理,是查找、共享和使用為Kubernetes構建的軟件的最佳方式。 安裝3.0的 helm 首先我們需要去 [官網下載](https://helm.sh/docs/intro/quickstart/) - 第一步,[下載helm](https://github.com/helm/helm/releases)安裝壓縮文件,上傳到linux系統中 - 第二步,解壓helm壓縮文件,把解壓后的helm目錄復制到 usr/bin 目錄中 - 使用命令:helm ## 部署KubeSphere ### 安裝前 如果您的服務器無法訪問 GitHub,則可以分別復制 [kubesphere-installer.yaml](https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/kubesphere-installer.yaml) 和 [cluster-configuration.yaml](https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/cluster-configuration.yaml) 中的內容并將其粘貼到本地文件中。然后,您可以對本地文件使用 `kubectl apply -f` 來安裝 KubeSphere。 同時查看k8s集群的默認存儲類 ```bash kubectl get storageclass ``` ![image-20201123094120860](https://img.kancloud.cn/c0/4a/c04a1e320a58622a06943584dc02c198_722x49.png) 如果沒有默認存儲類,那么就需要安裝默認的存儲類,參考博客:[Kubernetes配置默認存儲類](http://moguit.cn/#/info?blogOid=575) 因為我安裝的是 **nfs**,所以在安裝了 **nfs** 服務器啟動 ```bash systemctl start nfs ``` ### 開始安裝 如果無法正常訪問github,可以提前把文件下載到本地 ```BASH kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/kubesphere-installer.yaml kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/cluster-configuration.yaml ``` 如果下載到了本地,可以這樣安裝 ```bash # 安裝 kubectl apply -f kubesphere-installer.yaml kubectl apply -f cluster-configuration.yaml # 卸載 kubectl delete -f kubesphere-installer.yaml kubectl delete -f cluster-configuration.yaml ``` ### 檢查安裝日志 ```bash kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f ``` 然后在查看pod運行狀況 ```bash kubectl get pod -n kubesphere-system ``` 能夠發現,我們還有兩個容器正在創建 ![image-20210110104812804](https://img.kancloud.cn/a9/c7/a9c72f87725a87a2fac5eaeca60f8290_626x131.png) 使用 `kubectl get pod --all-namespaces` 查看所有 Pod 是否在 KubeSphere 的相關命名空間中正常運行。 ```bash kubectl get pods --all-namespaces ``` 能夠發現所有的節點已經成功運行 ![image-20210113102423851](https://img.kancloud.cn/91/5a/915a616604833429eba135123f83979e_859x789.png) 如果是,請通過以下命令檢查控制臺的端口: ```bash kubectl get svc/ks-console -n kubesphere-system ``` 能夠看到我們的服務確保在安全組中打開了端口 30880,并通過 NodePort(IP:30880) ![image-20201123152147871](https://img.kancloud.cn/74/c0/74c0f6d347c1049906f1f2c09485c3a8_563x90.png) 使用默認帳戶和密碼(admin/P@88w0rd)訪問 Web 控制臺。 ```bash # 圖形化頁面 admin P@88w0rd http://192.168.177.130:30880/ ``` 登錄控制臺后,您可以在組件中檢查不同組件的狀態。如果要使用相關服務,可能需要等待某些組件啟動并運行。 ![components](https://img.kancloud.cn/23/ab/23aba0de66199ddae4a1483f20bbb870_1940x1117.png) ## 錯誤排查 ### 錯誤1 kubesphere無法登錄,提示 account is not active ![image-20210110110018004](https://img.kancloud.cn/28/b7/28b7d4323ee4ea0b69dd2d2040312bae_484x432.png) kubesphere 安裝完成后會創建默認賬戶admin/P@88w0rd,待ks-controller-manager啟動就緒,user controller 會將 user CRD中定義的password加密,user會被轉換為active狀態,至此賬戶才可以正常登錄。 當安裝完成后遇到默認賬戶無法登錄,看到account is not active相關錯誤提示時,需要檢查ks-controller-manager的運行狀態和日志。常見問題及解決方式如下: ```bash kubectl -n kubesphere-system get ValidatingWebhookConfiguration users.iam.kubesphere.io -o yaml >> users.iam.kubesphere.io.yaml kubectl -n kubesphere-system get secret ks-controller-manager-webhook-cert -o yaml >> ks-controller-manager-webhook-cert.yaml # edit ca as pr kubectl -n kubesphere-system apply -f ks-controller-manager-webhook-cert.yaml kubectl -n kubesphere-system apply -f users.iam.kubesphere.io.yaml # restart kubectl -n kubesphere-system rollout restart deploy ks-controller-manager ``` 來源:https://kubesphere.com.cn/forum/d/2217-account-is-not-active
                  <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>

                              哎呀哎呀视频在线观看