---
title: "POST /v1/{+parent}/bareMetalAdminClusters"
method: POST
path: "/v1/{+parent}/bareMetalAdminClusters"
tags: ["projects"]
---

# POST /v1/{+parent}/bareMetalAdminClusters

`POST /v1/{+parent}/bareMetalAdminClusters`

Creates a new bare metal admin cluster in a given project and location. The API needs to be combined with creating a bootstrap cluster to work. See: https://cloud.google.com/anthos/clusters/docs/bare-metal/latest/installing/creating-clusters/create-admin-cluster-api#prepare_bootstrap_environment

## Path parameters

- `parent` string, required

## Query parameters

- `allowPreflightFailure` boolean
- `bareMetalAdminClusterId` string
- `validateOnly` boolean

## Request body

- BareMetalAdminCluster — Resource that represents a bare metal admin cluster.
  - `securityConfig` BareMetalAdminSecurityConfig — Specifies the security related settings for the bare metal admin cluster.
    - `authorization` Authorization — Authorization defines the On-Prem cluster authorization configuration to bootstrap onto the admin cluster.
      - `adminUsers` ClusterUser[] — For VMware and bare metal user clusters, users will be granted the cluster-admin role on the cluster, which provides full administrative access to the cluster. For bare metal admin clusters, users will be granted the cluster-view role, which limits users to read-only access.
        - `username` string — Required. The name of the user, e.g. `my-gcp-id@gmail.com`.
  - `validationCheck` ValidationCheck — ValidationCheck represents the result of preflight check.
    - `status` ValidationCheckStatus — ValidationCheckStatus defines the detailed validation check status.
      - `result` ValidationCheckResult[] — Individual checks which failed as part of the Preflight check execution.
        - `details` string — Detailed failure information, which might be unformatted.
        - `category` string — The category of the validation.
        - `reason` string — A human-readable message of the check failure.
        - `description` string — The description of the validation check.
        - `state` 'STATE_UNKNOWN' | 'STATE_FAILURE' | 'STATE_SKIPPED' | 'STATE_FATAL' | 'STATE_WARNING' — The validation check state.
    - `option` 'OPTIONS_UNSPECIFIED' | 'SKIP_VALIDATION_CHECK_BLOCKING' | 'SKIP_VALIDATION_ALL' — Options used for the validation check
    - `scenario` 'SCENARIO_UNSPECIFIED' | 'CREATE' | 'UPDATE' — Output only. The scenario when the preflight checks were run.
  - `deleteTime` string, google-datetime — Output only. The time at which this bare metal admin cluster was deleted. If the resource is not deleted, this must be empty
  - `loadBalancer` BareMetalAdminLoadBalancerConfig — BareMetalAdminLoadBalancerConfig specifies the load balancer configuration.
    - `portConfig` BareMetalAdminPortConfig — BareMetalAdminPortConfig is the specification of load balancer ports.
      - `controlPlaneLoadBalancerPort` integer — The port that control plane hosted load balancers will listen on.
    - `bgpLbConfig` BareMetalAdminBgpLbConfig — BareMetalAdminBgpLbConfig represents configuration parameters for a Border Gateway Protocol (BGP) load balancer.
      - `asn` string, int64 — Required. BGP autonomous system number (ASN) of the cluster. This field can be updated after cluster creation.
      - `addressPools` BareMetalAdminLoadBalancerAddressPool[] — Required. AddressPools is a list of non-overlapping IP pools used by load balancer typed services. All addresses must be routable to load balancer nodes. IngressVIP must be included in the pools.
        - `pool` string — Required. The name of the address pool.
        - `addresses` string[] — Required. The addresses that are part of this pool. Each address must be either in the CIDR form (1.2.3.0/24) or range form (1.2.3.1-1.2.3.5).
        - `avoidBuggyIps` boolean — If true, avoid using IPs ending in .0 or .255. This avoids buggy consumer devices mistakenly dropping IPv4 traffic for those special IP addresses.
        - `manualAssign` boolean — If true, prevent IP addresses from being automatically assigned.
      - `bgpPeerConfigs` BareMetalAdminBgpPeerConfig[] — Required. The list of BGP peers that the cluster will connect to. At least one peer must be configured for each control plane node. Control plane nodes will connect to these peers to advertise the control plane VIP. The Services load balancer also uses these peers by default. This field can be updated after cluster creation.
        - `asn` string, int64 — Required. BGP autonomous system number (ASN) for the network that contains the external peer device.
        - `ipAddress` string — Required. The IP address of the external peer device.
        - `controlPlaneNodes` string[] — The IP address of the control plane node that connects to the external peer. If you don't specify any control plane nodes, all control plane nodes can connect to the external peer. If you specify one or more IP addresses, only the nodes specified participate in peering sessions.
      - `loadBalancerNodePoolConfig` BareMetalAdminLoadBalancerNodePoolConfig — Specifies the load balancer's node pool configuration.
        - `nodePoolConfig` BareMetalNodePoolConfig — BareMetalNodePoolConfig describes the configuration of all nodes within a given bare metal node pool.
          - `kubeletConfig` BareMetalKubeletConfig — KubeletConfig defines the modifiable kubelet configurations for bare metal machines. Note: this list includes fields supported in GKE (see https://cloud.google.com/kubernetes-engine/docs/how-to/node-system-config#kubelet-options).
            - `registryPullQps` integer — The limit of registry pulls per second. Setting this value to 0 means no limit. Updating this field may impact scalability by changing the amount of traffic produced by image pulls. Defaults to 5.
            - `registryBurst` integer — The maximum size of bursty pulls, temporarily allows pulls to burst to this number, while still not exceeding registry_pull_qps. The value must not be a negative number. Updating this field may impact scalability by changing the amount of traffic produced by image pulls. Defaults to 10.
            - `serializeImagePullsDisabled` boolean — Prevents the Kubelet from pulling multiple images at a time. We recommend *not* changing the default value on nodes that run docker daemon with version < 1.9 or an Another Union File System (Aufs) storage backend. Issue https://github.com/kubernetes/kubernetes/issues/10959 has more details.
          - `operatingSystem` 'OPERATING_SYSTEM_UNSPECIFIED' | 'LINUX' — Specifies the nodes operating system (default: LINUX).
          - `nodeConfigs` BareMetalNodeConfig[] — Required. The list of machine addresses in the bare metal node pool.
            - `nodeIp` string — The default IPv4 address for SSH access and Kubernetes node. Example: 192.168.0.1
            - `labels` object — The labels assigned to this node. An object containing a list of key/value pairs. The labels here, unioned with the labels set on BareMetalNodePoolConfig are the set of labels that will be applied to the node. If there are any conflicts, the BareMetalNodeConfig labels take precedence. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
          - `labels` object — The labels assigned to nodes of this node pool. An object containing a list of key/value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
          - `taints` NodeTaint[] — The initial taints assigned to nodes of this node pool.
            - `key` string — Key associated with the effect.
            - `value` string — Value associated with the effect.
            - `effect` 'EFFECT_UNSPECIFIED' | 'NO_SCHEDULE' | 'PREFER_NO_SCHEDULE' | 'NO_EXECUTE' — The taint effect.
    - `vipConfig` BareMetalAdminVipConfig — BareMetalAdminVipConfig for bare metal load balancer configurations.
      - `controlPlaneVip` string — The VIP which you previously set aside for the Kubernetes API of this bare metal admin cluster.
    - `manualLbConfig` BareMetalAdminManualLbConfig — BareMetalAdminManualLbConfig represents configuration parameters for a manual load balancer.
      - `enabled` boolean — Whether manual load balancing is enabled.
  - `binaryAuthorization` BinaryAuthorization — Configuration for Binary Authorization.
    - `evaluationMode` 'EVALUATION_MODE_UNSPECIFIED' | 'DISABLED' | 'PROJECT_SINGLETON_POLICY_ENFORCE' — Mode of operation for binauthz policy evaluation. If unspecified, defaults to DISABLED.
  - `proxy` BareMetalAdminProxyConfig — BareMetalAdminProxyConfig specifies the cluster proxy configuration.
    - `uri` string — Required. Specifies the address of your proxy server. Examples: `http://domain` WARNING: Do not provide credentials in the format `http://(username:password@)domain` these will be rejected by the server.
    - `noProxy` string[] — A list of IPs, hostnames, and domains that should skip the proxy. Examples: ["127.0.0.1", "example.com", ".corp", "localhost"].
  - `createTime` string, google-datetime — Output only. The time at which this bare metal admin cluster was created.
  - `maintenanceStatus` BareMetalAdminMaintenanceStatus — BareMetalAdminMaintenanceStatus represents the maintenance status for bare metal Admin cluster CR's nodes.
    - `machineDrainStatus` BareMetalAdminMachineDrainStatus — BareMetalAdminMachineDrainStatus represents the status of bare metal node machines that are undergoing drain operations.
      - `drainedMachines` BareMetalAdminDrainedMachine[] — The list of drained machines.
        - `nodeIp` string — Drained machine IP address.
      - `drainingMachines` BareMetalAdminDrainingMachine[] — The list of draning machines.
        - `nodeIp` string — Draining machine IP address.
        - `podCount` integer — The count of pods yet to drain.
  - `status` ResourceStatus — ResourceStatus describes why a cluster or node pool has a certain status. (e.g., ERROR or DEGRADED).
    - `errorMessage` string — Human-friendly representation of the error message from controller. The error message can be temporary as the controller controller creates a cluster or node pool. If the error message persists for a longer period of time, it can be used to surface error message to indicate real problems requiring user intervention.
    - `versions` Versions — Versions describes the mapping of a given version to the number of machines under this version.
      - `versions` Version[] — Shows the mapping of a given version to the number of machines under this version.
        - `version` string — Resource version.
        - `count` string, int64 — Number of machines under the above version.
    - `conditions` ResourceCondition[] — ResourceCondition provide a standard mechanism for higher-level status reporting from controller.
      - `type` string — Type of the condition. (e.g., ClusterRunning, NodePoolRunning or ServerSidePreflightReady)
      - `message` string — Human-readable message indicating details about last transition.
      - `lastTransitionTime` string, google-datetime — Last time the condition transit from one status to another.
      - `reason` string — Machine-readable message indicating details about last transition.
      - `state` 'STATE_UNSPECIFIED' | 'STATE_TRUE' | 'STATE_FALSE' | 'STATE_UNKNOWN' — state of the condition.
    - `version` string — Reflect current version of the resource.
  - `name` string — Immutable. The bare metal admin cluster resource name.
  - `annotations` object — Annotations on the bare metal admin cluster. This field has the same restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.
  - `localName` string — Output only. The object name of the bare metal cluster custom resource. This field is used to support conflicting names when enrolling existing clusters to the API. When used as a part of cluster enrollment, this field will differ from the ID in the resource name. For new clusters, this field will match the user provided cluster name and be visible in the last component of the resource name. It is not modifiable. All users should use this name to access their cluster using gkectl or kubectl and should expect to see the local name when viewing admin cluster controller logs.
  - `bareMetalVersion` string — The Anthos clusters on bare metal version for the bare metal admin cluster.
  - `state` 'STATE_UNSPECIFIED' | 'PROVISIONING' | 'RUNNING' | 'RECONCILING' | 'STOPPING' | 'ERROR' | 'DEGRADED' — Output only. The current state of the bare metal admin cluster.
  - `networkConfig` BareMetalAdminNetworkConfig — BareMetalAdminNetworkConfig specifies the cluster network configuration.
    - `islandModeCidr` BareMetalAdminIslandModeCidrConfig — BareMetalAdminIslandModeCidrConfig specifies the cluster CIDR configuration while running in island mode.
      - `serviceAddressCidrBlocks` string[] — Required. All services in the cluster are assigned an RFC1918 IPv4 address from these ranges. This field cannot be changed after creation.
      - `podAddressCidrBlocks` string[] — Required. All pods in the cluster are assigned an RFC1918 IPv4 address from these ranges. This field cannot be changed after creation.
    - `advancedNetworking` boolean — Enables the use of advanced Anthos networking features, such as Bundled Load Balancing with BGP or the egress NAT gateway. Setting configuration for advanced networking features will automatically set this flag.
    - `multipleNetworkInterfacesConfig` BareMetalAdminMultipleNetworkInterfacesConfig — Specifies the multiple networking interfaces cluster configuration.
      - `enabled` boolean — Whether to enable multiple network interfaces for your pods. When set network_config.advanced_networking is automatically set to true.
  - `endpoint` string — Output only. The IP address name of bare metal admin cluster's API server.
  - `updateTime` string, google-datetime — Output only. The time at which this bare metal admin cluster was last updated.
  - `controlPlane` BareMetalAdminControlPlaneConfig — BareMetalAdminControlPlaneConfig specifies the control plane configuration.
    - `controlPlaneNodePoolConfig` BareMetalAdminControlPlaneNodePoolConfig — BareMetalAdminControlPlaneNodePoolConfig specifies the control plane node pool configuration. We have a control plane specific node pool config so that we can flexible about supporting control plane specific fields in the future.
      - `nodePoolConfig` BareMetalNodePoolConfig — BareMetalNodePoolConfig describes the configuration of all nodes within a given bare metal node pool.
        - `kubeletConfig` BareMetalKubeletConfig — KubeletConfig defines the modifiable kubelet configurations for bare metal machines. Note: this list includes fields supported in GKE (see https://cloud.google.com/kubernetes-engine/docs/how-to/node-system-config#kubelet-options).
          - `registryPullQps` integer — The limit of registry pulls per second. Setting this value to 0 means no limit. Updating this field may impact scalability by changing the amount of traffic produced by image pulls. Defaults to 5.
          - `registryBurst` integer — The maximum size of bursty pulls, temporarily allows pulls to burst to this number, while still not exceeding registry_pull_qps. The value must not be a negative number. Updating this field may impact scalability by changing the amount of traffic produced by image pulls. Defaults to 10.
          - `serializeImagePullsDisabled` boolean — Prevents the Kubelet from pulling multiple images at a time. We recommend *not* changing the default value on nodes that run docker daemon with version < 1.9 or an Another Union File System (Aufs) storage backend. Issue https://github.com/kubernetes/kubernetes/issues/10959 has more details.
        - `operatingSystem` 'OPERATING_SYSTEM_UNSPECIFIED' | 'LINUX' — Specifies the nodes operating system (default: LINUX).
        - `nodeConfigs` BareMetalNodeConfig[] — Required. The list of machine addresses in the bare metal node pool.
          - `nodeIp` string — The default IPv4 address for SSH access and Kubernetes node. Example: 192.168.0.1
          - `labels` object — The labels assigned to this node. An object containing a list of key/value pairs. The labels here, unioned with the labels set on BareMetalNodePoolConfig are the set of labels that will be applied to the node. If there are any conflicts, the BareMetalNodeConfig labels take precedence. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
        - `labels` object — The labels assigned to nodes of this node pool. An object containing a list of key/value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
        - `taints` NodeTaint[] — The initial taints assigned to nodes of this node pool.
          - `key` string — Key associated with the effect.
          - `value` string — Value associated with the effect.
          - `effect` 'EFFECT_UNSPECIFIED' | 'NO_SCHEDULE' | 'PREFER_NO_SCHEDULE' | 'NO_EXECUTE' — The taint effect.
    - `apiServerArgs` BareMetalAdminApiServerArgument[] — Customizes the default API server args. Only a subset of customized flags are supported. Please refer to the API server documentation below to know the exact format: https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/
      - `value` string — Required. The value of the arg as it will be passed to the API Server command line.
      - `argument` string — Required. The argument name as it appears on the API Server command line please make sure to remove the leading dashes.
  - `etag` string — This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. Allows clients to perform consistent read-modify-writes through optimistic concurrency control.
  - `clusterOperations` BareMetalAdminClusterOperationsConfig — BareMetalAdminClusterOperationsConfig specifies the admin cluster's observability infrastructure.
    - `enableApplicationLogs` boolean — Whether collection of application logs/metrics should be enabled (in addition to system logs/metrics).
  - `fleet` Fleet — Fleet related configuration. Fleets are a Google Cloud concept for logically organizing clusters, letting you use and manage multi-cluster capabilities and apply consistent policies across your systems. See [Anthos Fleets](`https://cloud.google.com/anthos/multicluster-management/fleets`) for more details on Anthos multi-cluster capabilities using Fleets. ##
    - `membership` string — Output only. The name of the managed fleet Membership resource associated to this cluster. Membership names are formatted as `projects//locations//memberships/`.
  - `maintenanceConfig` BareMetalAdminMaintenanceConfig — BareMetalAdminMaintenanceConfig specifies configurations to put bare metal Admin cluster CRs nodes in and out of maintenance.
    - `maintenanceAddressCidrBlocks` string[] — Required. All IPv4 address from these ranges will be placed into maintenance mode. Nodes in maintenance mode will be cordoned and drained. When both of these are true, the "baremetal.cluster.gke.io/maintenance" annotation will be set on the node resource.
  - `reconciling` boolean — Output only. If set, there are currently changes in flight to the bare metal Admin Cluster.
  - `nodeAccessConfig` BareMetalAdminNodeAccessConfig — Specifies the node access related settings for the bare metal admin cluster.
    - `loginUser` string — Required. LoginUser is the user name used to access node machines. It defaults to "root" if not set.
  - `description` string — A human readable description of this bare metal admin cluster.
  - `storage` BareMetalAdminStorageConfig — BareMetalAdminStorageConfig specifies the cluster storage configuration.
    - `lvpNodeMountsConfig` BareMetalLvpConfig — Specifies the configs for local persistent volumes (PVs).
      - `path` string — Required. The host machine path.
      - `storageClass` string — Required. The StorageClass name that PVs will be created with.
    - `lvpShareConfig` BareMetalLvpShareConfig — Specifies the configs for local persistent volumes under a shared file system.
      - `sharedPathPvCount` integer — The number of subdirectories to create under path.
      - `lvpConfig` BareMetalLvpConfig — Specifies the configs for local persistent volumes (PVs).
        - `path` string — Required. The host machine path.
        - `storageClass` string — Required. The StorageClass name that PVs will be created with.
  - `osEnvironmentConfig` BareMetalAdminOsEnvironmentConfig — Specifies operating system operation settings for cluster provisioning.
    - `packageRepoExcluded` boolean — Whether the package repo should be added when initializing bare metal machines.
  - `nodeConfig` BareMetalAdminWorkloadNodeConfig — BareMetalAdminWorkloadNodeConfig specifies the workload node configurations.
    - `maxPodsPerNode` string, int64 — The maximum number of pods a node can run. The size of the CIDR range assigned to the node will be derived from this parameter. By default 110 Pods are created per Node. Upper bound is 250 for both HA and non-HA admin cluster. Lower bound is 64 for non-HA admin cluster and 32 for HA admin cluster.
  - `uid` string — Output only. The unique identifier of the bare metal admin cluster.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/gkeonprem.md) · [All operations](https://skmtc.net/google/apis/gkeonprem/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/gkeonprem/versions/aed3768b9183/schema)
