Skip to content
AnchrasDocumentation
Browse documentation

Integrations / User guide

Cloud and infrastructure

Preview

Metal3

Connect an existing Metal3 management cluster and inspect machine capacity, health and eligibility in allowed namespaces.

On this page

Before you begin

You need permission to manage cloud connections in the intended Anchras organization, a Kubernetes HTTPS endpoint and its PEM certificate authority, and a service account token. Grant that account only list access to baremetalhosts and hardwaredata in the metal3.io API group, using a Role and RoleBinding in each selected namespace. Inspection does not need access to Kubernetes Secrets or machine power controls. Selected-machine provisioning requires separately granted write permissions and an operator-approved image, described below.

For private endpoints, the destination must be an address owned by an enrolled device in your organization or supported by a fresh authenticated agent address report. An arbitrary private IP address is not sufficient.

Connect to Anchras

  1. Open Metal3 in the console and add an account.
  2. Enter a display name and the Kubernetes HTTPS origin, including its port.
  3. Enter one to sixteen allowed namespace names, separated by commas.
  4. Paste the PEM certificate authority and service account bearer token.
  5. Save the connection. Anchras validates access and stores encrypted credentials.

You can also use the CLI without placing the bearer token in shell arguments:

sh
anchras cloud-accounts create --region eu-west --provider metal3 --display-name 'Lab Metal3' \
  --metal3-endpoint https://management.example.com:6443 \
  --metal3-ca-file ./management-ca.pem --metal3-token-file ./management-token \
  --metal3-namespaces pool-a,pool-b

Keep the token file readable only by its owner. Full kubeconfig files, credential plugins and insecure TLS are not supported.

Verify the connection

Choose Inspect machines on the connection. Check the namespaces and inspection time, then compare machine names, capacity and provisioning states with the management cluster. The CLI equivalent is anchras cloud-accounts machines CONNECTION_ID -o json. Use --page and --page-size to inspect larger inventories.

An eligible machine has recent provider status, complete observed capacity, an available provisioning state and healthy operational status. Cleaning, claimed, paused, detached, stale and unknown machines remain ineligible with an explanation. Eligibility does not reserve a machine or start provisioning.

Provision a selected machine

When the server operator has configured an approved image, choose Provision Node OS on an eligible machine. Select an organization site, enter the instance name and review the pinned image and checksum. Confirm only when the selected machine is disposable or approved for installation: this action writes its disk.

Provisioning needs get, list, patch on BareMetalHosts, list on HardwareData and create, get on Secrets in the allowed namespace. It also needs get on the single kube-system namespace to verify cluster identity. An inspection token is not silently upgraded. Use a dedicated provisioning namespace because Secret read permission also covers other Secrets in that namespace.

The equivalent CLI flow is:

sh
anchras instances metal3 options -o json
anchras instances metal3 provision --connection-id CONNECTION_ID \
  --namespace pool-a --machine-name node01 --machine-uid OBSERVED_UID \
  --name node01 --site OWNED_SITE_ID --request-key RETAIN_THIS_KEY -o json
anchras instances metal3 status INSTANCE_ID -o json

Retain the request key and repeat the identical command after an uncertain response. The console retry retains the same request while the dialog stays open. A second claim on the same machine is rejected, including through another saved connection.

Watch the operation move from reserved through disk provisioning to agent pending. Metal3's provisioned state proves the disk installation; Anchras waits for two accepted, advancing authenticated agent heartbeats before showing active. Refresh progress here or on the instance detail page. The registration credential is private, short-lived and never returned in these responses.

Failed or uncertain operations retain their machine reservation. Do not delete or reimage the machine to retry: the owned recovery and release workflows are not available yet. Provisioning Secrets and on-disk bootstrap caches are retained; token expiration is not secure erasure.

Availability and limits

Preview integration. Read-only connection and inspection have automated fixture coverage. Validation against an existing disposable management cluster remains pending. Selected-machine provisioning is available only when the server operator configures an approved, checksummed image and explicitly grants provisioning permissions. Live installation validation remains pending. Power, release, reimage and agent replacement are not supported yet.

Inspection is limited to 2,000 machines and at most 100 machines per displayed page. Provider observations older than fifteen minutes are stale. A failed refresh clears previous machine observations. Narrow the namespace scope if the inventory limit is reached.

Troubleshooting

For permission failures, check the token and both Metal3 read permissions in every configured namespace. For certificate failures, supply the correct CA and a hostname covered by the API server certificate. For reachability errors, check the endpoint, network path and organization ownership of private addresses. Redirected endpoints are refused; enter the API server's direct HTTPS origin.

Operate and disconnect

Use Edit to rename a connection. Use Rotate credentials to replace the token, CA or namespace scope, then inspect again. Endpoint changes require a new connection. Removing the Anchras connection leaves the management cluster and its machines intact.

CLI commands

Install and authenticate using the CLI guide. The table describes command families; required arguments are shown in their usage output.

