对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。
Docs 菜单

Atlas Kubernetes 配置生成

生成 Kubernetes 配置资源以与 Atlas Kubernetes Operator 一起使用。

This command exports configurations for Atlas objects including projects, deployments, and users in a Kubernetes-compatible format, allowing you to manage these resources using the Atlas Kubernetes Operator. For more information, see https://www.mongodb.com/zh-cn/docs/atlas/atlas-operator/

命令语法
atlas kubernetes config generate [options]
名称
类型
必需
说明

--clusterName

字符串

false

要导入的一个或多个以逗号分隔的集群名称

--dataFederationName

字符串

false

要导入的一个或多个以逗号分隔的Data Federation名称

-h,--help

false

生成帮助

--includeSecrets

false

使用项目、用户、部署实体的数据生成 Kubernetes 密钥的标志。

--independentResources

false

标志,使支持独立使用的生成资源使用外部 ID 而不是Kubernetes引用。

--operatorVersion

字符串

false

要为其生成资源的 Atlas Kubernetes Operator 版本。 该值默认为 " 2.13.0 "。

--orgId

字符串

false

要使用的组织 ID。 此选项会覆盖配置文件或环境变量中的设置。

--projectId

字符串

false

标识要使用的项目的十六进制字符串。 此选项会覆盖配置文件或环境变量中的设置。

--targetNamespace

字符串

false

用于生成的 Kubernetes 实体的命名空间

名称
类型
必需
说明

-P, --profile

字符串

false

要从您的配置文件中使用的配置文件的名称。要学习;了解Atlas CLI配置文件,请参阅 https://dochub.mongodb.org/core/atlas-cli-save-connection-settings.

# Export Project, DatabaseUsers, Deployments resources for a specific project without connection and integration secrets:
atlas kubernetes config generate --projectId=<projectId>
# Export Project, DatabaseUsers, Deployments resources for a specific project, but use external IDs where supported:
atlas kubernetes config generate --projectId=<projectId> --independentResources
# Export Project, DatabaseUsers, Deployments resources for a specific project including connection and integration secrets:
atlas kubernetes config generate --projectId=<projectId> --includeSecrets
# Export Project, DatabaseUsers, Deployments resources for a specific project including connection and integration secrets to a specific namespace:
atlas kubernetes config generate --projectId=<projectId> --includeSecrets --targetNamespace=<namespace>
# Export Project, DatabaseUsers, DataFederations and specific Deployment resources for a specific project including connection and integration secrets to a specific namespace:
atlas kubernetes config generate --projectId=<projectId> --clusterName=<cluster-name-1, cluster-name-2> --includeSecrets --targetNamespace=<namespace>
# Export resources for a specific version of the Atlas Kubernetes Operator:
atlas kubernetes config generate --projectId=<projectId> --targetNamespace=<namespace> --operatorVersion=1.5.1
# Export Project, DatabaseUsers, Clusters and specific DataFederation resources for a specific project to a specific namespace:
atlas kubernetes config generate --projectId=<projectId> --dataFederationName=<data-federation-name-1, data-federation-name-2> --targetNamespace=<namespace>
给本页内容打分