bmctl
è uno strumento a riga di comando per Google Distributed Cloud che semplifica la creazione e la gestione dei cluster. Questo documento è un riferimento completo per i comandi bmctl
e i flag correlati.
Prima di iniziare
bmctl
utilizza le credenziali predefinite dell'applicazione (ADC) per convalidare il valore location
nella specifica del cluster (clusterOperations.location
) quando non è impostato su global
. Questa convalida è obbligatoria per molti comandi bmctl
. Affinché l'ADC funzioni, devi eseguire una delle seguenti operazioni:
Imposta la variabile di ambiente
GOOGLE_APPLICATION_CREDENTIALS
sulla tua workstation di amministrazione sul percorso di un file delle credenziali dell'account di servizio.Utilizza le credenziali utente di gcloud CLI come credenziali predefinite dell'applicazione (ADC):
gcloud auth application-default login
Alcuni comandi bmctl
ti consentono di specificare un percorso a un file delle credenziali con un flag.
backup
Esegui il backup delle informazioni sul cluster.
Opzioni
-h, --help help for backup
cluster di backup
Esegui il backup di un cluster e salvalo in un file tar.
backup cluster [flags]
Opzioni
--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
-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).
Per ulteriori informazioni sul backup e sul ripristino dei cluster con bmctl
, consulta
Eseguire il backup e il ripristino dei cluster con bmctl.
controllo
Esegui controlli preflight o di integrità sui tuoi cluster o sulla tua infrastruttura.
Opzioni
-h, --help help for check
controllare i componenti aggiuntivi
Controlla l'integrità operativa dei componenti aggiuntivi del cluster, ad esempio
stackdriver-log-aggregator
, stackdriver-log-forwarder
e
gke-connect-agent
.
check add-ons [flags]
Esempi
# Do a health check for add-ons
bmctl check add-ons --cluster=cluster1
Opzioni
--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
-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.
controlla cluster
Controlla l'integrità di un cluster o genera uno snapshot del cluster.
check cluster [flags]
Esempi
# 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
Opzioni
--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
--enforce-allowlist Enforces allowlist checking for kubectl/node
commands executed as part of collecting snapshot
that they are read-only. Commands not allowed will
be skipped. (default true)
-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.
--local Save the snapshot on your workstation only. This
will allow you to explicitly opt out of uploading
the snapshot to Google Cloud.
--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.
--num-of-parallel-threads int The number of parallel threads used for processing
snapshots. Note that --snapshot-config and
--num-of-parallel-threads flags cannot be used at
the same time. (default 10)
--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 that is needed to
upload the snapshot to your Google Cloud Storage
bucket and provision a dedicated Google Cloud
service account for your project to facilitate
snapshot sharing with Google.
Make sure that the service account key has the
ability to create and list buckets and objects in
your project. We recommend creating a custom role
with the following permissions and assigning this
custom role to your service account:
- storage.buckets.create
- storage.buckets.get
- storage.buckets.list
- storage.objects.create
- resourcemanager.projects.get
Note that all the storage permissions fall under
the "roles/storage.admin" IAM role. You can also
use that role, but it is too powerful and is not
recommended.
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.
Note that if a service account key is provided
either throuh the flag --service-account-key-file
or GOOGLE_APPLICATION_CREDENTIALS, the snapshot
will be automatically uploaded to your Google
Cloud Storage bucket. Also, a dedicated Google
Cloud service account for your project will be
provisioned for your project to facilitate
snapshot sharing with Google. Use --local to opt
out of snapshot uploading.
--snapshot-config --enforce_allowlist=false The config file of the snapshot. When this flag is
omitted, a default configuration is applied. An
allowlist enforcing read-only commands is in
effect by default, to bypass it specify
--enforce_allowlist=false option. Note that
--snapshot-config and --num-of-parallel-threads
flags cannot be used at the same time.
--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 Google 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
Controlla il file di configurazione del cluster.
check config [flags]
Esempi
# Do check for cluster1.yaml file
bmctl check config --cluster=cluster1
Opzioni
--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
-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.
controlla gcp
Controllo di integrità della connettività del cluster a Google Cloud.
check gcp [flags]
Esempi
# Do a machines' Google Cloud connectivity health check for cluster
bmctl check gcp --cluster=cluster1
Opzioni
--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
-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.
controlla kubernetes
Controllo dell'integrità di Kubernetes.
check kubernetes [flags]
Esempi
# Do a kubernetes health check for cluster
bmctl check kubernetes --cluster=cluster1
Opzioni
--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
-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.
controlla i nodi
Controlla l'integrità dei nodi.
check nodes [flags]
Esempi
# Do a health check for some provisioned nodes
bmctl check nodes --addresses=192.168.0.1,192.168.0.4
Opzioni
--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
-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.
controlla preflight
Controllo preflight.
Trama
Controllo preflight.
check preflight [flags]
Esempi
# 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
Opzioni
--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
-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.
controlla vmruntimepfc
Runtime VM per il controllo preflight di GDC.
check vmruntimepfc [flags]
Esempi
# Do vmruntime preflight check,
bmctl check vmruntimepfc --kubeconfig=$KUBECONFIG
Opzioni
-h, --help help for vmruntimepfc
--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.
Per ulteriori informazioni sui controlli preflight, consulta Informazioni sui controlli preflight.
configura
Configura gli account di servizio e i ruoli IAM e abilita le API su Google Cloud per l'autenticazione del cluster Workload Identity.
Opzioni
-h, --help help for configure
Configura i progetti
Configura le associazioni dei criteri IAM per l'autenticazione del cluster delle identità per i carichi di lavoro. Crea gli account di servizio richiesti e abilita le API richieste.
configure projects [flags]
Opzioni
--admin-cluster string admin cluster name
--cloud-ops-service-account string cloud ops service account
--controller-service-account string controller GCP service account
--gcr-service-account string GCR image pull service account
-h, --help help for projects
--location string GKE hub membership location (default "global")
--project-id string GCP project used in GKE connect
--proxy-url string proxy URL for accessing GCP services. If not specified,
bmctl looks for env variables HTTPS_PROXY and HTTP_PROXY
--user-clusters string one or more comma-delimited user cluster names
Per ulteriori informazioni sull'attivazione e sull'utilizzo dell'autenticazione del cluster di identità del workload, consulta Autenticazione del cluster di identità del workload.
create
Crea un file di configurazione del cluster, un cluster o un account di servizio Kubernetes (KSA).
Opzioni
-h, --help help for create
create cluster
Crea un cluster da un file di configurazione del cluster.
Trama
Crea risorse Google Distributed Cloud. Questo comando emette un file kubeconfig di un cluster creato. Assicurati di conservare questo file al sicuro, in quanto contiene le credenziali per il tuo cluster. Questo comando richiede l'autorizzazione serviceusage.services.get
per verificare l'abilitazione dell'API per il tuo progetto Google Cloud.
create cluster [flags]
Opzioni
--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.
-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.
Per ulteriori informazioni sulla creazione di cluster, consulta la panoramica della creazione di cluster.
create config
Crea un file di configurazione del cluster. Per impostazione predefinita, questo file viene creato nella cartella bmctl-workspace/<cluster_name>.
create config [flags]
Opzioni
--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
--create-service-accounts Auto create GCP service accounts keys, if they do not
already exist in workspace
--enable-apis Auto enable APIs used by Anthos Bare Metal cluster,
for the GCP Project specified by project-id flag
--force Overwrite existing config
-h, --help help for config
--ignore-validation-errors A validation error override, allowing to proceed
despite the validation errors.
--project-id string GCP 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
--proxy-url string Proxy URL for accessing GCP services. If not
specified, bmctl will look for env variable
HTTPS_PROXY and HTTP_PROXY
--reuse-bootstrap-cluster If true, use existing bootstrap cluster.
crea ksa
Crea un account di servizio Kubernetes con il ruolo cluster-admin del cluster di destinazione.
Il nome predefinito dell'account di servizio Kubernetes è kubernetes-service-account
, pertanto il flag --name
è facoltativo.
Il comando genera un token di accesso che puoi utilizzare per accedere al cluster.
Per impostazione predefinita, il token di accesso viene archiviato nella cartella bmctl-workspace/<cluster_name>
.
create ksa [flags]
Opzioni
-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.
disattiva
Disabilita il runtime GVM per GDC in un cluster.
Opzioni
-h, --help help for disable
disattiva vmruntime
Disattiva il runtime VM per GDC in un cluster.
disable vmruntime [flags]
Opzioni
--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.
Per saperne di più su come attivare e disattivare il runtime delle VM su GDC, consulta Attivare o disattivare il runtime delle VM su GDC.
attiva
Abilita il runtime VM per GDC in un cluster.
Opzioni
-h, --help help for enable
abilita vmruntime
Abilita il runtime VM per GDC in un cluster.
enable vmruntime [flags]
Opzioni
-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.
Per saperne di più su come attivare e disattivare il runtime delle VM su GDC, consulta Attivare o disattivare il runtime delle VM su GDC.
get
Recupera una configurazione del cluster o le credenziali del cluster.
Opzioni
-h, --help help for get
get config
Recupera il file di configurazione del cluster. Il comando estrae le risorse personalizzate del cluster di destinazione ed emette un file di configurazione.
get config [flags]
Opzioni
-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.
Per ulteriori informazioni, vedi Ottenere i dettagli di configurazione del cluster.
get credentials
Recupera le credenziali del cluster di destinazione. Il comando crea un file kubeconfig nella cartella <workspace dir>/<cluster name>
sulla
workstation di amministrazione.
get credentials [flags]
Opzioni
-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.
Per ulteriori informazioni, consulta Ottenere le credenziali del cluster.
install
Esegue operazioni di installazione del software.
Opzioni
-h, --help help for install
installa virtctl
Installa virtctl
nella macchina attuale come plug-in kubectl
. Il plug-in virtctl
supporta le operazioni di base delle VM, come creazione, connessione e modifica dello stato di alimentazione.
install virtctl [flags]
Opzioni
-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
Sposta le risorse di Google Distributed Cloud e tutte le dipendenze tra i cluster di gestione.
- Lo spazio dei nomi del cluster di destinazione può contenere risorse aggiuntive, mentre quelle in conflitto vengono sostituite.
move [flags]
Opzioni
--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.
eseguire il push
Esegui il push delle immagini Docker in un registry privato.
Opzioni
-h, --help help for push
inviare immagini
Esegui il push del file tar delle immagini container locali in un registry privato.
push images [flags]
Opzioni
--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.
--format string Format of images in the source file. Should be one of tarball or oci
(default). (default "oci")
-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
Registra le risorse.
Opzioni
-h, --help help for register
registra bootstrap
Registra il cluster di bootstrap nell'API Hub.
Trama
Registra il cluster di bootstrap nell'API Hub. Questo comando registra un cluster Kind locale come cluster amministrativo. Il comando attende che venga creato un cluster nella console Google Cloud ed esce una volta che il cluster è stato creato correttamente.
register bootstrap [flags]
Opzioni
--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 Anthos 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, GCP project for GKE Connect. bmctl
will register this bootstrap cluster into GCP
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.
reimposta
Ripristina le macchine del cluster allo stato precedente all'installazione.
Trama
Questo comando tenta di annullare le modifiche eseguite nei tentativi di installazione precedenti. Si tratta di un tentativo secondo il criterio del massimo impegno, pensato per essere utilizzato per recuperare da errori di installazione parziali.
reset [flags]
Opzioni
--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
-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.
reimposta bootstrap
Elimina il cluster di bootstrap.
reset bootstrap [flags]
Esempi
bmctl reset bootstrap
Opzioni
-h, --help help for bootstrap
reimposta i nodi
Reimposta i nodi specificati allo stato in cui si trovavano prima dell'installazione di Anthos clusters on bare metal.
reset nodes [flags]
Esempi
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
Opzioni
--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.
-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.
Per ulteriori informazioni sull'utilizzo di bmctl reset nodes
per ripristinare lo stato pre-installazione dei nodi del cluster o eliminare i cluster, consulta Reimpostare un nodo con errori in Google Distributed Cloud.
restore
Ripristina un cluster o prova a recuperare il quorum per un cluster.
Trama
Ripristinare un cluster. Se utilizzato senza il sottocomando cluster, questo comando tenta di ripristinare un cluster ad alta disponibilità da una perdita del quorum. Se utilizzato con il sottocomando cluster, il comando ripristina un cluster da un file di backup.
restore [flags]
Opzioni
--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).
-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.
ripristina cluster
Ripristina un cluster da un file di backup.
restore cluster [flags]
Opzioni
--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
-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.
Per ulteriori informazioni sul backup e sul ripristino dei cluster con bmctl
, consulta
Eseguire il backup e il ripristino dei cluster con bmctl.
update
Aggiorna le risorse del cluster.
Opzioni
-h, --help help for update
Aggiorna cluster
Aggiorna le configurazioni del cluster e del node pool. Questo comando applica le modifiche apportate al file di configurazione del cluster. Per impostazione predefinita, il file di configurazione <cluster_name>.yaml
è archiviato nella cartella bmctl-workspace/<cluster_name>/
sulla workstation di amministrazione.
update cluster [flags]
Opzioni
--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
-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.
Per ulteriori informazioni sull'aggiornamento dei cluster con bmctl
, consulta
Aggiornare i cluster. Per sapere quali file di configurazione del cluster sono modificabili, consulta il riferimento per i campi di configurazione del cluster.
aggiorna le credenziali
Aggiorna le credenziali del cluster.
Trama
Aggiorna le credenziali dei cluster. Questo comando aggiorna le credenziali del cluster di amministrazione e quelle dei cluster utente gestiti dal cluster di amministrazione.
update credentials [flags]
Opzioni
--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.
-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.
--node-agent-client-cert-path string New credential: path to Node Agent
client certificates.
--node-agent-client-private-key-path string New credential: path to Node Agent
client private key.
--node-agent-server-ca-path string New credential: path to Node Agent
server CA.
--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
Aggiorna le autorità di certificazione sui cluster.
Opzioni
-h, --help help for certificate-authorities
Opzioni ereditate dai comandi principali
--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
Ruota le autorità di certificazione.
update credentials certificate-authorities rotate [flags]
Opzioni
--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-ca-cert-path string New credential: path to custom cluster CA certificate.
--cluster-ca-private-key-path string New credential: path to custom cluster CA private key.
--etcd-ca-cert-path string New credential: path to custom etcd CA certificate.
--etcd-ca-private-key-path string New credential: path to custom etcd CA private key.
--front-proxy-ca-cert-path string New credential: path to custom front proxy CA
certificate.
--front-proxy-ca-private-key-path string New credential: path to custom front proxy CA private
key.
-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 inherited from parent commands
```none
--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.
esegui l'upgrade
Esegui l'upgrade in situ di un cluster a una nuova versione.
Opzioni
-h, --help help for upgrade
esegui l'upgrade del cluster
Eseguire l'upgrade di un cluster.
Trama
Eseguire l'upgrade di un cluster. Questo comando legge la versione di destinazione dal file di configurazione del cluster ed esegue l'upgrade del cluster di destinazione alla versione specificata. Tutte le altre modifiche nel file di configurazione del cluster vengono ignorate. Il comando richiede l'autorizzazione serviceusage.services.get
per verificare l'abilitazione dell'API per il progetto specificato nel file di configurazione. Google Cloud
upgrade cluster [flags]
Opzioni
--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.
-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.
--skip-preflight If true, skip standalone preflight checks.
Per ulteriori informazioni sugli upgrade dei cluster, consulta la seguente documentazione:
- Eseguire l'upgrade dei cluster
- Best practice per gli upgrade dei cluster Google Distributed Cloud
- Ciclo di vita e fasi degli upgrade dei cluster
versione
Stampare la versione bmctl
version [flags]
Opzioni
-h, --help help for version
-o, --output string Output format of version string. Supported options: [version, commit,
metadata-digest]