Documentation de référence sur sur la commande bmctl

bmctl est un outil de ligne de commande pour Google Distributed Cloud qui simplifie la création et la gestion des clusters. Ce document est une référence complète pour les commandes bmctl et les indicateurs associés.

Avant de commencer

bmctl utilise les identifiants par défaut de l'application pour valider la valeur location dans la spécification de cluster (clusterOperations.location) lorsqu'elle n'est pas définie sur global. Cette validation est requise pour de nombreuses commandes bmctl. Pour que l'ADC fonctionne, vous devez effectuer l'une des opérations suivantes:

  • Définissez la variable d'environnement GOOGLE_APPLICATION_CREDENTIALS sur votre poste de travail administrateur sur le chemin d'accès d'un fichier d'identifiants de compte de service.

  • Utilisez gcloud CLI pour définir vos identifiants utilisateur en tant qu'identifiants par défaut de l'application (ADC) :

    gcloud auth application-default login
    

Certaines commandes bmctl vous permettent de spécifier un chemin d'accès à un fichier d'identifiants avec un indicateur.

sauvegarder

Sauvegardez les informations du cluster.

Options

  -h, --help   help for backup

backup cluster

Sauvegardez un cluster et enregistrez la sauvegarde dans un fichier tar.

backup cluster [flags]

Options

      --backup-file string                      path to the output backup files.
      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default
                                                "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default
                                                "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed
                                                under
                                                <workspace dir>/<cluster name>/<cluster name>.yaml
  -h, --help                                    help for cluster
      --ignore-validation-errors                A validation error override, allowing to proceed
                                                despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin
                                                cluster. IF not provided, will fall back to read env
                                                var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.
      --use-disk                                Perform the backup using the disk instead of in-memory
                                                buffer. This option only works when the command is run
                                                by the root user or with sudo.
      --yes                                     Perform the backup and do not prompt for confirmation
                                                (non-interactive mode).

Pour en savoir plus sur la sauvegarde et la restauration de clusters avec bmctl, consultez la section Sauvegarder et restaurer des clusters avec bmctl.

check

Effectuer des vérifications préliminaires ou de l'état sur vos clusters ou votre infrastructure

Options

  -h, --help   help for check

check add-ons

Vérifiez l'état opérationnel des modules complémentaires de cluster, tels que stackdriver-log-aggregator, stackdriver-log-forwarder et gke-connect-agent.

check add-ons [flags]

Exemples

# Do a health check for add-ons
bmctl check add-ons --cluster=cluster1

Options

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default
                                                "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default
                                                "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed
                                                under
                                                <workspace dir>/<cluster name>/<cluster name>.yaml
  -h, --help                                    help for add-ons
      --ignore-validation-errors                A validation error override, allowing to proceed
                                                despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin
                                                cluster. IF not provided, will fall back to read env
                                                var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

check cluster

Vérifiez l'état d'un cluster ou générer un instantané de cluster.

check cluster [flags]

Exemples

# Do a health check for cluster.
bmctl check cluster --cluster=cluster1
# Take a snapshot of the cluster (requires admin cluster to be available).
bmctl check cluster --snapshot --cluster=cluster1 --admin-kubeconfig=admin-kubeconfig
# Take a snapshot of the cluster (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

