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

# POST /v1/{+parent}/bareMetalClusters

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

Creates a new bare metal cluster in a given project and location.

## Path parameters

- `parent` string, required

## Query parameters

- `allowPreflightFailure` boolean
- `bareMetalClusterId` string
- `validateOnly` boolean

## Request body

- BareMetalCluster — Resource that represents a bare metal user cluster.
  - `localName` string — Output only. The object name of the bare metal user cluster custom resource on the associated admin cluster. 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 name 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. When the local name and cluster name differ, the local name is used in the admin cluster controller logs. You use the cluster name when accessing the cluster using bmctl and kubectl.
  - `localNamespace` string — Output only. The namespace of the cluster.
  - `bareMetalVersion` string — Required. The Anthos clusters on bare metal version for your user cluster.
  - `name` string — Immutable. The bare metal user cluster resource name.
  - `annotations` object — Annotations on the bare metal user 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.
  - `controlPlane` BareMetalControlPlaneConfig — Specifies the control plane configuration.
    - `controlPlaneNodePoolConfig` BareMetalControlPlaneNodePoolConfig — Specifies the control plane 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.
    - `apiServerArgs` BareMetalApiServerArgument[] — Customizes the default API server args. Only a subset of customized flags are supported. For the exact format, refer to the [API server documentation](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, make sure to remove the leading dashes.
  - `etag` string — Output only. 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` BareMetalClusterOperationsConfig — Specifies the bare metal user cluster's observability infrastructure.
    - `enableApplicationLogs` boolean — Whether collection of application logs/metrics should be enabled (in addition to system logs/metrics).
  - `state` 'STATE_UNSPECIFIED' | 'PROVISIONING' | 'RUNNING' | 'RECONCILING' | 'STOPPING' | 'ERROR' | 'DEGRADED' — Output only. The current state of the bare metal user cluster.
  - `adminClusterName` string — Output only. The resource name of the bare metal admin cluster managing this user cluster.
  - `networkConfig` BareMetalNetworkConfig — Specifies the cluster network configuration.
    - `multipleNetworkInterfacesConfig` BareMetalMultipleNetworkInterfacesConfig — 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.
    - `islandModeCidr` BareMetalIslandModeCidrConfig — 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 is mutable after creation starting with version 1.15.
      - `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.
    - `srIovConfig` BareMetalSrIovConfig — Specifies the SR-IOV networking operator config.
      - `enabled` boolean — Whether to install the SR-IOV operator.
  - `endpoint` string — Output only. The IP address of the bare metal user cluster's API server.
  - `updateTime` string, google-datetime — Output only. The time when the bare metal user cluster was last updated.
  - `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 when the bare metal user cluster was deleted. If the resource is not deleted, this must be empty
  - `loadBalancer` BareMetalLoadBalancerConfig — Specifies the load balancer configuration.
    - `portConfig` BareMetalPortConfig — Specifies load balancer ports for the bare metal user cluster.
      - `controlPlaneLoadBalancerPort` integer — The port that control plane hosted load balancers will listen on.
    - `manualLbConfig` BareMetalManualLbConfig — Represents configuration parameters for a manual load balancer.
      - `enabled` boolean — Whether manual load balancing is enabled.
    - `bgpLbConfig` BareMetalBgpLbConfig — BareMetalBgpLbConfig 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` BareMetalLoadBalancerAddressPool[] — 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` BareMetalBgpPeerConfig[] — 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.
        - `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.
        - `asn` string, int64 — Required. BGP autonomous system number (ASN) for the network that contains the external peer device.
      - `loadBalancerNodePoolConfig` BareMetalLoadBalancerNodePoolConfig — 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` BareMetalVipConfig — Specifies the VIP config for the bare metal load balancer.
      - `ingressVip` string — The VIP which you previously set aside for ingress traffic into this bare metal user cluster.
      - `controlPlaneVip` string — The VIP which you previously set aside for the Kubernetes API of this bare metal user cluster.
    - `metalLbConfig` BareMetalMetalLbConfig — Represents configuration parameters for a MetalLB load balancer.
      - `addressPools` BareMetalLoadBalancerAddressPool[] — 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.
      - `loadBalancerNodePoolConfig` BareMetalLoadBalancerNodePoolConfig — 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.
  - `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.
  - `securityConfig` BareMetalSecurityConfig — Specifies the security related settings for the bare metal user 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`.
  - `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.
  - `proxy` BareMetalProxyConfig — Specifies the cluster proxy configuration.
    - `uri` string — Required. Specifies the address of your proxy server. Examples: `http://domain` 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 when the bare metal user cluster was created.
  - `maintenanceStatus` BareMetalMaintenanceStatus — Represents the maintenance status of the bare metal user cluster.
    - `machineDrainStatus` BareMetalMachineDrainStatus — Represents the status of node machines that are undergoing drain operations.
      - `drainingMachines` BareMetalDrainingMachine[] — The list of draning machines.
        - `nodeIp` string — Draining machine IP address.
        - `podCount` integer — The count of pods yet to drain.
      - `drainedMachines` BareMetalDrainedMachine[] — The list of drained machines.
        - `nodeIp` string — Drained machine IP address.
  - `storage` BareMetalStorageConfig — BareMetalStorageConfig specifies the cluster storage configuration.
    - `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.
    - `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.
  - `osEnvironmentConfig` BareMetalOsEnvironmentConfig — Specifies operating system settings for cluster provisioning.
    - `packageRepoExcluded` boolean — Whether the package repo should not be included when initializing bare metal machines.
  - `nodeAccessConfig` BareMetalNodeAccessConfig — Specifies the node access related settings for the bare metal user cluster.
    - `loginUser` string — 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 user cluster.
  - `uid` string — Output only. The unique identifier of the bare metal user cluster.
  - `nodeConfig` BareMetalWorkloadNodeConfig — 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.
    - `containerRuntime` 'CONTAINER_RUNTIME_UNSPECIFIED' | 'CONTAINERD' — Specifies which container runtime will be used.
  - `maintenanceConfig` BareMetalMaintenanceConfig — Specifies configurations to put bare metal 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.
  - `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/`.
  - `reconciling` boolean — Output only. If set, there are currently changes in flight to the bare metal user cluster.
  - `adminClusterMembership` string — Required. The admin cluster this bare metal user cluster belongs to. This is the full resource name of the admin cluster's fleet membership.
  - `upgradePolicy` BareMetalClusterUpgradePolicy — BareMetalClusterUpgradePolicy defines the cluster upgrade policy.
    - `policy` 'NODE_POOL_POLICY_UNSPECIFIED' | 'SERIAL' | 'CONCURRENT' — Specifies which upgrade policy to use.
    - `pause` boolean — Output only. Pause is used to show the upgrade pause status. It's view only for now.

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