Documentation de référence sur la commande bmctl

bmctl est un outil de ligne de commande pour GKE sur Bare Metal qui simplifie la création et la gestion des clusters. Ce document constitue une documentation de référence complète sur les commandes bmctl et les options associées.

Avant de commencer

bmctl utilise les identifiants par défaut de l'application pour valider la valeur location dans la spécification de cluster (clusterOperations.location) lorsqu'elle n'est pas définie sur global. Cette validation est requise pour de nombreuses commandes bmctl. Pour que l'ADC fonctionne, vous devez effectuer l'une des opérations suivantes:

  • Définissez la variable d'environnement GOOGLE_APPLICATION_CREDENTIALS sur votre poste de travail administrateur sur le chemin d'accès d'un fichier d'identifiants de compte de service.

  • Utilisez vos identifiants utilisateur dans la gcloud CLI en tant qu'identifiants par défaut de l'application (ADC):

    gcloud auth application-default login
    

Certaines commandes bmctl vous permettent de spécifier un chemin d'accès à un fichier d'identifiants à l'aide d'une option.

sauvegarder

Sauvegardez les informations concernant les clusters Anthos sur bare metal.

Options

  -h, --help   help for backup

cluster de sauvegarde

Sauvegardez un cluster Anthos sur bare metal et enregistrez la sauvegarde dans un fichier tar.

backup cluster [flags]

Options

      --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).

Pour en savoir plus sur la sauvegarde et la restauration de clusters avec bmctl, consultez Sauvegarder et restaurer des clusters avec bmctl.

check

Effectuez des vérifications préliminaires ou des vérifications de l'état sur vos clusters ou votre infrastructure.

Options

  -h, --help   help for check

vérifie les modules complémentaires

Vérifiez l'état opérationnel des modules complémentaires du cluster, tels que stackdriver-log-aggregator, stackdriver-log-forwarder et gke-connect-agent.

check add-ons [flags]

Examples

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

Options

      --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.

vérifier le cluster

Vérifier l'état d'un cluster ou générer un instantané de cluster

check cluster [flags]

Examples

# 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

Options

      --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).

vérifier la configuration

Vérifiez le fichier de configuration du cluster.

check config [flags]

Examples

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

Options

      --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.

consulter GCP

Connectivité du cluster à la vérification de l'état Google Cloud.

check gcp [flags]

Examples

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

Options

      --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.

vérifier Kubernetes

vérification de l'état Kubernetes.

check kubernetes [flags]

Examples

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

Options

      --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.

vérifier les nœuds

Vérifier l'état des nœuds

check nodes [flags]

Examples

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

Options

      --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.

vérifier la requête préliminaire

Vérification préliminaire.

Synopsis

Vérification préliminaire.

check preflight [flags]

Examples

# 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

Options

      --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.

Pour en savoir plus sur les vérifications préliminaires, consultez la page Comprendre les vérifications préliminaires.

create

Créez un fichier de configuration de cluster, un cluster ou un compte de service Kubernetes (KSA).

Options

  -h, --help   help for create

créer un cluster

Créer un cluster à partir d'un fichier de configuration de cluster

Synopsis

Créer des ressources Anthos sur bare metal Cette commande émettra le fichier kubeconfig du cluster créé. Veillez à conserver ce fichier en lieu sûr, car il contient des identifiants pour votre cluster. Cette commande nécessite l'autorisation serviceusage.services.get pour vérifier l'activation des API pour votre projet Google Cloud.

create cluster [flags]

Options

      --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.

Pour en savoir plus sur la création de clusters, consultez la section Présentation de la création de clusters.

créer une configuration

Créez un fichier de configuration de cluster. Par défaut, ce fichier est créé dans le dossier bmctl-workspace/ .

create config [flags]

Options

  -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

créer ksa

Créez un compte de service Kubernetes avec le rôle cluster-admin du cluster cible. Le nom par défaut du compte de service Kubernetes est "kubernetes-service-account". L'option "--name" est donc facultative. La commande génère un jeton de support que vous pouvez utiliser pour vous connecter au cluster. Par défaut, le jeton de support est stocké dans le dossier bmctl-workspace/ .

create ksa [flags]

Options

  -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.

désactiver

Désactiver l'environnement d'exécution des VM Anthos dans un cluster

Options

  -h, --help   help for disable

désactiver vmruntime

Désactiver l'environnement d'exécution des VM Anthos dans un cluster

disable vmruntime [flags]

Options

      --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.

Pour en savoir plus sur l'activation et la désactivation de l'environnement d'exécution de VM sur GDC, consultez la section Activer ou désactiver l'environnement d'exécution de VM sur GDC.

enable

Activer l'environnement d'exécution des VM Anthos dans un cluster

Options

  -h, --help   help for enable

activer vmruntime

Activer l'environnement d'exécution des VM Anthos dans un cluster

enable vmruntime [flags]

Options

  -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.

Pour en savoir plus sur l'activation et la désactivation de l'environnement d'exécution de VM sur GDC, consultez la section Activer ou désactiver l'environnement d'exécution de VM sur GDC.

get

Obtenez la configuration ou les identifiants d'un cluster.

Options

  -h, --help   help for get

obtenir la configuration

Récupérez le fichier de configuration du cluster. La commande extrait les ressources personnalisées du cluster cible et émet un fichier de configuration.

get config [flags]

Options

  -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.

obtenir des identifiants

Obtenir les identifiants du cluster cible La commande crée un fichier kubeconfig dans le dossier / du poste de travail administrateur.

get credentials [flags]

Options

  -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

Effectue des opérations d'installation de logiciels.

Options

  -h, --help   help for install

installer virtctl

