Referencia de comandos de bmctl

bmctl es una herramienta de línea de comandos para GKE en Bare Metal que simplifica la creación y la administración de clústeres. Este documento es una referencia completa para los comandos bmctl y las marcas relacionadas.

copia de seguridad

Crea copias de seguridad de los clústeres de Anthos alojados en Bare Metal.

Opciones

  -h, --help   help for backup

clúster de copia de seguridad

Crea una copia de seguridad de un clúster de Anthos alojado en Bare Metal y guárdala en un archivo tar.

backup cluster [flags]

Opciones

      --backup-file string                      path to the output backup files.
      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for cluster
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.
      --use-disk                                Perform the backup using the disk instead of in-memory buffer. This option only works when the command is run by the root user or with sudo.
      --yes                                     Perform the backup and do not prompt for confirmation (non-interactive mode).

Para obtener más información sobre la creación de copias de seguridad y el restablecimiento de clústeres con bmctl, consulta Crea una copia de seguridad de clústeres y restablécelos con bmctl.

check

Realiza verificaciones previas o de estado en los clústeres o la infraestructura.

Opciones

  -h, --help   help for check

marcar complementos

Verifica el estado operativo de los complementos del clúster, como stackdriver-log-aggregator, stackdriver-log-forwarder y gke-connect-agent.

check add-ons [flags]

Ejemplos

# Do a health check for add-ons
bmctl check add-ons --cluster=cluster1

Opciones

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for add-ons
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

verificar clúster

Verifica el estado de un clúster o genera una instantánea del clúster.

check cluster [flags]

Ejemplos

# Do a health check for cluster.
bmctl check cluster --cluster=cluster1
# Take a snapshot of the cluster (requires admin cluster to be available).
bmctl check cluster --snapshot --cluster=cluster1 --admin-kubeconfig=admin-kubeconfig
# Take a snapshot of the cluster nodes only (does not require admin cluster to be available).
bmctl check cluster --snapshot --cluster=cluster1 --snapshot-config=snapshot-config

Opciones

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for cluster
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --login-user string                       The user to login to each node. This will be ignored when admin-kubeconfig is set. (default "root")
      --node-ssh-key string                     The file contains ssh key to the nodes to capture snapshots against. While this flag is fully optional, when provided, nodes must also be provided.
      --nodes strings                           The comma-separated IP address list of the nodes to capture snapshots against. While this flag is fully optional, when provided, node-ssh-key must also be provided.
      --quiet                                   During snapshot run suppress logging to stdout.  (Console log is available in 'bmctl_diagnose_snapshot.log' file part of the snapshot)
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.
      --service-account-key-file string         The service account key file for uploading the snapshot. Please make sure this service account has the "roles/storage.admin" of its parent project for creating a Cloud Storage bucket and writing object to the bucket. Note that:
                                                - this flag is defaulted to the environment variable GOOGLE_APPLICATION_CREDENTIALS, if not provided.
                                                - this flag is ignored, if "--upload-to" flag is empty.
      --since duration                          This Only returns logs newer than a relative duration like 5s, 4m, or 3h. It defaults to all logs.
      --snapshot                                Takes a snapshot of the cluster's logs, configurations and other data if true.
      --snapshot-config string                  The config file of the snapshot. When this flag is omitted, a default configuration is applied.
      --snapshot-dry-run                        In dry-run mode, the command does not take the snapshot. Instead, it prints out the actions to be taken and the snapshot configuration.
      --snapshot-output string                  The output file of the snapshot.
      --snapshot-scenario string                The scenario of the snapshot. This is ignored when --config flag is specified. The supported scenarios are:
                                                - system: snapshot of system components, including their logs
                                                - all: snapshot of all pods, including their logs (default "system")
      --snapshot-temp-output-dir string         The temporary landing directory for snapshot.
      --upload-to string                        The Cloud Storage bucket name for uploading the snapshot. A new bucket will be created if it doesn't exist. Please follow the naming guidelines here(https://cloud.google.com/storage/docs/naming-buckets).

verificar configuración

Verifica el archivo de configuración del clúster.

check config [flags]

Ejemplos

# Do check for cluster1.yaml file
bmctl check config --cluster=cluster1

Opciones

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for config
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

comprobar GCP

Conectividad del clúster a la verificación de estado de Google Cloud.

check gcp [flags]

Ejemplos

# Do a machines' Google Cloud connectivity health check for cluster
bmctl check gcp --cluster=cluster1

Opciones

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for gcp
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

verificar Kubernetes

verificación de estado de Kubernetes.

check kubernetes [flags]

