<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 功能強大 支持多語言、二開方便! 廣告
                # Cluster management project (alpha) > 原文:[https://docs.gitlab.com/ee/user/clusters/management_project.html](https://docs.gitlab.com/ee/user/clusters/management_project.html) * [Permissions](#permissions) * [Usage](#usage) * [Selecting a cluster management project](#selecting-a-cluster-management-project) * [Configuring your pipeline](#configuring-your-pipeline) * [Setting the environment scope](#setting-the-environment-scope-premium) # Cluster management project (alpha)[](#cluster-management-project-alpha "Permalink") **警告:**這是*Alpha 版*功能,如有更改,恕不另行通知. 在 GitLab 12.5 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/32810) 可以將一個項目指定為集群的管理項目. 管理項目可用于以 Kubernetes [`cluster-admin`](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles)權限運行部署作業. 這對以下情況很有用: * 創建管道以將群集范圍的應用程序安裝到群集中,有關詳細信息,請參見[使用 GitLab CI / CD(alpha)](applications.html#install-using-gitlab-cicd-alpha)安裝. * 需要`cluster-admin`權限的所有作業. ## Permissions[](#permissions "Permalink") 僅管理項目將獲得`cluster-admin`權限. 所有其他項目將繼續獲得[命名空間范圍的`edit`級別特權](../project/clusters/add_remove_clusters.html#rbac-cluster-resources) . 管理項目僅限于以下內容: * 對于項目級集群,管理項目必須與集群項目位于相同的名稱空間(或子代)中. * 對于組級集群,管理項目必須與集群的組位于同一組(或子孫)中. * 對于實例級群集,沒有此類限制. ## Usage[](#usage "Permalink") 要將群集管理項目用于群集: 1. 選擇項目. 2. 配置管道. 3. 設置環境范圍. ### Selecting a cluster management project[](#selecting-a-cluster-management-project "Permalink") 選擇要使用的集群管理項目: 1. 導航到適當的配置頁面. 為一個: * [項目級集群](../project/clusters/index.html) ,導航到項目的**Operations> Kubernetes**頁面. * [組級別集群](../group/clusters/index.html) ,導航到您組的**Kubernetes**頁面. * [實例級集群](../instance/clusters/index.html) ,導航到管理區域的**Kubernetes**頁面. 2. 在" **高級設置"**部分中的"使用**集群管理項目"字段**中選擇項目. [![Selecting a cluster management project under Advanced settings](https://img.kancloud.cn/b4/61/b4618008438ea1526005635b36dd407f_1988x710.png)](img/advanced-settings-cluster-management-project-v12_5.png) ### Configuring your pipeline[](#configuring-your-pipeline "Permalink") 將項目指定為集群的管理項目后,在該項目中編寫[`.gitlab-ci.yml`](../../ci/yaml/README.html) . 例如: ``` configure cluster: stage: deploy script: kubectl get namespaces environment: name: production ``` ### Setting the environment scope[](#setting-the-environment-scope-premium "Permalink") 將多個群集與同一管理項目關聯時,可以使用[環境范圍](../project/clusters/index.html#setting-the-environment-scope-premium) . 每個作用域只能由單個群集用于管理項目. 例如,假設以下 Kubernetes 集群與管理項目相關聯: | Cluster | 環境范圍 | | --- | --- | | Development | `*` | | Staging | `staging` | | Production | `production` | [`.gitlab-ci.yml`](../../ci/yaml/README.html)設置的以下環境將分別部署到 Development,Staging 和 Production 集群. ``` stages: - deploy configure development cluster: stage: deploy script: kubectl get namespaces environment: name: development configure staging cluster: stage: deploy script: kubectl get namespaces environment: name: staging configure production cluster: stage: deploy script: kubectl get namespaces environment: name: production ```
                  <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>

                              哎呀哎呀视频在线观看