Options

      --bootstrap-cluster-pod-cidr string           Bootstrap cluster pod CIDR (default "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string       Bootstrap cluster service CIDR (default "10.96.0.0/27")
      --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

Vérifiez le fichier de configuration du cluster.

check config [flags]

Exemples

# Do check for cluster1.yaml file
bmctl check config --cluster=cluster1

Options

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default
                                                "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default
                                                "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed
                                                under
                                                <workspace dir>/<cluster name>/<cluster name>.yaml
  -h, --help                                    help for config
      --ignore-validation-errors                A validation error override, allowing to proceed
                                                despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin
                                                cluster. IF not provided, will fall back to read env
                                                var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

check gcp

Vérification de l'état de la connectivité du cluster à Google Cloud.

check gcp [flags]

Exemples

# Do a machines' Google Cloud connectivity health check for cluster
bmctl check gcp --cluster=cluster1

Options

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default
                                                "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default
                                                "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed
                                                under
                                                <workspace dir>/<cluster name>/<cluster name>.yaml
  -h, --help                                    help for gcp
      --ignore-validation-errors                A validation error override, allowing to proceed
                                                despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin
                                                cluster. IF not provided, will fall back to read env
                                                var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

check kubernetes

Vérification de l'état de Kubernetes.

check kubernetes [flags]

Exemples

# Do a kubernetes health check for cluster
bmctl check kubernetes --cluster=cluster1

Options

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default
                                                "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default
                                                "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed
                                                under
                                                <workspace dir>/<cluster name>/<cluster name>.yaml
  -h, --help                                    help for kubernetes
      --ignore-validation-errors                A validation error override, allowing to proceed
                                                despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin
                                                cluster. IF not provided, will fall back to read env
                                                var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

check nodes

Vérifiez l'état des nœuds.

check nodes [flags]

Exemples

# Do a health check for some provisioned nodes
bmctl check nodes --addresses=192.168.0.1,192.168.0.4

Options

      --addresses strings                       Node addresses, addresses should be a comma separated
                                                list, each address needs be a single IP address(e.g.,
                                                192.168.0.1)
      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default
                                                "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default
                                                "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed
                                                under
                                                <workspace dir>/<cluster name>/<cluster name>.yaml
  -h, --help                                    help for nodes
      --ignore-validation-errors                A validation error override, allowing to proceed
                                                despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin
                                                cluster. IF not provided, will fall back to read env
                                                var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

check preflight

Vérification préliminaire

Synopsis

Vérification préliminaire

check preflight [flags]

Exemples

# Do a preflight check for cluster1.yaml in bmctl-workspace/cluster1
bmctl check preflight --cluster=cluster1
# If kubeconfig flag (for example, --kubeconfig=bmctl-workspace/cluster1/cluster1-kubeconfig) is
# included, the command will trigger a preflight check for upgrading the cluster

Options

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default
                                                "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default
                                                "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed
                                                under
                                                <workspace dir>/<cluster name>/<cluster name>.yaml
  -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

Vérification préliminaire de l'environnement d'exécution des VM pour GDC

check vmruntimepfc [flags]

Examples

# Do vmruntime preflight check,
    bmctl check vmruntimepfc --kubeconfig=$KUBECONFIG

Options

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

Pour en savoir plus sur les requêtes préliminaires, consultez la section Comprendre les requêtes préliminaires.

configurer

Configurez des comptes de service et des rôles IAM, puis activez les API sur Google Cloud pour l'authentification des clusters avec Workload Identity.

Options

  -h, --help   help for configure

configurer des projets ;

Configure les liaisons de stratégie IAM pour l'authentification des clusters d'identités de charge de travail. Crée les comptes de service requis et active les API requises.

configure projects [flags]

Options

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

Pour en savoir plus sur l'activation et l'utilisation de l'authentification de cluster Workload Identity, consultez la page Authentification de cluster Workload Identity.

create

Créez un fichier de configuration de cluster, un cluster ou un compte de service Kubernetes (KSA).

Options

  -h, --help   help for create

create cluster

Créer un cluster à partir d'un fichier de configuration de cluster.

Synopsis

Créez des ressources Google Distributed Cloud. Cette commande émet un kubeconfig d'un cluster créé. Veillez à conserver ce fichier en lieu sûr, car il contient les identifiants de votre cluster. Cette commande nécessite l'autorisation serviceusage.services.get pour vérifier l'activation de l'API pour votre projet Google Cloud.

create cluster [flags]

Options

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default
                                                "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default
                                                "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed
                                                under
                                                <workspace dir>/<cluster name>/<cluster name>.yaml
      --force                                   If true, ignore errors from preflight checks and
                                                validation except for Google Cloud check errors.
  -h, --help                                    help for cluster
      --ignore-validation-errors                A validation error override, allowing to proceed
                                                despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin
                                                cluster. IF not provided, will fall back to read env
                                                var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

Pour en savoir plus sur la création de clusters, consultez la page Présentation de la création de clusters.

create config

Créez un fichier de configuration du cluster. Par défaut, ce fichier est créé dans le dossier bmctl-workspace/<nom_du_cluster>.

create config [flags]

Options

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default
                                                "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default
                                                "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed
                                                under
                                                <workspace dir>/<cluster name>/<cluster name>.yaml
      --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

Créez un compte de service Kubernetes avec le rôle d'administrateur de cluster du cluster cible. Le nom par défaut du compte de service Kubernetes est kubernetes-service-account. L'indicateur --name est donc facultatif. La commande génère un jeton d'authentification que vous pouvez utiliser pour vous connecter au cluster. Par défaut, le jeton d'identité est stocké dans le dossier bmctl-workspace/&lt;cluster_name>.

create ksa [flags]

Options

  -c, --cluster string      Cluster name, cluster config is expected to be placed under
                            <workspace dir>/<cluster name>/<cluster name>.yaml.
  -h, --help                help for ksa
      --ksa-name string     Name of the kubernetes service account and default value is
                            kubernetes-service-account. (default "kubernetes-service-account")
      --kubeconfig string   Optional, path to the kubeconfig file for the admin cluster. IF not
                            provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.

désactiver

Désactivez GVM Runtime pour GDC dans un cluster.

Options

  -h, --help   help for disable

disable vmruntime

Désactivez l'environnement d'exécution de VM pour GDC dans un cluster.

disable vmruntime [flags]

Options

      --force               If true, delete all VM resources and disable vmruntime.
  -h, --help                help for vmruntime
      --kubeconfig string   Optional, path to the kubeconfig file for the admin cluster. IF not
                            provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.

Pour en savoir plus sur l'activation et la désactivation de l'environnement d'exécution de VM sur GDC, consultez Activer ou désactiver l'environnement d'exécution de VM sur GDC.

activer

Activez l'environnement d'exécution de VM pour GDC dans un cluster.

Options

  -h, --help   help for enable

enable vmruntime

Activez l'environnement d'exécution de VM pour GDC dans un cluster.

enable vmruntime [flags]

Options

  -h, --help                help for vmruntime
      --kubeconfig string   Optional, path to the kubeconfig file for the admin cluster. IF not
                            provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.

Pour en savoir plus sur l'activation et la désactivation de l'environnement d'exécution de VM sur GDC, consultez Activer ou désactiver l'environnement d'exécution de VM sur GDC.

get

Obtenir une configuration de cluster ou des identifiants de cluster.

Options

  -h, --help   help for get

get config

Obtenir le fichier de configuration du cluster. La commande récupère les ressources personnalisées du cluster cible et émet un fichier de configuration.

get config [flags]

Options

  -c, --cluster string      Cluster name, cluster config is expected to be placed under
                            <workspace dir>/<cluster name>/<cluster name>.yaml.
  -h, --help                help for config
      --kubeconfig string   Optional, path to the kubeconfig file for the admin cluster. IF not
                            provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.

Pour en savoir plus, consultez Obtenir des détails sur la configuration du cluster.

get credentials

Obtenez les identifiants du cluster cible. La commande crée un fichier kubeconfig dans le dossier <workspace dir>/<cluster name> de la station de travail de l'administrateur.

get credentials [flags]

Options

  -c, --cluster string      Cluster name, cluster config is expected to be placed under
                            <workspace dir>/<cluster name>/<cluster name>.yaml.
  -h, --help                help for credentials
      --kubeconfig string   Optional, path to the kubeconfig file for the admin cluster. IF not
                            provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.

Pour en savoir plus, consultez Obtenir des identifiants de cluster.

install

Effectue des opérations d'installation de logiciels.

Options

  -h, --help   help for install

install virtctl

Installez virtctl sur la machine actuelle en tant que plug-in kubectl. Le plug-in virtctl est compatible avec les opérations de base sur les VM, telles que la création, la connexion et la modification de l'état d'alimentation.

install virtctl [flags]

Options

  -d, --dst-dir string   The dir virtctl binary to be installed, this path must be a valid one within
                          PATH env variable
  -h, --help             help for virtctl

move

Déplacez les ressources Google Distributed Cloud et toutes les dépendances entre les clusters de gestion.

  • L'espace de noms du cluster cible peut contenir des ressources supplémentaires. Les ressources en conflit sont remplacées.
move [flags]

Options

      --cluster-move-timeout duration     Cluster move timeout, default value is 15m. The input should
                                          contain the duration unit, e.g. 3600s, 60m or 1h. (default
                                          15m0s)
      --from-kubeconfig string            kubeconfig file path for the source management cluster. If
                                          unspecified, will use the default discovered kubeconfig.
      --from-kubeconfig-context string    Context to be used within the kubeconfig file for the source
                                          management cluster. If empty, current context will be used.
  -h, --help                              help for move
  -n, --namespace string                  The namespace where the cluster resources are stored. If
                                          unspecified, the current context's namespace is used.
      --to-kubeconfig string              kubeconfig file path for the destination management cluster.
      --to-kubeconfig-context string      Context to be used within the kubeconfig file for the
                                          destination management cluster. If empty, current context
                                          will be used.

push

Transférez des images Docker vers un registre privé.

Options

  -h, --help   help for push

push images

Transférez le fichier tar des images de conteneurs locales vers un registre privé.

push images [flags]

Options

      --cacert string             Private registry CA certificate file path.
      --dry-run                   Dry run.
      --email string              Email for private registry.
      --force-push                If set to true, will always push images even if images already exist
                                  in registry.
      --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.

Pour en savoir plus sur la configuration et l'utilisation d'un miroir de registre pour les images de conteneur Bare Metal, consultez la section Utiliser un miroir de registre pour les images de conteneur.

register

Enregistrez des ressources.

Options

  -h, --help   help for register

register bootstrap

Enregistrez le cluster d'amorçage dans l'API Hub.

Synopsis

Enregistrez le cluster d'amorçage auprès de l'API Hub. Cette commande enregistre un cluster Kind local en tant que cluster d'administrateur. La commande attend la création d'un cluster dans la console Google Cloud et se ferme une fois le cluster créé.

register bootstrap [flags]

Options

      --bootstrap-cluster-pod-cidr string               Bootstrap cluster pod CIDR (default
                                                        "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string           Bootstrap cluster service CIDR (default
                                                        "10.96.0.0/27")
      --cloud-operation-service-account-key string      Optional, service account key file used to
                                                        access Google cloud service, service account
                                                        key specified by environment variable
                                                        GOOGLE_APPLICATION_CREDENTIALS will be used to
                                                        fetch or create the Service account.
      --enable-apis                                     Auto enable APIs used by 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.

réinitialiser

Rétablissez les machines du cluster à l'état antérieur à l'installation.

Synopsis

Cette commande tente d'annuler les modifications effectuées lors des tentatives d'installation précédentes. Il s'agit d'une tentative visant à récupérer les échecs d'installation partielle.

reset [flags]

Options

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default
                                                "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default
                                                "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed
                                                under
                                                <workspace dir>/<cluster name>/<cluster name>.yaml
  -h, --help                                    help for reset
      --ignore-validation-errors                A validation error override, allowing to proceed
                                                despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin
                                                cluster. IF not provided, will fall back to read env
                                                var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

reset bootstrap

Supprimez le cluster d'amorçage.

reset bootstrap [flags]

Exemples

bmctl reset bootstrap

Options

  -h, --help   help for bootstrap

reset nodes

Réinitialisez les nœuds spécifiés d'un cluster à leur état préinstallé en les supprimant du cluster. Si les nœuds sont inaccessibles, vous pouvez utiliser l'option --force pour contourner l'étape de réinitialisation. Si le plan de contrôle du cluster est inaccessible, vous pouvez utiliser les options --ssh-private-key-path, --login-user et --gcr-service-account-key pour rétablir l'état préinstallé des nœuds spécifiés sans les supprimer du cluster.

reset nodes [flags]

Examples

bmctl reset nodes --addresses 10.200.0.10,10.200.0.11 --cluster cluster1 --kubeconfig admin-kubeconfig

Options

      --addresses strings                       Node addresses, addresses should be a comma separated list, each address needs be a single IP address(e.g., 192.168.0.1)
      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed under <workspace dir>/<cluster name>/<cluster name>.yaml
      --force                                   Optional. If provided, nodes will be forcefully removed from the cluster without running reset jobs.
      --gcr-service-account-key string          Optional, path to the service account json key to pull gcr images. Mutually exclusive with --cluster flag. If not provided, the environment variable GOOGLE_APPLICATION_CREDENTIALS will be used.
  -h, --help                                    help for nodes
      --ignore-validation-errors                A validation error override, allowing to proceed despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin cluster. IF not provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.
      --login-user string                       login user to use to connect to the nodes. Mutually exclusive with --cluster flag. Optional and should be used together with --ssh-private-key-path. Default to root.
      --registry-mirror-ca string               Registry mirror CA file.
      --registry-mirror-credential string       Registry mirror credential file.
      --registry-mirror-endpoint string         Registry mirror endpoint.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.
      --ssh-private-key-path string             path to the ssh private key to connect to the nodes. Either --cluster or --ssh-private-key-path should be provided, but not both. Use this flag to reset the machines if the original cluster yaml is no longer available.

Pour en savoir plus sur l'utilisation de bmctl reset nodes afin de rétablir l'état d'avant l'installation des nœuds de cluster ou de supprimer des clusters, consultez Réinitialiser un nœud défaillant dans Google Distributed Cloud.

restaurer

Restaurez un cluster ou tentez de rétablir le quorum pour un cluster.

Synopsis

Restaurez un cluster. Lorsqu'elle est utilisée sans la sous-commande de cluster, cette commande tente de restaurer un cluster haute disponibilité après une perte de quorum. Lorsqu'elle est utilisée avec la sous-commande cluster, la commande restaure un cluster à partir d'un fichier de sauvegarde.

restore [flags]

Options

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default
                                                "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default
                                                "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be
                                                placed under
                                                <workspace dir>/<cluster name>/<cluster name>.yaml
      --control-plane-node string               IP for the surviving host address, should be a
                                                single IP address(e.g., 192.168.0.1).
  -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

Restaurez un cluster à partir d'un fichier de sauvegarde.

restore cluster [flags]

Options

      --backup-file string                      path to the backup file of the cluster.
      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default
                                                "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default
                                                "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed
                                                under
                                                <workspace dir>/<cluster name>/<cluster name>.yaml
  -h, --help                                    help for cluster
      --ignore-validation-errors                A validation error override, allowing to proceed
                                                despite the validation errors.
      --kubeconfig string                       path to the kubeconfig of the management cluster.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.
      --use-disk                                Perform the restore using the disk instead of
                                                in-memory buffer. This option only works when the
                                                command is run by the root user or with sudo.

Pour en savoir plus sur la sauvegarde et la restauration de clusters avec bmctl, consultez la section Sauvegarder et restaurer des clusters avec bmctl.

update

Mettez à jour les ressources du cluster.

Options

  -h, --help   help for update

update cluster

Mettez à jour les configurations de cluster et de pool de nœuds. Cette commande applique les modifications apportées au fichier de configuration du cluster. Par défaut, le fichier de configuration <cluster_name>.yaml est stocké dans le dossier bmctl-workspace/<cluster_name>/ sur le poste de travail administrateur.

update cluster [flags]

Options

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default
                                                "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default
                                                "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed
                                                under
                                                <workspace dir>/<cluster name>/<cluster name>.yaml
  -h, --help                                    help for cluster
      --ignore-validation-errors                A validation error override, allowing to proceed
                                                despite the validation errors.
      --kubeconfig string                       Optional, path to the kubeconfig file for the admin
                                                cluster. IF not provided, will fall back to read env
                                                var ANTHOS_ADMIN_KUBECONFIG.
      --reuse-bootstrap-cluster                 If true, use existing bootstrap cluster.

Pour en savoir plus sur la mise à jour des clusters avec bmctl, consultez la page Mettre à jour des clusters. Pour savoir quels fichiers de configuration de cluster sont modifiables, consultez la documentation de référence sur les champs de configuration de cluster.

update credentials

Mettez à jour les identifiants du cluster.

Synopsis

Mettez à jour les identifiants des clusters. Cette commande met à jour les identifiants du cluster d'administration et ceux des clusters d'utilisateurs gérés par le cluster d'administrateur.

update credentials [flags]

Options

      --bootstrap-cluster-pod-cidr string                     Bootstrap cluster pod CIDR (default
                                                              "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string                 Bootstrap cluster service CIDR (default
                                                              "10.96.0.0/27")
      --cloud-operations-service-account-key-path string      New credential: path to cloud operations
                                                              service account  key.
  -c, --cluster cluster name                                  Cluster name, cluster config is expected
                                                              to be placed under
                                                              <workspace dir>/<cluster name>/<cluster name>.yaml
      --gcr-key-path string                                   New credential: path to GCR service
                                                              account key.
      --gke-connect-agent-service-account-key-path string     New credential: path to gke connect
                                                              agent service account key.
      --gke-connect-register-service-account-key-path string  New credential: path to gke connect
                                                              register service account key.
  -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

Mettez à jour les autorités de certification sur les clusters.

Options

  -h, --help   help for certificate-authorities

Options héritées des commandes parentes

      --kubeconfig string   Optional, path to the kubeconfig file for the admin cluster. IF not
                            provided, will fall back to read env var ANTHOS_ADMIN_KUBECONFIG.

update credentials certificate-authorities rotate

Alternez les autorités de certification.

update credentials certificate-authorities rotate [flags]

Options

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default
                                                "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default
                                                "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed
                                                under
                                                <workspace dir>/<cluster name>/<cluster name>.yaml
      --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.

mise à niveau

Mettre à niveau un cluster vers une nouvelle version.

Options

  -h, --help   help for upgrade

upgrade cluster

Mettre à niveau un cluster.

Synopsis

Mettre à niveau un cluster. Cette commande lit la version cible à partir du fichier de configuration du cluster et met à niveau le cluster cible vers la version spécifiée. Toutes les autres modifications du fichier de configuration du cluster sont ignorées. La commande nécessite l'autorisation serviceusage.services.get pour vérifier l'activation de l'API pour le projet Google Cloud spécifié dans le fichier de configuration.

upgrade cluster [flags]

Options

      --bootstrap-cluster-pod-cidr string       Bootstrap cluster pod CIDR (default
                                                "192.168.122.0/24")
      --bootstrap-cluster-service-cidr string   Bootstrap cluster service CIDR (default
                                                "10.96.0.0/27")
  -c, --cluster cluster name                    Cluster name, cluster config is expected to be placed
                                                under
                                                <workspace dir>/<cluster name>/<cluster name>.yaml
      --cluster-update-timeout duration         Cluster update timeout, default value is 24h. The
                                                input should contain the duration unit, e.g. 3600s,
                                                60m or 1h. (default 24h0m0s)
      --force                                   If true, ignore errors from preflight checks.
  -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.

Pour en savoir plus sur la mise à niveau des clusters, consultez la documentation suivante :

version

Imprimer la version bmctl

version [flags]

Options

  -h, --help            help for version
  -o, --output string   Output format of version string. Supported options: [version, commit,
                        metadata-digest]