Ejemplos

# Do a kubernetes health check for cluster
bmctl check kubernetes --cluster=cluster1

Opciones

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for kubernetes
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

verificar nodos

Verifica el estado de los nodos.

check nodes [flags]

Ejemplos

# Do a health check for some provisioned nodes
bmctl check nodes --addresses=192.168.0.1,192.168.0.4

Opciones

      --addresses strings                       Node addresses, addresses should be a comma separated list, each address needs be a single IP address(e.g., 192.168.0.1)
      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for nodes
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

comprobar solicitud preliminar

Verificación preliminar.

Sinopsis

Verificación preliminar.

check preflight [flags]

Ejemplos

# Do a preflight check for cluster1.yaml in bmctl-workspace/cluster1
bmctl check preflight --cluster=cluster1. If kubeconfig flag (for example, --kubeconfig=bmctl-workspace/cluster1/cluster1-kubeconfig) is included, the command will trigger a preflight check for upgrading the cluster

Opciones

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for preflight
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

Para obtener más información sobre las comprobaciones preliminares, consulta Comprende las comprobaciones preliminares.

create

Crea un archivo de configuración de clúster, un clúster o una cuenta de servicio de Kubernetes (KSA).

Opciones

  -h, --help   help for create

crear clúster

Crea un clúster a partir de un archivo de configuración de clúster.

Sinopsis

Crea recursos de Anthos alojado en Bare Metal. Este comando emitirá un kubeconfig del clúster creado. Asegúrate de mantener seguro este archivo, ya que contiene credenciales para tu clúster. Este comando requiere el permiso serviceusage.services.get a fin de verificar la habilitación de la API para tu proyecto de Google Cloud.

create cluster [flags]

Opciones

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml
      --force                                   If true, ignore errors from preflight checks and validation except for Google Cloud check errors.
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for cluster
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

Para obtener más información sobre cómo crear clústeres, consulta Descripción general de la creación de clústeres.

crear configuración

Crear un archivo de configuración de clúster De forma predeterminada, este archivo se crea en la carpeta bmctl-workspace/.

create config [flags]

Opciones

  -c, --cluster cluster name      Cluster name, must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character
      --create-service-accounts   Auto create Google Cloud service accounts keys, if they do not already exist in workspace
      --enable-apis               Auto enable APIs used by Anthos Bare Metal cluster, for the Google Cloud project specified by project-id flag
      --force                     Overwrite existing config
  -h, --help                      help for config
      --project-id string         Google Cloud project where the new cluster will connect with via GKE hub and stackdriver logging/monitoring, required if --create-service-accounts or --enable-apis is true

crear ksa

Crea una cuenta de servicio de Kubernetes con el rol de administrador de clústeres del clúster de destino. El nombre predeterminado de la cuenta de servicio de Kubernetes es “kubernetes-service-account”, por lo que la marca “--name” es opcional. El comando genera un token del portador que puedes usar para acceder al clúster. De forma predeterminada, el token del portador se almacena en la carpeta bmctl-workspace/ .

create ksa [flags]

Opciones

  -c, --cluster string      Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml.
  -h, --help                help for ksa
      --ksa-name string     Name of the kubernetes service account and default value is kubernetes-service-account. (default "kubernetes-service-account")
      --kubeconfig string   Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.

inhabilitar

Inhabilita el entorno de ejecución de VM de Anthos en un clúster.

Opciones

  -h, --help   help for disable

inhabilitar vmruntime

Inhabilita el entorno de ejecución de VM de Anthos en un clúster.

disable vmruntime [flags]

Opciones

      --force               If true, delete all VM resources and disable vmruntime.
  -h, --help                help for vmruntime
      --kubeconfig string   Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.

Para obtener más información sobre cómo habilitar o inhabilitar el entorno de ejecución de VM en Google Distributed Cloud, consulta Habilita o inhabilita el entorno de ejecución de VM en Google Distributed Cloud.

enable

Habilita Anthos VM Runtime en un clúster.

Opciones

  -h, --help   help for enable

habilitar vmruntime

Habilita Anthos VM Runtime en un clúster.

enable vmruntime [flags]

Opciones

  -h, --help                help for vmruntime
      --kubeconfig string   Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.

Para obtener más información sobre cómo habilitar o inhabilitar el entorno de ejecución de VM en Google Distributed Cloud, consulta Habilita o inhabilita el entorno de ejecución de VM en Google Distributed Cloud.

enroll

Inscribe un clúster para que lo administre la API de Anthos On-Prem.

Opciones

  -h, --help   help for enroll

inscribir clúster

