bmctl
ist ein Befehlszeilentool für GKE on Bare Metal, das das Erstellen und Verwalten von Clustern vereinfacht. Dieses Dokument ist eine umfassende Referenz für bmctl
-Befehle und die zugehörigen Flags.
Sicherung
Informationen zu Anthos Clusters on Bare Metal sichern.
Optionen
-h, --help help for backup
Sicherungscluster
Sichern Sie einen Anthos on Bare Metal-Cluster und speichern Sie die Sicherung in einer TAR-Datei.
backup cluster [flags]
Optionen
--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).
Weitere Informationen zum Sichern und Wiederherstellen von Clustern mit bmctl
finden Sie unter Cluster mit bmctl sichern und wiederherstellen.
check
Führen Sie Preflight- oder Systemdiagnosen für Ihre Cluster oder Ihre Infrastruktur aus.
Optionen
-h, --help help for check
Add-ons prüfen
Prüfen Sie den Betriebszustand von Cluster-Add-ons wie stackdriver-log-aggregator
, stackdriver-log-forwarder
und gke-connect-agent
.
check add-ons [flags]
Beispiele
# Do a health check for add-ons
bmctl check add-ons --cluster=cluster1
Optionen
--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.
Cluster prüfen
Integrität eines Clusters prüfen oder Cluster-Snapshot generieren
check cluster [flags]
Beispiele
# 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
Optionen
--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).
Konfiguration überprüfen
Prüfen Sie die Clusterkonfigurationsdatei.
check config [flags]
Beispiele
# Do check for cluster1.yaml file
bmctl check config --cluster=cluster1
Optionen
--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.
GCP prüfen
Clusterverbindung zur Google Cloud-Systemdiagnose
check gcp [flags]
Beispiele
# Do a machines' Google Cloud connectivity health check for cluster
bmctl check gcp --cluster=cluster1
Optionen
--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.
Häkchen in Kubernetes setzen
Kubernetes-Systemdiagnose
check kubernetes [flags]
Beispiele
# Do a kubernetes health check for cluster
bmctl check kubernetes --cluster=cluster1
Optionen
--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.
Knoten prüfen
Knotenzustand prüfen
check nodes [flags]
Beispiele
# Do a health check for some provisioned nodes
bmctl check nodes --addresses=192.168.0.1,192.168.0.4
Optionen
--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.
Preflight prüfen
Preflight-Prüfung.
Zusammenfassung
Preflight-Prüfung.
check preflight [flags]
Beispiele
# 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
Optionen
--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.
Weitere Informationen zu Preflight-Prüfungen finden Sie unter Preflight-Prüfungen.
create
Erstellen Sie eine Clusterkonfigurationsdatei, einen Cluster oder ein Kubernetes-Dienstkonto.
Optionen
-h, --help help for create
Cluster erstellen
Erstellen Sie einen Cluster aus einer Clusterkonfigurationsdatei.
Zusammenfassung
Erstellen Sie Anthos Bare Metal-Ressourcen. Dieser Befehl gibt eine kubeconfig-Datei des erstellten Clusters aus. Bewahren Sie diese Datei sicher auf, da sie Anmeldedaten für Ihren Cluster enthält. Für diesen Befehl ist die Berechtigung „serviceusage.services.get“ erforderlich, um die API-Aktivierung für Ihr Google Cloud-Projekt zu prüfen.
create cluster [flags]
Optionen
--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.
Weitere Informationen zum Erstellen von Clustern finden Sie unter Clustererstellung – Übersicht.
Konfiguration erstellen
Erstellen Sie eine Clusterkonfigurationsdatei. Diese Datei wird standardmäßig im Ordner bmctl-workspace/
create config [flags]
Optionen
-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
KSA erstellen
Erstellen Sie ein Kubernetes-Dienstkonto mit der Rolle „cluster-admin“ des Zielclusters.
Der Standardname des Kubernetes-Dienstkontos ist „kubernetes-service-account“, sodass das Flag „--name“ optional ist.
Der Befehl generiert ein Inhabertoken, mit dem Sie sich beim Cluster anmelden können.
Standardmäßig wird das Inhabertoken im Ordner „bmctl-workspace/“
create ksa [flags]
Optionen
-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.
deaktivieren
Anthos-VM-Laufzeit in einem Cluster deaktivieren.
Optionen
-h, --help help for disable
vmruntime deaktivieren
Anthos-VM-Laufzeit in einem Cluster deaktivieren.
disable vmruntime [flags]
Optionen
--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.
Weitere Informationen zum Aktivieren und Deaktivieren der VM-Laufzeit in Google Distributed Cloud finden Sie unter VM-Laufzeit in Google Distributed Cloud aktivieren oder deaktivieren.
enable
Aktivieren Sie die Anthos-VM-Laufzeit in einem Cluster.
Optionen
-h, --help help for enable
vmruntime aktivieren
Aktivieren Sie die Anthos-VM-Laufzeit in einem Cluster.
enable vmruntime [flags]
Optionen
-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.
Weitere Informationen zum Aktivieren und Deaktivieren der VM-Laufzeit in Google Distributed Cloud finden Sie unter VM-Laufzeit in Google Distributed Cloud aktivieren oder deaktivieren.
anmelden
Registrieren Sie einen Cluster, damit er von der Anthos On-Prem API verwaltet werden kann.
Optionen
-h, --help help for enroll
Cluster registrieren
Registrieren Sie einen Cluster, damit er von der Anthos On-Prem API verwaltet werden kann. Diese Registrierung ermöglicht die Clusterverwaltung über Clients wie die Google Cloud Console und die gcloud CLI.
enroll cluster [flags]
Optionen
-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)
Weitere Informationen zum Registrieren eines Clusters finden Sie unter Cluster zur Verwaltung von GKE on Bare Metal konfigurieren.
get
Rufen Sie eine Clusterkonfiguration oder Clusteranmeldedaten ab.
Optionen
-h, --help help for get
Konfiguration abrufen
Rufen Sie die Clusterkonfigurationsdatei ab. Mit dem Befehl werden benutzerdefinierte Ressourcen des Zielclusters abgerufen und eine Konfigurationsdatei ausgegeben.
get config [flags]
Optionen
-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.
Anmeldedaten abrufen
Anmeldedaten für Zielcluster abrufen. Mit dem Befehl wird im Ordner
get credentials [flags]
Optionen
-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
Softwareinstallationsvorgänge ausführen
Optionen
-h, --help help for install
virtctl installieren
virtctl als kubectl-Plug-in auf dem aktuellen Computer installieren Das virtctl-Plug-in unterstützt grundlegende VM-Vorgänge wie Erstellen, Verbinden und Ändern des Energiestatus.
install virtctl [flags]
Optionen
-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
Verschieben Sie Anthos Bare Metal-Ressourcen und alle Abhängigkeiten zwischen Verwaltungsclustern.
- Der Namespace des Zielclusters kann zusätzliche Ressourcen enthalten. In Konflikt stehende Ressourcen werden ersetzt.
move [flags]
Optionen
--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
Übertragen Sie Docker-Images in eine private Registry.
Optionen
-h, --help help for push
Push-Bilder
Übertragen Sie die TAR-Datei lokaler Container-Images in eine private Registry.
push images [flags]
Optionen
--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.
Bootstrap registrieren
Registrieren Sie den Bootstrap-Cluster bei der Hub API.
Zusammenfassung
Registrieren Sie den Bootstrap-Cluster bei der Hub API. Mit diesem Befehl wird ein lokaler Typcluster als Administratorcluster registriert. Der Befehl wartet, bis ein Cluster in der Google Cloud Console erstellt wird, und wird beendet, sobald der Cluster erfolgreich erstellt wurde.
register bootstrap [flags]
Optionen
--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.
Zurücksetzen
Clustermaschinen auf den Zustand vor der Installation zurücksetzen.
Zusammenfassung
Mit diesem Befehl wird versucht, Änderungen rückgängig zu machen, die bei vorherigen Installationsversuchen vorgenommen wurden. Das ist ein Best-Effort-Versuch für eine Wiederherstellung nach teilweisen Installationsfehlern.
reset [flags]
Optionen
--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.
Bootstrap zurücksetzen
Löschen Sie den Bootstrap-Cluster.
reset bootstrap [flags]
Beispiele
bmctl reset bootstrap
Optionen
-h, --help help for bootstrap
Knoten zurücksetzen
Setzen Sie die angegebenen Knoten auf den Status zurück, in dem sie sich vor der Installation von Anthos Clusters on Bare Metal befanden.
reset nodes [flags]
Beispiele
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
Optionen
--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.
Weitere Informationen zur Verwendung von bmctl reset nodes
, um Clusterknoten auf ihren Vorinstallationsstatus zurückzusetzen oder Cluster zu löschen, finden Sie unter Knoten zurücksetzen und Cluster löschen.
Wiederherstellen
Stellen Sie einen Cluster wieder her oder versuchen Sie, das Quorum für einen Cluster wiederherzustellen.
Zusammenfassung
Stellen Sie einen Anthos on Bare Metal-Cluster wieder her. Wenn dieser Befehl ohne den Cluster-Unterbefehl verwendet wird, wird versucht, einen Hochverfügbarkeitscluster aus einem Quorumverlust wiederherzustellen. Bei Verwendung mit dem Cluster-Unterbefehl stellt der Befehl einen Cluster aus einer Sicherungsdatei wieder her.
restore [flags]
Optionen
--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.
Cluster wiederherstellen
Anthos on Bare Metal-Cluster aus einer Sicherungsdatei wiederherstellen.
restore cluster [flags]
Optionen
--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.
Weitere Informationen zum Sichern und Wiederherstellen von Clustern mit bmctl
finden Sie unter Cluster mit bmctl sichern und wiederherstellen.
abmelden
Cluster abmelden.
Optionen
-h, --help help for unenroll
Cluster abmelden
Einen Anthos on Bare Metal-Cluster abmelden. Dieser Befehl deaktiviert die Möglichkeit, den Cluster mit der Anthos On-Prem API zu verwalten. Dadurch ist es nicht mehr möglich, den Cluster über die Google Cloud Console und die gcloud CLI zu verwalten.
unenroll cluster [flags]
Optionen
-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
Anthos Clusters on Bare Metal-Ressourcen aktualisieren.
Optionen
-h, --help help for update
Cluster aktualisieren
Cluster- und Knotenpoolkonfigurationen aktualisieren. Dieser Befehl wendet die in der Clusterkonfigurationsdatei vorgenommenen Änderungen an. Standardmäßig wird die Konfigurationsdatei
update cluster [flags]
Optionen
--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.
Weitere Informationen zum Aktualisieren von Clustern mit bmctl
finden Sie unter Cluster aktualisieren. Informationen dazu, welche Clusterkonfigurationsdateien änderbar sind, finden Sie unter Referenz zum Clusterkonfigurationsfeld.
Anmeldedaten aktualisieren
Clusteranmeldedaten aktualisieren.
Zusammenfassung
Anmeldedaten von Anthos on Bare Metal-Clustern aktualisieren. Mit diesem Befehl werden die Anmeldedaten des Administratorclusters sowie die Anmeldedaten von Nutzerclustern aktualisiert, die vom Administratorcluster verwaltet werden.
update credentials [flags]
Optionen
--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.
Anmeldedaten für Zertifizierungsstellen aktualisieren
Zertifizierungsstellen für Anthos on Bare Metal-Cluster aktualisieren.
Optionen
-h, --help help for certificate-authorities
Von übergeordneten Befehlen übernommene Optionen
--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.
Anmeldedaten von Zertifizierungsstellen aktualisieren
Rotieren Sie Zertifizierungsstellen.
update credentials certificate-authorities rotate [flags]
Optionen
--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.
Von übergeordneten Befehlen übernommene Optionen
--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
Führen Sie ein direktes Upgrade eines Anthos on Bare Metal-Clusters auf eine neue Version durch.
Optionen
-h, --help help for upgrade
Cluster upgraden
Führen Sie ein Upgrade eines Anthos on Bare Metal-Clusters durch.
Zusammenfassung
Führen Sie ein Upgrade eines Anthos on Bare Metal-Clusters durch. Dieser Befehl liest die Zielversion aus der Clusterkonfigurationsdatei und aktualisiert den Zielcluster auf die angegebene Version. Alle anderen Änderungen in der Clusterkonfigurationsdatei werden ignoriert. Der Befehl erfordert die Berechtigung „serviceusage.services.get“, um die API-Aktivierung für das Google Cloud-Projekt zu prüfen, das in der Konfigurationsdatei angegeben ist.
upgrade cluster [flags]
Optionen
--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.
Weitere Informationen zu Clusterupgrades finden Sie in der folgenden Dokumentation:
- Cluster upgraden
- Best Practices für Upgrades von Anthos Clusters on Bare Metal-Clustern
- Lebenszyklus und Phasen von Clusterupgrades
version
Drucken Sie die bmctl-Version aus.
version [flags]
Optionen
-h, --help help for version
-o, --output string Output format of version string. Support version, commit.