Para agentes de IA: hay un índice de documentación disponible en https://www.mongodb.com/es/docs/llms.txt — versiones en markdown de todas las páginas están disponibles agregando .md a cualquier ruta URL.
Docs Menu

Referencia de comandos del complemento migrate-to-mck

The kubectl mongodb plugin's migrate-to-mck command generates the Kubernetes custom resources you need to migrate a self-managed deployment into Kubernetes under Kubernetes Operator. It has two subcommands: mongodb, which generates the MongoDB resource, and users, which generates MongoDBUser resources.

Ambos subcomandos validan la configuración de automatización de origen antes de generar cualquier resultado y finalizan con un estado distinto de cero si se produce algún problema que impida su correcto funcionamiento. Ambos admiten la solicitud interactiva de valores faltantes y un modo totalmente no interactivo cuando se proporcionan todos los indicadores necesarios.

Generates the MongoDB custom resource for the migration target.

Flag
Requerido
Descripción

--config-map-name

Name of the Ops Manager or Cloud Manager project ConfigMap.

--secret-name

Name of the Secret that holds the Ops Manager or Cloud Manager API key.

--namespace

No

Kubernetes namespace for the generated resource. Defaults to default.

-o, --output

No

Ruta de archivo donde se escribirá el recurso generado.

--certs-secret-prefix

Solo cuando TLS está habilitado

Sets spec.security.certsSecretPrefix on the generated resource, and suppresses the interactive prompt for this value.

--prometheus-secret-name

Solo cuando Prometheus esté habilitado

Name of a pre-created Secret that contains a password key, used for Prometheus scraping credentials.

--resource-name-override

No

Sets metadata.name on the generated resource. When the source replica set name is not a valid Kubernetes name, the plugin normalizes it automatically and sets spec.replicaSetNameOverride for you.

Generates MongoDBUser resources for the migration target's authenticated users.

Flag
Requerido
Descripción

--config-map-name

Name of the Ops Manager or Cloud Manager project ConfigMap.

--secret-name

Name of the Secret that holds the Ops Manager or Cloud Manager API key.

--namespace

No

Kubernetes namespace for the generated resources. Defaults to default.

-o, --output

No

Ruta de archivo donde se escribirán los recursos generados.

--users-secrets-file

No

Path to a CSV file that maps SCRAM users to Secrets. Each line uses the form username:database,secret-name. If you omit this flag, the plugin prompts you for a Secret name for each user, and suggests <username>-password as the default.

--resource-name-override

No

Name of the MongoDB resource that the generated MongoDBUser resources reference through mongodbResourceRef.name. Defaults to the normalized replica set name.

Nota

El complemento genera recursos MongoDBUser para usuarios X.509 y LDAP contra la base de datos $external. El complemento omite al usuario del agente de automatización.

Antes de ejecutar cualquiera de los subcomandos, cree los siguientes objetos de Kubernetes:

  • A project ConfigMap with baseUrl, orgId, and projectName keys.

  • An API-key Secret with publicKey and privateKey keys.

  • One Secret per SCRAM user, each with a password key.

  • If Prometheus is enabled, a Secret with a password key for the Prometheus scrape credentials.

  • Si TLS está habilitado:

    • A <resourceName>-ca ConfigMap with a ca-pem key.

    • A kubernetes.io/tls Secret named <certsSecretPrefix>-<resourceName>-cert.

  • Si la autenticación del agente X.509 está habilitada, se crea un Secret llamado <certsSecretPrefix>-<resourceName>-agent-certs.