Inscribe un clúster para que lo administre la API de Anthos On-Prem. Esta inscripción permite administrar los clústeres a través de clientes, como la consola de Google Cloud y gcloud CLId.

enroll cluster [flags]

Opciones

  -c, --cluster string                 Cluster name.
      --cluster-resource-name string   Unique cluster name within a Google Cloud project/fleet. It is defaulted to be the same as the --cluster-name and they should be the same if possible. In case there is already another cluster with the same name enrolled in the project/fleet previously (under another admin cluster), this flag can be used to rename the cluster within the Google Cloud project/fleet.
  -h, --help                           help for cluster
      --kubeconfig string              Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --location location              The Google Cloud location to enroll the user cluster. The "us-west1" location is the default. (default us-west1)

Para obtener más información sobre la inscripción de un clúster, consulta Configura un clúster para que lo administre GKE en Bare Metal.

get

Obtén una configuración o credenciales de clúster.

Opciones

  -h, --help   help for get

obtener configuración

Obtén el archivo de configuración del clúster. El comando extrae los recursos personalizados del clúster de destino y emite un archivo de configuración.

get config [flags]

Opciones

  -c, --cluster string      Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml.
  -h, --help                help for config
      --kubeconfig string   Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.

obtener credenciales

Obtén credenciales del clúster de destino. El comando crea un archivo kubeconfig en la carpeta / de la estación de trabajo de administrador.

get credentials [flags]

Opciones

  -c, --cluster string      Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml.
  -h, --help                help for credentials
      --kubeconfig string   Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.

install

Realiza operaciones de instalación de software.

Opciones

  -h, --help   help for install

instalar virtctl

Instala virtctl en la máquina actual como un complemento de kubectl. El complemento virtctl admite operaciones básicas de VM, como crear, conectar y cambiar el estado de encendido.

install virtctl [flags]

Opciones

  -d, --dst-dir string   The dir virtctl binary to be installed, this path must be a valid one within PATH env variable
  -h, --help             help for virtctl

move

Transfiere los recursos de equipos físicos de Anthos y todas las dependencias entre los clústeres de administración.

  • El espacio de nombres del clúster de destino puede contener recursos adicionales; se reemplazan los recursos en conflicto.
move [flags]

Opciones

      --cluster-move-timeout duration    Cluster move timeout, default value is 15m. The input should contain the duration unit, e.g. 3600s, 60m or 1h. (default 15m0s)
      --from-kubeconfig string           kubeconfig file path for the source management cluster. If unspecified, will use the default discovered kubeconfig.
      --from-kubeconfig-context string   Context to be used within the kubeconfig file for the source management cluster. If empty, current context will be used.
  -h, --help                             help for move
  -n, --namespace string                 The namespace where the cluster resources are stored. If unspecified, the current context's namespace is used.
      --to-kubeconfig string             kubeconfig file path for the destination management cluster.
      --to-kubeconfig-context string     Context to be used within the kubeconfig file for the destination management cluster. If empty, current context will be used.

push

Enviar imágenes de Docker a un registro privado

Opciones

  -h, --help   help for push

imágenes push

Envía el archivo tar de imágenes de contenedor local a un registro privado.

push images [flags]

Opciones

      --cacert string             Private registry CA certificate file path.
      --dry-run                   Dry run.
      --email string              Email for private registry.
      --force-push                If set to true, will always push images even if images already exist in registry.
  -h, --help                      help for images
      --need-credential           Whether credential is needed for private registry. (default true)
      --password string           Password for private registry authentication.
  -r, --private-registry string   Private registry path that stores all Anthos Bare Metal images.
                                  Format should be <registry-name>/<optional-registry-namespace>.
      --source string             Path to Anthos Bare Metal container images compressed file.
  -t, --threads int               Push images with multiple threads. (default 4)
      --username string           Username for private registry authentication.

registrar arranque

Registra el clúster de arranque en la API de Hub.

Sinopsis

Registra el clúster de arranque en la API de Hub. Con este comando, se registra un clúster de tipo local como un clúster de administrador. El comando espera a que se cree un clúster en la consola de Google Cloud y sale una vez que se crea de forma correcta.

register bootstrap [flags]