Installez virtctl sur la machine actuelle en tant que plug-in kubectl. Le plug-in virtctl est compatible avec les opérations de base des VM, telles que la création, la connexion et la modification de l'état d'alimentation.

install virtctl [flags]

Options

  -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

Déplacez les ressources Anthos sur bare metal et toutes les dépendances entre les clusters de gestion.

  • L'espace de noms du cluster cible peut contenir des ressources supplémentaires. Les ressources en conflit sont remplacées.
move [flags]

Options

      --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

Transférez des images Docker vers un registre privé.

Options

  -h, --help   help for push

transférer des images

Transférez le fichier tar des images de conteneurs locaux vers un registre privé.

push images [flags]

Options

      --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.

register

Enregistrer des ressources

Options

  -h, --help   help for register

enregistrer l'amorçage

Enregistrez le cluster d'amorçage dans l'API Hub.

Synopsis

Enregistrez le cluster d'amorçage dans l'API Hub. Cette commande enregistre un cluster de genre local en tant que cluster d'administrateur. La commande attend qu'un cluster soit créé dans la console Google Cloud et se ferme une fois le cluster créé.

register bootstrap [flags]

Options

      --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.
      --enable-apis                                  Auto enable APIs used by GKE on Bare Metal cluster, for the GCP Project specified by project-id flag
      --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.
  -h, --help                                         help for bootstrap
      --ignore-validation-errors                     A validation error override, allowing to proceed despite the validation errors.
      --location string                              Optional, Location of the GKEHub Membership, e.g. us-central1. If unspecified, global will be used. (default "global")
      --name string                                  Mandatory (either --name or --target-cluster-name needs to be provided), 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.
      --target-cluster-name string                   Optional, The target cluster name.

reset

Réinitialisez les machines du cluster à l'état précédant l'installation.

Synopsis

Cette commande tente d'annuler les modifications effectuées lors des tentatives d'installation précédentes. Il s'agit d'une tentative optimale destinée à la reprise après des échecs d'installation partiels.

reset [flags]

Options

      --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.

réinitialiser l'amorçage

Supprimez le cluster d'amorçage.

reset bootstrap [flags]

Examples

bmctl reset bootstrap

Options

  -h, --help   help for bootstrap

réinitialiser les nœuds

Réinitialisez les nœuds spécifiés dans leur état précédant l'installation des clusters Anthos sur bare metal.

reset nodes [flags]

Examples

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

Options

      --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.

Pour savoir comment utiliser bmctl reset nodes afin de rétablir l'état de préinstallation des nœuds de cluster ou supprimer des clusters, consultez la section Réinitialiser les nœuds et supprimer les clusters.

restaurer

Restaurez un cluster ou tentez de récupérer le quorum d'un cluster.

Synopsis

Restaurer un cluster Anthos sur bare metal Lorsqu'elle est utilisée sans la sous-commande "cluster", cette commande tente de restaurer un cluster à haute disponibilité à partir d'une perte de quorum. Lorsqu'elle est utilisée avec la sous-commande "cluster", la commande restaure un cluster à partir d'un fichier de sauvegarde.

restore [flags]

Options

      --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.

restaurer le cluster

Restaurez un cluster Anthos sur bare metal à partir d'un fichier de sauvegarde.

restore cluster [flags]

Options

      --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.

Pour en savoir plus sur la sauvegarde et la restauration de clusters avec bmctl, consultez Sauvegarder et restaurer des clusters avec bmctl.

S<<_includes/update.md>>

mettre à jour le cluster

Mettre à jour les configurations du cluster et du pool de nœuds Cette commande applique les modifications apportées dans le fichier de configuration du cluster. Par défaut, le fichier de configuration .yaml est stocké dans le dossier bmctl-workspace// du poste de travail administrateur.

update cluster [flags]

Options

      --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.

Pour en savoir plus sur la mise à jour des clusters avec bmctl, consultez la page Mettre à jour des clusters. Pour savoir quels fichiers de configuration de cluster sont modifiables, consultez la documentation de référence sur le champ de configuration du cluster.

modifier les identifiants

Mettre à jour les identifiants du cluster

Synopsis

Mettre à jour les identifiants des clusters Anthos sur bare metal Cette commande met à jour les identifiants du cluster d'administrateur et ceux des clusters d'utilisateur gérés par le cluster d'administrateur.

update credentials [flags]

Options

      --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.

mettre à jour les informations d'identification des autorités de certification

Mettre à jour les autorités de certification sur les clusters Anthos sur bare metal

Options

  -h, --help   help for certificate-authorities

Options héritées des commandes parentes

      --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.

mettre à jour les informations d'identification par les autorités de certification

Effectuer une rotation des autorités de certification

update credentials certificate-authorities rotate [flags]

Options

      --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.

Options héritées des commandes parentes

      --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

Mettez à niveau un cluster Anthos sur bare metal sur place vers une nouvelle version.

Options

  -h, --help   help for upgrade

mettre à niveau le cluster

Mettre à niveau un cluster Anthos sur bare metal

Synopsis

Mettre à niveau un cluster Anthos sur bare metal Cette commande lit la version cible à partir du fichier de configuration du cluster et met à niveau le cluster cible vers la version spécifiée. Toutes les autres modifications apportées au fichier de configuration du cluster sont ignorées. La commande nécessite l'autorisation serviceusage.services.get pour vérifier l'activation de l'API pour le projet Google Cloud spécifié dans le fichier de configuration.

upgrade cluster [flags]

Options

      --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.

Pour en savoir plus sur les mises à niveau des clusters, consultez la documentation suivante:

version

Imprimez la version bmctl.

version [flags]

Options

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