bmctl
は、クラスタの作成と管理を容易にする、Google Distributed Cloud のコマンドライン ツールです。このドキュメントは、bmctl
コマンドと関連フラグに関する包括的なリファレンスです。
始める前に
bmctl
は、クラスタ仕様(clusterOperations.location
)の location
値が global
に設定されていないときに、アプリケーションのデフォルト認証情報(ADC)を使用してその値を検証します。この検証は、多くの bmctl
コマンドに必要です。ADC を機能させるには、次のいずれかを行う必要があります。
管理ワークステーションの
GOOGLE_APPLICATION_CREDENTIALS
環境変数を、サービス アカウントの認証情報ファイルのパスに設定します。gcloud CLI を使用して、ユーザー認証情報をアプリケーションのデフォルト認証情報(ADC)として設定します。
gcloud auth application-default login
一部の bmctl
コマンドでは、フラグを使用して認証情報ファイルのパスを指定できます。
バックアップ
クラスタの情報をバックアップします。
オプション
-h, --help help for backup
backup cluster
クラスタをバックアップし、バックアップを tar ファイルに保存します。
backup cluster [flags]
オプション
--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).
bmctl
を使用したクラスタのバックアップと復元については、bmctl を使用したクラスタのバックアップと復元をご覧ください。
check
クラスタまたはインフラストラクチャでプリフライト チェックまたはヘルスチェックを実行します。
オプション
-h, --help help for check
check add-ons
クラスタ アドオンのオペレーションの状態(stackdriver-log-aggregator
、stackdriver-log-forwarder
、gke-connect-agent
など)を確認します。
check add-ons [flags]
例
# Do a health check for add-ons
bmctl check add-ons --cluster=cluster1
オプション
--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.
check cluster
クラスタの状態を確認するか、クラスタのスナップショットを生成します。
check cluster [flags]
例
# 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 (requires admin cluster to be available) using 30 threads.
bmctl check cluster --snapshot --cluster=cluster1 --admin-kubeconfig=admin-kubeconfig --num-of-parallel-threads=30
# 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
オプション
--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")
--ca-file string The file contains the Node Agent server CA certificate for authenticating nodes to capture snapshots. While this flag is fully optional, when provided, nodes must also be provided.
--cert-file string The file contains the Node Agent client certificate for authenticating with nodes to capture snapshots. While this flag is fully optional, when provided, nodes must also be provided.
-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.
--key-file string The file contains the Node Agent client private key for authenticating with nodes to capture snapshots. While this flag is fully optional, when provided, nodes must also be provided.
--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.
--nodeagent-port int The Node Agent server port for the client side to connect to. This flag is optional and only applies with 'nodes' options; when provided, it will override the default port.
--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
クラスタ構成ファイルを確認します。
check config [flags]
例
# Do check for cluster1.yaml file
bmctl check config --cluster=cluster1
オプション
--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.
check gcp
Google Cloud とのクラスタの接続を確認します。
check gcp [flags]
例
# Do a machines' Google Cloud connectivity health check for cluster
bmctl check gcp --cluster=cluster1
オプション
--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.
check kubernetes
Kubernetes のヘルスチェックを行います。
check kubernetes [flags]
例
# Do a kubernetes health check for cluster
bmctl check kubernetes --cluster=cluster1
オプション
--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.
check nodes
ノードの健全性を確認します。
check nodes [flags]
例
# Do a health check for some provisioned nodes
bmctl check nodes --addresses=192.168.0.1,192.168.0.4
オプション
--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.
check preflight
プリフライト チェックを実行します。
概要
プリフライト チェックを実行します。
check preflight [flags]
例
# 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
オプション
--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.
check vmruntimepfc
GDC 用の VM ランタイムのプリフライト チェック。
check vmruntimepfc [flags]
例
# Do vmruntime preflight check,
bmctl check vmruntimepfc --kubeconfig=$KUBECONFIG
オプション
-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.
プリフライト チェックの詳細については、プリフライト チェックについてをご覧ください。
構成
サービス アカウントと IAM ロールを構成し、Workload Identity クラスタ認証用の API を Google Cloud で有効にします。
オプション
-h, --help help for configure
configure projects
Workload Identity クラスタ認証用の IAM ポリシー バインディングを構成します。必要なサービス アカウントを作成し、必要な API を有効にします。
configure projects [flags]
オプション
--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
Workload Identity クラスタ認証を有効にして使用する方法については、Workload Identity クラスタ認証をご覧ください。
create
クラスタ構成ファイル、クラスタ、または Kubernetes サービス アカウント(KSA)を作成します。
オプション
-h, --help help for create
create cluster
クラスタ構成ファイルからクラスタを作成します。
概要
Google Distributed Cloud リソースを作成します。このコマンドは、作成されたクラスタの kubeconfig を出力します。このファイルにはクラスタの認証情報が含まれているため、安全に保管してください。このコマンドでは、Google Cloud プロジェクトでの API の有効化を確認するために、serviceusage.services.get
権限が必要です。
create cluster [flags]
オプション
--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.
クラスタ作成の詳細については、クラスタの作成の概要をご覧ください。
create config
クラスタ構成ファイルを作成します。デフォルトでは、このファイルは bmctl-workspace/<cluster_name> フォルダに作成されます。
create config [flags]
オプション
--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.
create ksa
ターゲット クラスタの cluster-admin ロールを持つ Kubernetes サービス アカウントを作成します。Kubernetes サービス アカウントのデフォルト名は kubernetes-service-account
であるため、--name
フラグは省略可能です。このコマンドでは、クラスタへのログインに使用できる署名なしトークンが生成されます。デフォルトでは、この署名なしトークンは bmctl-workspace/<cluster_name>
フォルダに保存されます。
create ksa [flags]
オプション
-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.
disable
クラスタ内の GDC 用 GVM ランタイムを無効にします。
オプション
-h, --help help for disable
disable vmruntime
クラスタ内の GDC 用 VM ランタイムを無効にします。
disable vmruntime [flags]
オプション
--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.
GDC 上の VM ランタイムを有効または無効にする方法については、GDC 上の VM ランタイムを有効または無効にするをご覧ください。
enable
クラスタ内の GDC 用 VM ランタイムを有効にします。
オプション
-h, --help help for enable
enable vmruntime
クラスタ内の GDC 用 VM ランタイムを有効にします。
enable vmruntime [flags]
オプション
-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.
GDC 上の VM ランタイムを有効または無効にする方法については、GDC 上の VM ランタイムを有効または無効にするをご覧ください。
get
クラスタ構成またはクラスタ認証情報を取得します。
オプション
-h, --help help for get
get config
クラスタ構成ファイルを取得します。このコマンドは、ターゲット クラスタのカスタム リソースを pull し、構成ファイルを出力します。
get config [flags]
オプション
-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.
詳細については、クラスタ構成の詳細を取得するをご覧ください。
get credentials
ターゲット クラスタの認証情報を取得します。このコマンドでは、管理ワークステーションの <workspace dir>/<cluster name>
フォルダに kubeconfig ファイルが作成されます。
get credentials [flags]
オプション
-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
ソフトウェアのインストール オペレーションを実行します。
オプション
-h, --help help for install
install virtctl
virtctl
を kubectl
プラグインとして現在のマシンにインストールします。virtctl
プラグインでは、作成、接続、電源状態の変更などの基本的な VM オペレーションを行えます。
install virtctl [flags]
オプション
-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
Google Distributed Cloud のリソースとすべての依存関係を管理クラスタ間で移動します。
- ターゲット クラスタの Namespace に追加のリソースを含めることができます。競合するリソースは置き換えられます。
move [flags]
オプション
--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
Docker イメージを限定公開レジストリに push します。
オプション
-h, --help help for push
push images
ローカル コンテナ イメージの tar ファイルを限定公開レジストリに push します。
push images [flags]
オプション
--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
リソースを登録します。
オプション
-h, --help help for register
register bootstrap
ブートストラップ クラスタを Hub API に登録します。
概要
ブートストラップ クラスタを Hub API に登録します。このコマンドは、ローカルの Kind クラスタを管理クラスタとして登録します。このコマンドは、Google Cloud コンソールでクラスタが作成されるのを待機し、クラスタが正常に作成されると終了します。
register bootstrap [flags]
オプション
--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 Artifact Registry 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.
reset
クラスタマシンをインストール前の状態にリセットします。
概要
このコマンドは、以前のインストールで行われた変更を元に戻します。これは、部分的なインストールの失敗から回復するためのベスト エフォート型の試行です。
reset [flags]
オプション
--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.
reset bootstrap
ブートストラップ クラスタを削除します。
reset bootstrap [flags]
例
bmctl reset bootstrap
オプション
-h, --help help for bootstrap
reset nodes
指定したノードをクラスタから削除することにより、プリインストールされた状態にリセットします。対象のノードにアクセスできない場合は、--force
オプションを使用してリセット手順をバイパスできます。クラスタ コントロール プレーンにアクセスできない場合は、--ssh-private-key-path
、--login-user
、--gcr-service-account-key
オプションを使用することで、指定したノードをクラスタから削除せずに、プリインストールされた状態にリセットできます。
reset nodes [flags]
例
bmctl reset nodes --addresses 10.200.0.10,10.200.0.11 --cluster cluster1 --kubeconfig admin-kubeconfig
オプション
--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.
bmctl reset nodes
を使用してクラスタノードをインストール前の状態に戻すか、クラスタを削除する方法については、Google Distributed Cloud で障害が発生したノードをリセットするをご覧ください。
復元
クラスタを復元するか、クラスタのクォーラムの回復を試みます。
概要
クラスタを復元します。cluster サブコマンドなしでこのコマンドを使用すると、クォーラムの損失からの高可用性クラスタの復元が試みられます。cluster サブコマンドとともに使用すると、バックアップ ファイルからクラスタが復元されます。
restore [flags]
オプション
--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.
restore cluster
バックアップ ファイルからクラスタを復元します。
restore cluster [flags]
オプション
--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.
bmctl
を使用したクラスタのバックアップと復元については、bmctl を使用したクラスタのバックアップと復元をご覧ください。
update
クラスタ リソースを更新します。
オプション
-h, --help help for update
update cluster
クラスタとノードプールの構成を更新します。このコマンドを実行すると、クラスタ構成ファイルに加えた変更が適用されます。デフォルトでは、この構成ファイル <cluster_name>.yaml
は管理ワークステーションの bmctl-workspace/<cluster_name>/
フォルダに保存されています。
update cluster [flags]
オプション
--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.
bmctl
を使用したクラスタの更新について詳しくは、クラスタを更新するをご覧ください。変更可能なクラスタ構成ファイルについては、クラスタ構成フィールドのリファレンスをご覧ください。
update credentials
クラスタ認証情報を更新します。
概要
クラスタの認証情報を更新します。このコマンドを実行すると、管理クラスタの認証情報と、管理クラスタによって管理されているユーザー クラスタの認証情報が更新されます。
update credentials [flags]
オプション
--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
クラスタの認証局を更新します。
オプション
-h, --help help for certificate-authorities
親コマンドから継承されたオプション
--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
認証局のローテーションを行います。
update credentials certificate-authorities rotate [flags]
オプション
--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.
upgrade
クラスタをインプレースで新しいバージョンにアップグレードします。
オプション
-h, --help help for upgrade
upgrade cluster
クラスタをアップグレードします。
概要
クラスタをアップグレードします。このコマンドはクラスタ構成ファイルからターゲット バージョンを読み取り、ターゲット クラスタを指定したバージョンにアップグレードします。クラスタ構成ファイル内の他の変更はすべて無視されます。このコマンドでは、構成ファイルで指定された Google Cloud プロジェクトでの API の有効化を確認するために serviceusage.services.get
権限が必要です。
upgrade cluster [flags]
オプション
--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.
クラスタのアップグレードについて詳しくは、次のドキュメントをご覧ください。
version
bmctl
のバージョンを出力します。
version [flags]
オプション
-h, --help help for version
-o, --output string Output format of version string. Supported options: [version, commit,
metadata-digest]