Opciones

      --bootstrap-cluster-pod-cidr string            Bootstrap cluster pod CIDR (default "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string        Bootstrap cluster service CIDR (default "10.96.0.0/27")
      --cloud-operation-service-account-key string   Optional, service account key file used to access Google cloud service, service account key specified by environment variable GOOGLE_APPLICATION_CREDENTIALS will be used to fetch or create the Service account.
      --gcr-service-account-key string               Optional, service account key file used to pull GCR images, service account key specified by environment variable GOOGLE_APPLICATION_CREDENTIALS will be used to fetch or create the Service account.
      --gke-agent-service-account-key string         Optional, service account key file used to connect the GKE cluster in Google Cloud, service account key specified by environment variable GOOGLE_APPLICATION_CREDENTIALS will be used to fetch or create the Service account.
      --gke-register-service-account-key string      Optional, service account key file used to register the cluster in Google Cloud, service account key specified by environment variable GOOGLE_APPLICATION_CREDENTIALS will be used to fetch or create the Service account.
      --gkehub-endpoint gkehub-endpoint              Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                         help for bootstrap
      --ignore-validation-errors                     A validation error override, allowing to proceed despite the validation errors.
      --name string                                  Mandatory, Name of the bootstrap cluster. bmctl will register the bootstrap cluster with this name with GKE Connect.
      --project-id string                            Optional, Google Cloud project for GKE Connect. bmctl will register this bootstrap cluster into Google Cloud project temporarily, and un-register it after cluster is provisioned successfully.
      --registry-mirror-ca string                    Registry mirror CA file.
      --registry-mirror-credential string            Registry mirror credential file.
      --registry-mirror-endpoint string              Registry mirror endpoint.
      --reuse-bootstrap-cluster                      If true, use existing bootstrap cluster.
      --ssh-client-cert string                       Optional, Path of the SSH certificate. ABM will use this ssh key certificate while sshing in the machines.
      --ssh-key string                               Mandatory, Path of the SSH key. ABM will use this ssh key while sshing in the machines.

restablecer

Restablece las máquinas del clúster al estado anterior a la instalación.

Sinopsis

Este comando intenta deshacer los cambios realizados en los intentos de instalación anteriores. Es un mejor intento diseñado para recuperarse de fallas de instalación parciales.

reset [flags]

Opciones

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for reset
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

restablecer arranque

Borra el clúster de arranque.

reset bootstrap [flags]

Ejemplos

bmctl reset bootstrap

Opciones

  -h, --help   help for bootstrap

restablecer nodos

Restablece los nodos especificados al estado en que se encontraban antes de instalar los clústeres de Anthos alojados en Bare Metal.

reset nodes [flags]

Ejemplos

bmctl reset nodes --addresses 10.200.0.3,10.200.0.4 --ssh-private-key-path /root/.ssh/id_rsa --login-user root --gcr-service-account-key gcr.json

Opciones

      --addresses strings                       Node addresses, addresses should be a comma separated list, each address needs be a single IP address(e.g., 192.168.0.1)
      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml
      --force                                   Optional. If provided, nodes will be forcefully removed from the cluster without running reset jobs.
      --gcr-service-account-key string          Optional, path to the service account json key to pull gcr images. Mutually exclusive with --cluster flag. If not provided, the environment variable GOOGLE_APPLICATION_CREDENTIALS will be used.
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for nodes
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --login-user string                       login user to use to connect to the nodes. Mutually exclusive with --cluster flag. Optional and should be used together with --ssh-private-key-path. Default to root.
      --registry-mirror-ca string               Registry mirror CA file.
      --registry-mirror-credential string       Registry mirror credential file.
      --registry-mirror-endpoint string         Registry mirror endpoint.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.
      --ssh-private-key-path string             path to the ssh private key to connect to the nodes. Either --cluster or --ssh-private-key-path should be provided, but not both. Use this flag to reset the machines if the original cluster yaml is no longer available.

Si quieres obtener más información sobre el uso de bmctl reset nodes para restablecer los nodos del clúster a su estado previo a la instalación o borrar clústeres, consulta Restablece nodos y borra clústeres.

restablecer

Restablece un clúster o intenta recuperar el quórum de un clúster.

Sinopsis

Restablece un clúster de Anthos alojado en Bare Metal. Cuando se usa sin el subcomando de clúster, este comando intenta restablecer un clúster de alta disponibilidad a partir de una pérdida de quórum. Cuando se usa con el subcomando clúster, el comando restablece un clúster desde un archivo de copia de seguridad.

restore [flags]

Opciones

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml
      --control-plane-node string               IP for the surviving host address, should be a single IP address(e.g., 192.168.0.1).
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for restore
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       kubeconfig file path for the management cluster. This only needs to be provided if restoring a broken user cluster.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

restablecer clúster

Restablece un clúster de Anthos alojado en Bare Metal a partir de un archivo de copia de seguridad.

restore cluster [flags]

Opciones

      --backup-file string                      path to the backup file of the cluster.
      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for cluster
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       path to the kubeconfig of the management cluster.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.
      --use-disk                                Perform the restore using the disk instead of in-memory buffer. This option only works when the command is run by the root user or with sudo.

Para obtener más información sobre la creación de copias de seguridad y el restablecimiento de clústeres con bmctl, consulta Crea una copia de seguridad de clústeres y restablécelos con bmctl.

unenroll

Dar de baja un clúster

Opciones

  -h, --help   help for unenroll

dar de baja el clúster

Dar de baja un clúster de Anthos alojado en Bare Metal. Este comando inhabilita la capacidad de administrar el clúster con la API de Anthos local. La anulación de la inscripción inhabilita la capacidad de administrar el clúster a través de la consola de Google Cloud y gcloud CLI.

unenroll cluster [flags]

Opciones

  -c, --cluster string      Cluster name.
  -h, --help                help for cluster
      --kubeconfig string   Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.

update

Actualiza los recursos de clústeres de Anthos alojados en Bare Metal.

Opciones

  -h, --help   help for update

actualizar clúster

Actualiza la configuración del clúster y del grupo de nodos. Este comando aplica los cambios realizados en el archivo de configuración del clúster. Según la configuración predeterminada, el archivo de configuración .yaml se almacena en la carpeta bmctl-workspace// en la estación de trabajo de administrador.

update cluster [flags]

Opciones

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for cluster
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

Para obtener más información sobre cómo actualizar clústeres con bmctl, consulta Actualiza clústeres. Para ver qué archivos de configuración del clúster son mutables, consulta la Referencia del campo de configuración del clúster.

actualizar credenciales

Actualiza las credenciales del clúster.

Sinopsis

Actualiza las credenciales de los clústeres de Anthos alojado en Bare Metal. Este comando actualiza las credenciales del clúster de administrador y las de los clústeres de usuario que administra el clúster de administrador.

update credentials [flags]

Opciones

      --bootstrap-cluster-pod-cidr string                      Bootstrap cluster pod CIDR (default "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string                  Bootstrap cluster service CIDR (default "10.96.0.0/27")
      --cloud-operations-service-account-key-path string       New credential: path to cloud operations service account  key.
  -c, --cluster cluster name                                   Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml
      --gcr-key-path string                                    New credential: path to GCR service account key.
      --gke-connect-agent-service-account-key-path string      New credential: path to gke connect agent service account key.
      --gke-connect-register-service-account-key-path string   New credential: path to gke connect register service account key.
      --gkehub-endpoint gkehub-endpoint                        Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                                   help for credentials
      --ignore-validation-errors                               A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                                      Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                                If true, use existing bootstrap cluster.
      --ssh-private-key-path string                            New credential: path to ssh private key.

actualizar credenciales autoridades certificadoras

Actualiza las autoridades certificadoras de Anthos en clústeres de Bare Metal.

Opciones

  -h, --help   help for certificate-authorities

Opciones heredadas de comandos superiores

      --kubeconfig string   Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.

actualizar credenciales, autoridades certificadoras rotar

Rotar autoridades certificadoras

update credentials certificate-authorities rotate [flags]

Opciones

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for rotate
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

Opciones heredadas de comandos superiores

      --kubeconfig string   Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.

upgrade

Actualiza un clúster de Anthos alojado en Bare Metal a una versión nueva.

Opciones

  -h, --help   help for upgrade

actualizar clúster

Actualiza un clúster de Anthos alojado en Bare Metal.

Sinopsis

Actualiza un clúster de Anthos alojado en Bare Metal. Este comando lee la versión de destino del archivo de configuración del clúster y actualiza el clúster de destino a la versión especificada. Se ignorarán todos los demás cambios en el archivo de configuración del clúster. El comando requiere el permiso serviceusage.services.get a fin de verificar la habilitación de la API para el proyecto de Google Cloud especificado en el archivo de configuración.

upgrade cluster [flags]

Opciones

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml
      --cluster-update-timeout duration         Cluster update timeout, default value is 24h. The input should contain the duration unit, e.g. 3600s, 60m or 1h. (default 24h0m0s)
      --force                                   If true, ignore errors from preflight checks.
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for cluster
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.
      --skip-bootstrap-cidr-check               If true, skip checking CIDR and the number of nodes to determine whether upgrade would succeed.

Para obtener más información sobre las actualizaciones de los clústeres, consulta la siguiente documentación:

version

Imprime la versión de bmctl.

version [flags]

Opciones

  -h, --help            help for version
  -o, --output string   Output format of version string. Support version, commit.