bmctl コマンド リファレンス

bmctl は、クラスタの作成と管理を簡素化する、GKE on Bare Metal のコマンドライン ツールです。このドキュメントでは、bmctl コマンドと関連フラグに関する包括的なリファレンスです。

準備

bmctl は、クラスタ仕様(clusterOperations.location)の location 値が global に設定されていないときに、アプリケーションのデフォルト認証情報(ADC)を使用してその値を検証します。この検証は、多くの bmctl コマンドで必要になります。ADC を機能させるには、次のいずれかを行う必要があります。

  • 管理ワークステーションの GOOGLE_APPLICATION_CREDENTIALS 環境変数を、サービス アカウントの認証情報ファイルのパスに設定します。

  • gcloud CLI を使用して、ユーザー認証情報をアプリケーションのデフォルト認証情報(ADC)として設定します。

    gcloud auth application-default login
    

一部の bmctl コマンドでは、フラグを使用して認証情報ファイルのパスを指定できます。

バックアップ

Anthos clusters on bare metal の情報をバックアップします。

オプション

  -h, --help   help for backup

backup cluster

Anthos on bare metal クラスタをバックアップし、バックアップを 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
      --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).

bmctl を使用したクラスタのバックアップおよび復元については、bmctl を使用したクラスタのバックアップと復元をご覧ください。

クラスタまたはインフラストラクチャでプリフライト チェックまたはヘルスチェックを実行します。

オプション

  -h, --help   help for check

check add-ons

