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

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # Securing your deployed applications > 原文:[https://docs.gitlab.com/ee/user/project/clusters/securing.html](https://docs.gitlab.com/ee/user/project/clusters/securing.html) * [Overview](#overview) * [Requirements](#requirements) * [Understanding how GitLab Managed Apps are installed](#understanding-how-gitlab-managed-apps-are-installed) * [Connect the cluster to GitLab](#connect-the-cluster-to-gitlab) * [Set up a GitLab Runner](#set-up-a-gitlab-runner) * [Create a Cluster Management Project](#create-a-cluster-management-project) * [Install GitLab Container Network Policy](#install-gitlab-container-network-policy) * [Install GitLab Container Host Security](#install-gitlab-container-host-security) # Securing your deployed applications[](#securing-your-deployed-applications "Permalink") 使用 GitLab 可以輕松保護在[連接的 Kubernetes 集群中](index.html)部署的應用程序的安全. 您可以從[Web 應用程序防火墻](../../../topics/web_application_firewall/quick_start_guide.html) , [網絡策略](../../../topics/autodevops/stages.html#network-policy)甚至[容器主機安全性](../../clusters/applications.html#install-falco-using-gitlab-cicd)的保護中受益. 無論您的應用程序是否通過 GitLab CI / CD 進行部署,此頁面均包含將群集連接到 GitLab 并安裝這些功能的完整的端到端步驟和說明. 如果您使用[Auto DevOps](../../../topics/autodevops/index.html)與 GitLab 一起構建和部署您的應用程序,請參見上面有關[GitLab 托管應用程序](../../clusters/applications.html)的文檔. ## Overview[](#overview "Permalink") 在較高級別,所需步驟包括以下步驟: * 將集群連接到 GitLab. * 設置一個或多個跑步者. * 設置集群管理項目. * 安裝 Web 應用程序防火墻,網絡策略和/或容器主機安全性. * 安裝 Prometheus,以在[威脅監視](../../application_security/threat_monitoring/)儀表板中獲取統計信息和指標. ### Requirements[](#requirements "Permalink") 最低要求(取決于您要安裝的 GitLab 管理應用程序): * 您的群集已連接到 GitLab(ModSecurity,Cilium 和 Falco). * 至少安裝了一個 GitLab Runner(僅限 Cilium 和 Falco). ### Understanding how GitLab Managed Apps are installed[](#understanding-how-gitlab-managed-apps-are-installed "Permalink") **注意:**為簡單起見,這些圖使用術語*Kubernetes* . 實際上,Sidekiq 連接到在集群中的 Pod 中運行的 Helm Tiller 守護程序. 您可以通過一鍵式安裝過程從 GitLab Web 界面安裝 GitLab 托管應用程序. GitLab 使用 Sidekiq(后臺處理服務)來簡化此過程. sequenceDiagram 自動編號 GitLab->> + Sidekiq:安裝 GitLab 托管應用程序 Sidekiq->> + Kubernetes:Helm 安裝 Kubernetes->>-Sidekiq:安裝完成 Sidekiq->>-GitLab:刷新 UI 盡管此安裝方法比較容易,因為它是用戶界面中的"點擊"操作,但它不靈活且難以調試. 當出現問題時,您將看不到部署日志. Web 應用程序防火墻功能使用此安裝方法. 但是,下一代的 GitLab 托管應用程序 V2( [基于 CI / CD 的 GitLab 托管應用程序](https://gitlab.com/groups/gitlab-org/-/epics/2103) )不使用 Sidekiq 進行部署. 所有應用程序都使用 GitLab CI / CD 管道以及因此使用的 GitLab Runners 進行部署. sequenceDiagram 自動編號 GitLab->> + GitLab:觸發管道 GitLab->> + Runner:運行部署作業 Runner->> + Kubernetes:Helm 安裝 Kubernetes->>-Runner:安裝完成 Runner->>-GitLab:報告工作狀態和更新流程 調試更容易,因為您可以訪問這些作業的原始日志(在失敗的情況下,可以將 Helm Tiller 輸出作為工件使用),并且靈活性要好得多. 由于這些部署僅在管道正在運行時觸發(很可能在集群管理存儲庫中有新提交時才觸發),因此每個操作都具有書面記錄,并遵循經典的合并請求工作流程(批準,合并,部署). 網絡模型(Cilium)托管的應用程序和容器主機安全性(Falco)都使用此模型進行部署. ## Connect the cluster to GitLab[](#connect-the-cluster-to-gitlab "Permalink") 要將 GitLab 托管應用程序部署到群集,必須首先[將群集添加](add_remove_clusters.html)到 GitLab. 然后從項目或組 Kubernetes 頁面[安裝](../../clusters/applications.html#installing-applications) Web 應用程序防火墻. 請注意,您的項目不必通過 GitLab 托管或部署. 您可以獨立于使用群集的應用程序來管理群集. ## Set up a GitLab Runner[](#set-up-a-gitlab-runner "Permalink") 要安裝基于 CI / CD 的 GitLab 托管應用程序,必須在 GitLab 中運行使用 GitLab Runner 的管道. 您可以在上一步中添加的 Kubernetes 集群中[安裝 GitLab 運行程序](../../clusters/applications.html#gitlab-runner) ,或者如果使用的是 GitLab.com,則可以使用 GitLab 提供的共享運行程序之一. 將群集連接到 GitLab 并安裝好 GitLab Runner 之后,您可以繼續執行下一步,并開始安裝 Cilium 和 Falco GitLab 托管應用程序以保護托管在此群集上的應用程序. ## Create a Cluster Management Project[](#create-a-cluster-management-project "Permalink") [群集管理項目](../../clusters/management_project.html)是一個 GitLab 項目,其中包含一個`.gitlab-ci.yml`文件,用于將 GitLab 托管應用程序部署到您的群集中. 該項目使用 Kubernetes [`cluster-admin`](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles)特權運行所需的圖表. 該項目的創建與其他任何 GitLab 項目一樣開始. 使用一個空項目,并在根目錄下添加一個`gitlab-ci.yml`文件,其中包含以下模板: ``` include: - template: Managed-Cluster-Applications.gitlab-ci.yml ``` 要使該項目成為集群管理項目,請遵循以下[說明](../../clusters/management_project.html#selecting-a-cluster-management-project) . 即使您的應用程序未托管在 GitLab 上,也可以這樣指定該項目. 在這種情況下,請創建一個新的空項目,您可以在其中選擇新創建的集群管理項目. ## Install GitLab Container Network Policy[](#install-gitlab-container-network-policy "Permalink") GitLab 容器網絡策略基于[Cilium](https://cilium.io/) . 要安裝 Cilium GitLab 托管應用程序,請將`.gitlab/managed-apps/config.yaml`文件添加到群集管理項目中: ``` # possible values are gke, eks or you can leave it blank clusterType: gke cilium: installed: true ``` 您的應用程序不必由 GitLab 進行管理或部署即可利用此功能. [閱讀](../../clusters/applications.html#install-cilium-using-gitlab-cicd)有關配置容器網絡策略的[更多](../../clusters/applications.html#install-cilium-using-gitlab-cicd)信息. ## Install GitLab Container Host Security[](#install-gitlab-container-host-security "Permalink") 同樣,您可以在`.gitlab/managed-apps/config.yaml`基于[Falco](https://falco.org/)安裝 Container Host Security: ``` falco: installed: true ``` [閱讀](../../clusters/applications.html#install-falco-using-gitlab-cicd)有關配置容器主機安全性的[更多](../../clusters/applications.html#install-falco-using-gitlab-cicd)信息.
                  <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>

                              哎呀哎呀视频在线观看