Docs Menu
Docs Home
/ /
Atlas CLI
/ / /

atlas kubernetes config generate

On this page

  • Syntax
  • Options
  • Inherited Options
  • Examples

Generate Kubernetes configuration resources for use with 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/docs/atlas/atlas-operator/

Command Syntax
atlas kubernetes config generate [options]
Name
Type
Required
Description
--clusterName
strings
false
One or more comma separated cluster names to import
--dataFederationName
strings
false
One or more comma separated data federation names to import
-h, --help
false
help for generate
--includeSecrets
false
Flag that generates kubernetes secrets with data for projects, users, deployments entities.
--operatorVersion
string
false
Version of Atlas Kubernetes Operator to generate resources for. This value defaults to "2.4.0".
--orgId
string
false
Organization ID to use. This option overrides the settings in the configuration file or environment variable.
--projectId
string
false
Hexadecimal string that identifies the project to use. This option overrides the settings in the configuration file or environment variable.
--targetNamespace
string
false
Namespaces to use for generated kubernetes entities
Name
Type
Required
Description
-P, --profile
string
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>

Back

apply