【问题标题】:Secure access to a private helm repository安全访问私有 helm 存储库
【发布时间】:2017-12-25 00:12:44
【问题描述】:
  1. 这甚至可以用 helm 实现吗?
  2. 可以使用哪些安全选项(BasicAuth?客户端证书?OAuth2?)
  3. 是否有任何关于此的示例/文档(服务器端和客户端)?

【问题讨论】:

    标签: kubernetes kubernetes-helm kubernetes-security


    【解决方案1】:

    Helm Private Repository 使用私有 GitHub 存储库

    步骤:

    1. 创建一个名为 private-helm-registry 或任何名称的私有 GitHub 存储库。
    2. 放置原始 Helm 图表。
    3. 创建charts文件夹并将index.yaml.tgz格式的打包图表放入该文件夹中。

    4. 创建具有只读访问权限的 GitHub Personal Access Token

    5. 使用以下命令将您的存储库添加到 helm:

      $ helm repo add helm-registry 'https://<git_hub_personal_access_token>@raw.githubusercontent.com/myGitHubAccountName/private-helm-registry/master/charts/'
      "helm-registry" has been added to your repositories
      

      注意:

      1. Enclose the Url with single quotes ' '.
      2. The trailing / is mandatory.
      
    6. 要将开发或其他分支添加为 helm 存储库,请使用分支名称:

      $ helm repo add helm-registry-dev 'https://<git_hub_personal_access_token>@raw.githubusercontent.com/myGitHubAccountName/private-helm-registry/<branch>/charts/'
      "helm-registry-dev" has been added to your repositories
      

    更多信息请访问:Using a private github repo as helm chart repo

    【讨论】:

      【解决方案2】:

      如果您想要一个私有 helm 存储库,至少据我所知,目前没有太多选择。

      • 在部署存储库的地方使用内部网络,这样外部世界就无法访问它。
      • 使用 helm 插件或编写自己的插件。

      所以基本上没有内置的 helm 私有存储库,但是您可以使用 helm 插件实现所需的功能。

      插件示例:

      • GitHub - 用于将 GitHub Pages 用作图表存储库。不是私人仓库,但它显示了一个插件的想法,它非常小而且简单。
      • Keybase - 类似于 GitHub 插件,但将图表存储在 Keybase 中。仍然不是私有的,但可以修改为使用 keybase /private 目录。
      • App Registry - 使用应用注册表 (quay.io) 来存储图表。
      • AWS S3 - 提供了一种将 Amazon S3 用作 helm 图表的私有存储库的方法。我是这个插件的作者,我写它是因为上面的所有选项都不适合我的目的。
      • Azure Blob Stoage - 此博文包含一种将 Azure Blob 存储用作 helm 图表的私有存储库的方法

      【讨论】:

        【解决方案3】:

        我假设您的意思是 Helm Repo,而不是保护 docker 图像。

        我的理解是它只是一个基本的网络服务器 您可以只使用 GCS 或 S3 并设置 IAM 规则来保护它们吗?

        【讨论】:

          猜你喜欢
          • 2018-11-27
          • 2022-07-21
          • 2016-11-10
          • 1970-01-01
          • 2021-06-13
          • 2021-08-03
          • 2021-04-29
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多