bmctl
est un outil de ligne de commande pour Google Distributed Cloud qui simplifie la création et la gestion des clusters. Ce document est une référence complète pour les commandes bmctl
et les indicateurs associés.
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 gcloud CLI pour définir vos identifiants utilisateur 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 avec un indicateur.
backup
Sauvegardez les informations des clusters Anthos sur Bare Metal.
Options
-h, --help help for backup
backup cluster
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 la section Sauvegarder et restaurer des clusters avec bmctl.
check
Effectuer des vérifications préliminaires ou de l'état sur vos clusters ou votre infrastructure
Options
-h, --help help for check
check add-ons
Vérifiez l'état opérationnel des modules complémentaires de cluster, tels que stackdriver-log-aggregator
, stackdriver-log-forwarder
et gke-connect-agent
.
check add-ons [flags]
Exemples
# 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.
check cluster
Vérifier l'état d'un cluster ou générer un instantané de cluster.
check cluster [flags]
Exemples
# 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).
check config
Vérifier le fichier de configuration du cluster.
check config [flags]
Exemples
# 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.
check gcp
Vérification de l'état de la connectivité du cluster à Google Cloud.
check gcp [flags]
Exemples
# 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.
check kubernetes
Vérification de l'état de Kubernetes.
check kubernetes [flags]
Exemples
# 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.
check nodes
Vérifiez l'état des nœuds.
check nodes [flags]
Exemples
# 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.
check preflight
Vérification préliminaire.
Synopsis
Vérification préliminaire.
check preflight [flags]
Exemples
# 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 requêtes préliminaires, consultez la section Comprendre les requêtes 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
create cluster
Créer un cluster à partir d'un fichier de configuration de cluster.
Synopsis
Créez des ressources Anthos sur Bare Metal. Cette commande émet un kubeconfig du cluster créé. Veillez à conserver ce fichier en lieu sûr, car il contient les identifiants de votre cluster. Cette commande nécessite l'autorisation serviceusage.services.get pour vérifier l'activation de l'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 page Présentation de la création de clusters.
create config
Créez un fichier de configuration du 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
create ksa
Créez un compte de service Kubernetes avec le rôle d'administrateur de cluster du cluster cible.
Le nom par défaut du compte de service Kubernetes est "kubernetes-service-account". L'indicateur "--name" est donc facultatif.
La commande génère un jeton d'authentification que vous pouvez utiliser pour vous connecter au cluster.
Par défaut, le jeton d'identité 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ésactivez Anthos VM Runtime dans un cluster.
Options
-h, --help help for disable
disable vmruntime
Désactivez Anthos VM Runtime 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 Activer ou désactiver l'environnement d'exécution de VM sur GDC.
activer
Activez l'environnement d'exécution des VM Anthos dans un cluster.
Options
-h, --help help for enable
enable vmruntime
Activez 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 Activer ou désactiver l'environnement d'exécution de VM sur GDC.
get
Obtenir une configuration de cluster ou des identifiants de cluster.
Options
-h, --help help for get
get config
Obtenir le fichier de configuration du cluster. La commande récupère 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.
Pour en savoir plus, consultez Obtenir des détails sur la configuration du cluster.
get credentials
Obtenez les identifiants du cluster cible. La commande crée un fichier kubeconfig dans le dossier
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.
Pour en savoir plus, consultez Obtenir des identifiants de cluster.
install
Effectue des opérations d'installation de logiciels.
Options
-h, --help help for install
install 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 sur les 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éplacer les ressources Anthos 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
push images
Transférez le fichier tar des images de conteneurs locales 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
register bootstrap
Enregistrez le cluster d'amorçage dans l'API Hub.
Synopsis
Enregistrez le cluster d'amorçage auprès de l'API Hub. Cette commande enregistre un cluster Kind local en tant que cluster d'administrateur. La commande attend la création d'un cluster 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.
réinitialiser
Rétablir les machines du cluster à l'état antérieur à 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 visant à récupérer les échecs d'installation partielle.
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.
reset bootstrap
Supprimez le cluster d'amorçage.
reset bootstrap [flags]
Exemples
bmctl reset bootstrap
Options
-h, --help help for bootstrap
reset nodes
Réinitialiser les nœuds spécifiés à l'état dans lequel ils se trouvaient avant l'installation d'Anthos sur Bare Metal.
reset nodes [flags]
Exemples
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 en savoir plus sur l'utilisation de bmctl reset nodes
afin de rétablir l'état d'avant l'installation des nœuds de cluster ou de supprimer des clusters, consultez Réinitialiser les nœuds et supprimer les clusters.
restore
Restaurer un cluster ou tenter de rétablir le quorum pour un cluster.
Synopsis
Restaurer un cluster Anthos sur Bare Metal. Lorsqu'elle est utilisée sans la sous-commande de cluster, cette commande tente de restaurer un cluster haute disponibilité après 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.
restore cluster
Restaurer 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 la section Sauvegarder et restaurer des clusters avec bmctl.
update
Mettre à jour des clusters Anthos sur Bare Metal.
Options
-h, --help help for update
update cluster
Mettre à jour les configurations de cluster et de pool de nœuds. Cette commande applique les modifications apportées au fichier de configuration du cluster. Par défaut, le fichier de configuration
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 les champs de configuration de cluster.
update credentials
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'administration et ceux des clusters d'utilisateurs 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.
update credentials certificate-authorities
Mettre à jour les autorités de certification sur des 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.
update credentials certificate-authorities rotate
Alterner les 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
Mettre à niveau un cluster Anthos sur Bare Metal vers une nouvelle version.
Options
-h, --help help for upgrade
upgrade 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 du 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 la mise à niveau des clusters, consultez la documentation suivante :
- Mettre à niveau les clusters
- Bonnes pratiques pour les mises à niveau de clusters Google Distributed Cloud
- Cycle de vie et étapes des mises à niveau de cluster
version
Affichir la version de bmctl.
version [flags]
Options
-h, --help help for version
-o, --output string Output format of version string. Support version, commit.