liveBook · Manning

Bmctl

As explained in Google Anthos in Action

bmctl is a command-line tool and binary executable for deploying and managing Anthos clusters on bare-metal infrastructure.

bmctl is the single binary used to deploy and upgrade Anthos clusters on bare metal. It takes cluster settings from a configuration file. Before running it, verify the hardware, software, and Google Cloud project requirements. section 17.3 section 17.6

A first-cluster deployment follows this sequence:

  • Download the appropriate bmctl binary, make it executable, and generate a template with `bmctl create config -c CLUSTER_NAME --project-id=CLOUD_PROJECT_ID`. section 17.4.1
  • Edit the template for the chosen admin, hybrid, or standalone cluster: set nodes, networking, load balancing, and paths to the required keys. section 17.4.1
  • Run `bmctl create cluster -c CLUSTER_NAME`. Configuration validation and preflight checks precede node provisioning and add-on installation. section 17.4.1

The Google Cloud project needs required APIs and service accounts. bmctl can enable APIs and create service accounts during installation, but distinct service accounts are recommended instead of one account holding every role. A missing API stops deployment at preflight. Other checks cover machine configuration, available filesystem space, and access to Google Cloud API endpoints. section 17.3.5 section 17.4.1

Add a user cluster

After creating an admin or hybrid cluster, generate a user-cluster template with `bmctl create config -c CLUSTER_NAME`. Keep its Cluster and NodePool manifests, set the cluster type to `user`, and avoid reusing control-plane, load-balancer, or node-pool IP addresses. The user cluster inherits the earlier Google Cloud credentials, so remove their key paths. Then run `bmctl create cluster -c CLUSTER_NAME --kubeconfig ADMIN_KUBECONFIG`. section 17.4.2

To upgrade an admin, standalone, or hybrid cluster, change its configured Anthos version, download bmctl for that target version, and run `bmctl upgrade cluster -c CLUSTER_NAME --kubeconfig ADMIN_KUBECONFIG`. Plan storage separately: the default local-host option is suitable only for development clusters. section 17.5.1 section 17.6

How Google Anthos in Action covers it

How deep it goes
Walks through configuration and commands, then traces validation, preflight checks, provisioning, add-on installation, and pivot during first-cluster creation.
Examples
Uses first-cluster creation, user-cluster creation, and an Anthos 1.13 upgrade as command and configuration examples.
What it assumes
Assumes bare-metal infrastructure that meets Anthos requirements and a Google Cloud project with required APIs and service-account roles.
What you can do after
Operate/configure it to create first and user clusters and upgrade an admin, standalone, or hybrid cluster.
How it connects
Connects cluster configuration to Google Cloud APIs, service accounts, kubeconfig, NodePool resources, load balancing, and Kubernetes in Docker.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Google Anthos in Action. The section links point to the parts of the book it draws on.