CommandPurpose
cloud-accounts listList connected cloud provider accounts with the region each is registered in (REGION) and its default provider region (DEFAULT_REGION). Archived accounts are hidden; --include-archived lists them too, with an ARCHIVED_AT column.
cloud-accounts regions --provider <provider>List the provider regions an account of that provider can default to: its locations registered under this deployment's region, regions rather than their zones, each with its placement label, country and jurisdiction. Suggestions only; --default-region accepts any provider code. Endpoint-parameterized providers (OpenStack, CloudStack, MinIO) list none. Read-only.
cloud-accounts machines <id>Inspect a Metal3 connection’s allowed machines, observed capacity, freshness and eligibility. Supports --page, --page-size (maximum 100) and structured output. Read-only; no machine provisioning.
cloud-accounts get <id>Show one cloud account, its region, validation status, external id, and credential version; secrets are never printed.
cloud-accounts createConnect a provider account. Requires --region <region-id> (ADR-073: a cloud account is registered in one region, holds its credential only there and provisions only into that region's locations; register one credential once per region, and a draining region refuses new accounts), --provider plus provider-specific credential flags; optional --display-name, --default-region, and (MinIO, RustFS, CloudStack, OpenStack) --reach-via-instance <instance-id> to reach a private endpoint through that instance's host agent. Keyless Google Cloud uses --gcp-workload-identity-provider, --gcp-service-account, --gcp-project-id and the --account-id from workload-identity-setup, plus --gcp-jwks-upload when the pool provider holds an uploaded JWKS because Google cannot reach the issuer URL (Anchras then pushes its key set to the provider on every rotation); keyless AWS uses --aws-role-arn (optional --aws-session-name) and keyless Azure --azure-workload-identity with --azure-tenant-id, --azure-client-id and an optional --azure-subscription-id, each with that --account-id. Metal3 uses --metal3-endpoint, --metal3-ca-file, --metal3-token-file, and comma-separated --metal3-namespaces; rotation accepts the same flags. CloudStack uses --cloudstack-api-url, --cloudstack-api-key, --cloudstack-secret-key[-file] and optional --cloudstack-region. OpenStack uses --openstack-auth-url, optional --openstack-region, and either --openstack-application-credential-id with --openstack-application-credential-secret[-file] or --openstack-username with --openstack-password[-file] (optional --openstack-project-id, --openstack-domain-name); --vendor-label ovhcloud marks an OVHcloud OpenStack account at create. Hetzner requires --hetzner-api-token and --hetzner-project-id. Exoscale uses --exoscale-api-key and --exoscale-api-secret[-file] (optional --s3-access-key-id with --s3-secret-access-key override the IAM key for object storage). UpCloud uses --upcloud-token[-file] (recommended), or legacy --upcloud-username and --upcloud-password[-file]; these authentication methods are mutually exclusive; IONOS uses --ionos-token[-file]; STACKIT uses --stackit-project-id and --stackit-service-account-token[-file]; Verda uses --verda-client-id and --verda-client-secret[-file]; Cloudflare uses --cloudflare-account-id and --cloudflare-api-token[-file]. A -file flag set to - reads the secret from stdin, without echo on a terminal; a value flag and its -file flag are mutually exclusive.
cloud-accounts update <id>Update account metadata. Requires --display-name (optional --default-region), or a route change alone: --reach-via-instance <instance-id> or --clear-reach-via-instance (audited).
cloud-accounts rotate <id>Replace sealed provider credentials after validation. Requires --provider plus provider-specific credential flags.
cloud-accounts revalidate <id>Re-run provider credential validation and return current account status.
cloud-accounts delete <id>Delete a connected cloud account. Terminated resources keep their history with the former account; completed backup exports are detached from it and kept (a restore then needs --target-account). Refused while anything still uses the account (including clusters, BYO DNS zone bindings and internal DNS record publications that are not terminated), and while Metal3 allocation history references it: that history is immutable, so archive the account instead.
cloud-accounts archive <id>Archive an account instead of deleting it: it is hidden from list and takes no new use (no provisioning, discovery, revalidation or credential use, and update, rotate and revalidate refuse it), while its terminal history and Metal3 allocation history stay. Refused while anything still uses the account (including unreleased Metal3 allocations, clusters and DNS bindings). Owner only, like delete.
cloud-accounts unarchive <id>Return an archived account to use; the periodic revalidation checks its credentials again. Owner only.
cloud-accounts workload-identity-setupPrint what to configure in the cloud for a keyless (workload identity) account, and allocate the --account-id to create it with. --provider gcp (default) prints the issuer URL, audience, attribute mapping and condition and IAM principal; --provider aws the IAM OIDC provider URL, audience, subject and, with --aws-role-arn, the role trust policy; --provider azure the federated credential's issuer, subject and audience. Optional --account-id (an existing keyless account or an earlier run's ID) and --gcp-workload-identity-provider. Read-only.
cloud-accounts workload-identity-jwksExport the workload identity issuer's discovery document and published JWKS, for an installation whose issuer URL the cloud cannot reach. Prints the issuer URL, each published key's state (signing, successor, retired) and schedule, and whether a key rotation is pending with the successor's activation time; -o json adds both documents. --out-dir <dir> writes jwks.json and .well-known/openid-configuration under <dir>, byte for byte as the issuer serves them: upload jwks.json as a GCP pool provider's JWKS, or host the directory at the issuer URL for AWS and Azure. A copy kept by hand must be replaced while a rotation is pending. Creates the issuer's first key if it has none.

API reference

Browse procedures, request and response types, and download the complete OpenAPI contract.