“文档” 菜单
文档首页
/ /
Atlas
/ / /

Atlas Kubernetes 配置生成

在此页面上

  • 语法
  • 选项
  • 继承选项
  • 举例

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

此命令以 Kubernetes 兼容格式导出 Atlas 对象的配置,包括项目、部署和用户,以便您使用 Atlas Kubernetes Operator 管理这些资源。 有关更多信息,请参阅 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 密钥的标志。
--operatorVersion
字符串
false
要为其生成资源的 Atlas Kubernetes Operator 版本。 该值默认为“ 2 . 4 . 0 ”。
--orgId
字符串
false
要使用的组织 ID。 此选项会覆盖配置文件或环境变量中的设置。
--projectId
字符串
false
标识要使用的项目的十六进制字符串。 此选项会覆盖配置文件或环境变量中的设置。
--targetNamespace
字符串
false
用于生成的 Kubernetes 实体的命名空间
名称
类型
必需
说明
-P, --profile
字符串
false
# 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 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>

后退

应用

来年

运算符