🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# GitLab cloud native Helm Chart > 原文:[https://docs.gitlab.com/charts/](https://docs.gitlab.com/charts/) * [Introduction](#introduction) * [Limitations](#limitations) * [GitLab Helm chart quick start guide](#gitlab-helm-chart-quick-start-guide) * [Troubleshooting](#troubleshooting) * [Installation](#installation) * [Global settings](#global-settings) * [Complete properties list](#complete-properties-list) * [Upgrading](#upgrading) * [Uninstall](#uninstall) * [Advanced](#advanced) * [Advanced Configuration](#advanced-configuration) * [Migrate from Omnibus GitLab to Kubernetes](#migrate-from-omnibus-gitlab-to-kubernetes) * [Architecture](#architecture) * [Development](#development) * [GitLab version mappings](#gitlab-version-mappings) * [Contributing](#contributing) # GitLab cloud native Helm Chart[](#gitlab-cloud-native-helm-chart "Permalink") 这是在云本机环境上安装 GitLab 的官方,推荐和受支持的方法. **注意:**不必在 Kubernetes 上安装 GitLab 即可使用[GitLab Kubernetes 集成](https://docs.gitlab.com/ee/user/project/clusters/) . ## Introduction[](#introduction "Permalink") The `gitlab/gitlab` chart is the best way to operate GitLab on Kubernetes. This chart contains all the required components to get started, and can scale to large deployments. 该图表包括完整的体验所需的所有组件,但是每个部分都可以单独安装. * GitLab 核心组件: * [NGINX 入口](charts/nginx/index.html) * [登记处](charts/registry/index.html) * [亚搏体育 app](charts/gitlab/gitaly/index.html) / [Gitaly](charts/gitlab/gitaly/index.html) * GitLab / [GitLab 出口商](charts/gitlab/gitlab-exporter/index.html) * GitLab / [GitLab Grafana](charts/gitlab/gitlab-grafana/index.html) * GitLab / [GitLab 外壳](charts/gitlab/gitlab-shell/index.html) * GitLab / [迁移](charts/gitlab/migrations/index.html) * [亚搏体育 app](charts/gitlab/sidekiq/index.html) / [Sidekiq](charts/gitlab/sidekiq/index.html) * GitLab / [web 服务](charts/gitlab/webservice/index.html) * 可选依赖项: * [PostgreSQL 的](https://hub.helm.sh/charts/bitnami/postgresql) * [雷迪斯](https://hub.helm.sh/charts/bitnami/redis) * [MinIO](charts/minio/index.html) * 可选的补充: * [普罗米修斯](https://hub.helm.sh/charts/stable/prometheus) * [格拉法纳](https://hub.helm.sh/charts/stable/grafana) * 使用 Kubernetes 执行器的[*非特权*](https://docs.gitlab.com/runner/install/kubernetes.html) [GitLab Runner](https://docs.gitlab.com/runner/) * 使用[Jetstack](https://www.jetstack.io/)的[cert-manager](https://cert-manager.io/docs/)通过[Let's Encrypt](https://letsencrypt.org/)自动提供 SSL ## Limitations[](#limitations "Permalink") 使用 Helm 图表当前无法使用 GitLab 的某些功能: * [GitLab Pages](https://gitlab.com/gitlab-org/charts/gitlab/-/issues/37) * [Smartcard authentication](https://gitlab.com/gitlab-org/charts/gitlab/-/issues/988) 数据库限制: * GitLab Geo 功能[需要使用外部数据库服务](installation/deployment.html#postgresql) . ## GitLab Helm chart quick start guide[](#gitlab-helm-chart-quick-start-guide "Permalink") 对于那些希望在*非生产*用例中尽快建立并运行这些图表的人,我们提供了概念验证(PoC)部署[快速入门指南](quickstart/index.html) . 本指南将通过部署这些图表使用默认值和功能引导用户,但*不*符合生产做好准备的要求. 如果希望在持续负载下将这些图表部署到生产中,则应遵循以下完整的[安装指南](#installation) . ## Troubleshooting[](#troubleshooting "Permalink") 我们已尽力使这些图表尽可能地无缝,但偶尔也会出现无法控制的问题. 我们已收集了一些常见问题的疑难解答技巧. 在提出[问题](https://gitlab.com/gitlab-org/charts/gitlab/-/issues)之前,请先检查这些内容,并通过提出[合并请求](https://gitlab.com/gitlab-org/charts/gitlab/-/merge_requests)随意添加它们! See [Troubleshooting](troubleshooting/index.html). ## Installation[](#installation "Permalink") `gitlab/gitlab`图表包含所有必需的依赖项. 在生产中,您可能需要启用可选功能或[高级配置](#advanced-configuration) . 本指南深入介绍了这些图表的所有选项和功能. 如果您只是想部署概念验证进行测试,我们强烈建议您遵循我们的[快速入门](#gitlab-helm-chart-quick-start-guide)进行第一次迭代. 1. [Preparation](installation/index.html) 2. [Deployment](installation/deployment.html) ### Global settings[](#global-settings "Permalink") 这些图表的复杂性使其可以使用全局属性. 有许多通用全局设置适用于多个图表. 有关不同的全局配置值及其应用程序的详细信息,请参见[Globals 文档](charts/globals.html) . ### Complete properties list[](#complete-properties-list "Permalink") 经常要求我们将所有可能的属性表直接放入此索引. 这些图表是规模*庞大* ,并作为属性的这种数量超过背景的量,我们在这里很舒服配售. 请参阅我们(几乎) [全面的属性和默认值列表](installation/command-line-options.html) . ## Upgrading[](#upgrading "Permalink") 安装了 GitLab 图表后,应使用`helm upgrade`完成配置更改和图表更新: ``` helm repo add gitlab https://charts.gitlab.io/ helm repo update helm get values gitlab > gitlab.yaml helm upgrade gitlab gitlab/gitlab -f gitlab.yaml ``` 有关更多详细信息,请参阅[升级](installation/upgrade.html) . ## Uninstall[](#uninstall "Permalink") 要卸载 GitLab Chart,请运行以下命令: ``` helm uninstall gitlab ``` **注意:**在 Helm v2 中,您需要使用`helm delete --purge gitlab`命令. 为了连续起见,这些图表具有一些在执行`helm uninstall`时不会删除的 Kubernetes 对象. 这些是我们要求您有*意识地*删除的项目,因为它们会影响您应选择的重新部署. * 用于状态数据的 PVC,必须*自觉*删除 * Gitaly:这是您的存储库数据. * PostgreSQL(如果内部):这是您的元数据. * Redis(如果内部):这是缓存和作业队列,可以安全地将其删除. * 机密(如果由我们的共享机密工作生成). 这些图表旨在避免直接通过 Helm 生成 Kubernetes 秘密. 因此,Helm 无法删除它们. 它们包含密码,加密机密等.它们不应被恶意破坏. * ConfigMaps * `ingress-controller-leader-RELEASE-nginx` :这是由 NGINX Ingress 控制器本身生成的,不在我们图表的控制范围内. 可以安全地将其删除. PVC 和秘密将设置`release`标签,因此您可以通过以下方式找到它们: ``` kubectl get pvc,secret -lrelease=gitlab ``` ## Advanced[](#advanced "Permalink") 除了在云本机环境中进行 GitLab 的基本部署以外,还可以进行更复杂的配置. 本节为需要进一步计划的任务提供指导,例如大规模部署或从 Omnibus GitLab 迁移. ### Advanced Configuration[](#advanced-configuration "Permalink") 高级和大规模部署具有利用外部服务,扩展功能和备用提供程序的能力. 高级配置示例: * 亚搏体育 app Geo * 外部对象存储提供者 * 外部 PostgreSQL,Redis,Gitaly * 外部入口提供商 See [Advanced Configuration](advanced/index.html). ### Migrate from Omnibus GitLab to Kubernetes[](#migrate-from-omnibus-gitlab-to-kubernetes "Permalink") 可以从[Omnibus GitLab](https://docs.gitlab.com/omnibus/)迁移到这些图表. 这样做通常需要将现有数据迁移到对象存储,因此是[高级配置](advanced/index.html) . 要将现有的 Omnibus GitLab 实例迁移到这些图表,请遵循[迁移文档](installation/migration/index.html) . ## Architecture[](#architecture "Permalink") 这些图表非常复杂,因为它们可以协调整个应用程序套件的部署. 我们提供有关目标,结构,设计决策和资源消耗的[文档](architecture/index.html) . ## Development[](#development "Permalink") 对于那些有兴趣为这些图表做出贡献的人,我们提供了涵盖该项目工作范围的开发指南. 它们可以在[开发中](development/index.html) . ### GitLab version mappings[](#gitlab-version-mappings "Permalink") GitLab 图表与 GitLab 本身的版本号不同. 预计可能需要在图表中引入一些重大更改,这些更改可能会导致重大版本颠簸,而对这些更改的要求可能会完全阻止这些图表上的其他开发,直到完成为止. 要快速查看它们映射到的`gitlab`图表版本和 GitLab 版本的完整列表,请对[Helm](installation/tools.html#helm)发出以下命令: ``` helm repo add gitlab https://charts.gitlab.io/ helm search repo -l gitlab/gitlab ``` **注意**对于 Helm v2,搜索命令将为`helm search -l gitlab/gitlab` 有关更多信息,请访问[版本映射 docs](installation/version_mappings.html) . ### Contributing[](#contributing "Permalink") 除了我们的[贡献准则](https://gitlab.com/gitlab-org/charts/gitlab/tree/master/CONTRIBUTING.md)之外,请参阅[开发者文档](development/index.html)以了解如何对 GitLab 图表[做出贡献](https://gitlab.com/gitlab-org/charts/gitlab/tree/master/CONTRIBUTING.md) .