クラスタ アドオンのオペレーションの状態(stackdriver-log-aggregatorstackdriver-log-forwardergke-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
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for add-ons
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

check cluster

クラスタの状態を確認するか、クラスタのスナップショットを生成します。

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 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")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for cluster
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --login-user string                       The user to login to each node. This will be ignored when admin-kubeconfig is set. (default "root")
      --node-ssh-key string                     The file contains ssh key to the nodes to capture snapshots against. While this flag is fully optional, when provided, nodes must also be provided.
      --nodes strings                           The comma-separated IP address list of the nodes to capture snapshots against. While this flag is fully optional, when provided, node-ssh-key must also be provided.
      --quiet                                   During snapshot run suppress logging to stdout.  (Console log is available in 'bmctl_diagnose_snapshot.log' file part of the snapshot)
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.
      --service-account-key-file string         The service account key file for uploading the snapshot. Please make sure this service account has the "roles/storage.admin" of its parent project for creating a Cloud Storage bucket and writing object to the bucket. Note that:
                                                - this flag is defaulted to the environment variable GOOGLE_APPLICATION_CREDENTIALS, if not provided.
                                                - this flag is ignored, if "--upload-to" flag is empty.
      --since duration                          This Only returns logs newer than a relative duration like 5s, 4m, or 3h. It defaults to all logs.
      --snapshot                                Takes a snapshot of the cluster's logs, configurations and other data if true.
      --snapshot-config string                  The config file of the snapshot. When this flag is omitted, a default configuration is applied.
      --snapshot-dry-run                        In dry-run mode, the command does not take the snapshot. Instead, it prints out the actions to be taken and the snapshot configuration.
      --snapshot-output string                  The output file of the snapshot.
      --snapshot-scenario string                The scenario of the snapshot. This is ignored when --config flag is specified. The supported scenarios are:
                                                - system: snapshot of system components, including their logs
                                                - all: snapshot of all pods, including their logs (default "system")
      --snapshot-temp-output-dir string         The temporary landing directory for snapshot.
      --upload-to string                        The Cloud Storage bucket name for uploading the snapshot. A new bucket will be created if it doesn't exist. Please follow the naming guidelines here(https://cloud.google.com/storage/docs/naming-buckets).

check config

クラスタ構成ファイルを確認します。

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
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for config
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

check gcp

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
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for gcp
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

check kubernetes

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
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for kubernetes
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

check nodes

ノードの健全性を確認します。

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
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for nodes
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

check preflight

プリフライトを確認します。

概要

プリフライトを確認します。

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

プリフライトについての確認の詳細については、プリフライト チェックについてをご覧ください。

作成

クラスタ構成ファイル、クラスタ、または Kubernetes サービス アカウント(KSA)を作成します。

オプション

  -h, --help   help for create

create cluster

クラスタ構成ファイルからクラスタを作成します。

概要

Anthos bare metal リソースを作成します。このコマンドにより、作成されたクラスタの 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.
      --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.

クラスタ作成の詳細については、クラスタの作成の概要をご覧ください。

create config

クラスタ構成ファイルを作成します。デフォルトでは、このファイルは bmctl-workspace/ フォルダに作成されます。

create config [flags]

オプション

  -c, --cluster cluster name      Cluster name, must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character
      --create-service-accounts   Auto create Google Cloud service accounts keys, if they do not already exist in workspace
      --enable-apis               Auto enable APIs used by Anthos Bare Metal cluster, for the Google Cloud project specified by project-id flag
      --force                     Overwrite existing config
  -h, --help                      help for config
      --project-id string         Google Cloud project where the new cluster will connect with via GKE hub and stackdriver logging/monitoring, required if --create-service-accounts or --enable-apis is true

create ksa

ターゲット クラスタの cluster-admin ロールを持つ Kubernetes サービス アカウントを作成します。Kubernetes サービス アカウントのデフォルト名は「kubernetes-service-account」であるため、「--name」フラグは省略可能です。このコマンドは、クラスタへのログインに使用できる署名なしトークンを生成します。デフォルトでは、署名なしトークンは bmctl-workspace/ フォルダに保存されます。

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.

無効にする

クラスタ内の Anthos VM ランタイムを無効にします。

オプション

  -h, --help   help for disable

disable vmruntime

クラスタ内の Anthos 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 ランタイムを有効または無効にするをご覧ください。

有効にする

クラスタ内の Anthos VM ランタイムを有効にします。

オプション

  -h, --help   help for enable

enable vmruntime

クラスタ内の Anthos 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

ターゲット クラスタの認証情報を取得します。このコマンドにより、管理ワークステーションの / フォルダに 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

kubectl プラグインとして現在のマシンに virtctl をインストールします。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

Anthos bare metal のリソースとすべての依存関係を管理クラスタ間で移動します。

  • ターゲット クラスタの名前空間に追加のリソースを含めることができ、競合するリソースは置き換えられます。
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.
  -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 GKE on Bare Metal cluster, for the GCP Project specified by project-id flag
      --gcr-service-account-key string               Optional, service account key file used to pull GCR images, service account key specified by environment variable GOOGLE_APPLICATION_CREDENTIALS will be used to fetch or create the Service account.
      --gke-agent-service-account-key string         Optional, service account key file used to connect the GKE cluster in Google Cloud, service account key specified by environment variable GOOGLE_APPLICATION_CREDENTIALS will be used to fetch or create the Service account.
      --gke-register-service-account-key string      Optional, service account key file used to register the cluster in Google Cloud, service account key specified by environment variable GOOGLE_APPLICATION_CREDENTIALS will be used to fetch or create the Service account.
  -h, --help                                         help for bootstrap
      --ignore-validation-errors                     A validation error override, allowing to proceed despite the validation errors.
      --location string                              Optional, Location of the GKEHub Membership, e.g. us-central1. If unspecified, global will be used. (default "global")
      --name string                                  Mandatory (either --name or --target-cluster-name needs to be provided), Name of the bootstrap cluster. bmctl will register the bootstrap cluster with this name with GKE Connect.
      --project-id string                            Optional, Google Cloud project for GKE Connect. bmctl will register this bootstrap cluster into Google Cloud project temporarily, and un-register it after cluster is provisioned successfully.
      --registry-mirror-ca string                    Registry mirror CA file.
      --registry-mirror-credential string            Registry mirror credential file.
      --registry-mirror-endpoint string              Registry mirror endpoint.
      --reuse-bootstrap-cluster                      If true, use existing bootstrap cluster.
      --ssh-client-cert string                       Optional, Path of the SSH certificate. ABM will use this ssh key certificate while sshing in the machines.
      --ssh-key string                               Mandatory, Path of the SSH key. ABM will use this ssh key while sshing in the machines.
      --target-cluster-name string                   Optional, The target cluster name.

リセット

クラスタマシンをインストール前の状態にリセットします。

概要

このコマンドは、以前のインストール試行で行われた変更を元に戻すことを試みます。これは、部分的なインストールの失敗から回復するための、ベスト エフォート型の試行です。

reset [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
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for reset
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

reset bootstrap

ブートストラップ クラスタを削除します。

reset bootstrap [flags]

bmctl reset bootstrap

オプション

  -h, --help   help for bootstrap

reset nodes

指定したノードを、Anthos clusters on bare metal をインストールする前の状態にリセットします。

reset nodes [flags]

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

オプション

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

bmctl reset nodes を使用してクラスタノードをインストール前の状態に戻すか、クラスタを削除する方法については、ノードをリセットしてクラスタを削除するをご覧ください。

restore

クラスタを復元するか、クラスタのクォーラムを回復することを試みます。

概要

Anthos on bare metal クラスタを復元します。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).
      --gkehub-endpoint gkehub-endpoint         Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                    help for restore
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       kubeconfig file path for the management cluster. This only needs to be provided if restoring a broken user cluster.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

restore cluster

バックアップ ファイルから Anthos on bare metal クラスタを復元します。

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

bmctl を使用したクラスタのバックアップおよび復元については、bmctl を使用したクラスタのバックアップと復元をご覧ください。

S<<_includes/update.md>>

update cluster

クラスタとノードプールの構成を更新します。このコマンドは、クラスタ構成ファイルで行われた変更を適用します。デフォルトでは、構成ファイル .yaml は管理ワークステーションの bmctl-workspace// フォルダに保存されます。

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

bmctl を使用したクラスタの更新について詳しくは、クラスタを更新するをご覧ください。変更可能なクラスタ構成ファイルを確認するには、クラスタ構成フィールドのリファレンスをご覧ください。

update credentials

クラスタ認証情報を更新します。

概要

Anthos on bare metal クラスタの認証情報を更新します。このコマンドは、管理クラスタ認証情報と、管理クラスタによって管理されるユーザー クラスタの認証情報を更新します。

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.
      --gkehub-endpoint gkehub-endpoint                        Sets the URL endpoint for GKEHub API HTTP requests. Can be set to "prod", "staging" or "autopush". The "prod" endpoint is the default. (default prod)
  -h, --help                                                   help for credentials
      --ignore-validation-errors                               A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                                      Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                                If true, use existing bootstrap cluster.
      --ssh-private-key-path string                            New credential: path to ssh private key.

update credentials certificate-authorities

Anthos on bare metal クラスタの認証局を更新します。

オプション

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

親コマンドから継承されたオプション

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

Anthos on bare metal クラスタをインプレースで新しいバージョンにアップグレードします。

オプション

  -h, --help   help for upgrade

upgrade cluster

Anthos on bare metal クラスタをアップグレードします。

概要

Anthos on bare metal クラスタをアップグレードします。このコマンドは、クラスタ構成ファイルからターゲット バージョンを読み取り、ターゲット クラスタを指定されたバージョンにアップグレードします。クラスタ構成ファイル内の他の変更はすべて無視されます。このコマンドでは、構成ファイルで指定された 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.
      --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.

クラスタのアップグレードの詳細については、次のドキュメントをご覧ください。

バージョン

bmctl のバージョンを出力します。

version [flags]

オプション

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