Skip to main content

bare_metal_clusters

Creates, updates, deletes, gets or lists a bare_metal_clusters resource.

Overview

Namebare_metal_clusters
TypeResource
Idgoogle.gkeonprem.bare_metal_clusters

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringImmutable. The bare metal user cluster resource name.
adminClusterMembershipstringRequired. The admin cluster this bare metal user cluster belongs to. This is the full resource name of the admin cluster's fleet membership.
adminClusterNamestringOutput only. The resource name of the bare metal admin cluster managing this user cluster.
annotationsobjectAnnotations 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.
bareMetalVersionstringRequired. The Anthos clusters on bare metal version for your user cluster.
binaryAuthorizationobjectBinary Authorization related configurations. (id: BinaryAuthorization)
clusterOperationsobjectCluster operations configuration. (id: BareMetalClusterOperationsConfig)
controlPlaneobjectRequired. Control plane configuration. (id: BareMetalControlPlaneConfig)
createTimestring (google-datetime)Output only. The time when the bare metal user cluster was created.
deleteTimestring (google-datetime)Output only. The time when the bare metal user cluster was deleted. If the resource is not deleted, this must be empty
descriptionstringA human readable description of this bare metal user cluster.
endpointstringOutput only. The IP address of the bare metal user cluster's API server.
etagstringOutput 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.
fleetobjectOutput only. Fleet configuration for the cluster. (id: Fleet)
loadBalancerobjectRequired. Load balancer configuration. (id: BareMetalLoadBalancerConfig)
localNamestringOutput 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.
localNamespacestringOutput only. The namespace of the cluster.
maintenanceConfigobjectMaintenance configuration. (id: BareMetalMaintenanceConfig)
maintenanceStatusobjectOutput only. Status of on-going maintenance tasks. (id: BareMetalMaintenanceStatus)
networkConfigobjectRequired. Network configuration. (id: BareMetalNetworkConfig)
nodeAccessConfigobjectNode access related configurations. (id: BareMetalNodeAccessConfig)
nodeConfigobjectWorkload node configuration. (id: BareMetalWorkloadNodeConfig)
osEnvironmentConfigobjectOS environment related configurations. (id: BareMetalOsEnvironmentConfig)
proxyobjectProxy configuration. (id: BareMetalProxyConfig)
reconcilingbooleanOutput only. If set, there are currently changes in flight to the bare metal user cluster.
securityConfigobjectSecurity related setting configuration. (id: BareMetalSecurityConfig)
statestringOutput only. The current state of the bare metal user cluster.
statusobjectOutput only. Detailed cluster status. (id: ResourceStatus)
storageobjectRequired. Storage configuration. (id: BareMetalStorageConfig)
uidstringOutput only. The unique identifier of the bare metal user cluster.
updateTimestring (google-datetime)Output only. The time when the bare metal user cluster was last updated.
upgradePolicyobjectThe cluster upgrade policy. (id: BareMetalClusterUpgradePolicy)
validationCheckobjectOutput only. The result of the preflight check. (id: ValidationCheck)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_bare_metal_clusters_getselectprojectsId, locationsId, bareMetalClustersIdview, allowMissingGets details of a single bare metal Cluster.
projects_locations_bare_metal_clusters_listselectprojectsId, locationsIdpageSize, pageToken, filter, view, allowMissingLists bare metal clusters in a given project and location.
projects_locations_bare_metal_clusters_createinsertprojectsId, locationsIdbareMetalClusterId, validateOnly, allowPreflightFailureCreates a new bare metal cluster in a given project and location.
projects_locations_bare_metal_clusters_patchupdateprojectsId, locationsId, bareMetalClustersIdupdateMask, allowMissing, validateOnlyUpdates the parameters of a single bare metal Cluster.
projects_locations_bare_metal_clusters_deletedeleteprojectsId, locationsId, bareMetalClustersIdetag, allowMissing, validateOnly, force, ignoreErrorsDeletes a single bare metal Cluster.
projects_locations_bare_metal_clusters_enrollexecprojectsId, locationsIdEnrolls an existing bare metal user cluster and its node pools to the Anthos On-Prem API within a given project and location. Through enrollment, an existing cluster will become Anthos On-Prem API managed. The corresponding GCP resources will be created and all future modifications to the cluster and/or its node pools will be expected to be performed through the API.
projects_locations_bare_metal_clusters_unenrollexecprojectsId, locationsId, bareMetalClustersIdetag, allowMissing, validateOnly, forceUnenrolls an existing bare metal user cluster and its node pools from the Anthos On-Prem API within a given project and location. Unenrollment removes the Cloud reference to the cluster without modifying the underlying OnPrem Resources. Clusters and node pools will continue to run; however, they will no longer be accessible through the Anthos On-Prem API or its clients.
projects_locations_bare_metal_clusters_query_version_configexecprojectsId, locationsIdcreateConfig.adminClusterMembership, createConfig.adminClusterName, upgradeConfig.clusterNameQueries the bare metal user cluster version config.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
bareMetalClustersIdstring
locationsIdstring
projectsIdstring
allowMissingboolean
allowPreflightFailureboolean
bareMetalClusterIdstring
createConfig.adminClusterMembershipstring
createConfig.adminClusterNamestring
etagstring
filterstring
forceboolean
ignoreErrorsboolean
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)
upgradeConfig.clusterNamestring
validateOnlyboolean
viewstring

SELECT examples

Gets details of a single bare metal Cluster.

SELECT
name,
adminClusterMembership,
adminClusterName,
annotations,
bareMetalVersion,
binaryAuthorization,
clusterOperations,
controlPlane,
createTime,
deleteTime,
description,
endpoint,
etag,
fleet,
loadBalancer,
localName,
localNamespace,
maintenanceConfig,
maintenanceStatus,
networkConfig,
nodeAccessConfig,
nodeConfig,
osEnvironmentConfig,
proxy,
reconciling,
securityConfig,
state,
status,
storage,
uid,
updateTime,
upgradePolicy,
validationCheck
FROM google.gkeonprem.bare_metal_clusters
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND bareMetalClustersId = '{{ bareMetalClustersId }}' -- required
AND view = '{{ view }}'
AND allowMissing = '{{ allowMissing }}';

INSERT examples

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

INSERT INTO google.gkeonprem.bare_metal_clusters (
data__name,
data__adminClusterMembership,
data__description,
data__bareMetalVersion,
data__annotations,
data__networkConfig,
data__controlPlane,
data__loadBalancer,
data__storage,
data__proxy,
data__clusterOperations,
data__maintenanceConfig,
data__nodeConfig,
data__securityConfig,
data__nodeAccessConfig,
data__osEnvironmentConfig,
data__binaryAuthorization,
data__upgradePolicy,
projectsId,
locationsId,
bareMetalClusterId,
validateOnly,
allowPreflightFailure
)
SELECT
'{{ name }}',
'{{ adminClusterMembership }}',
'{{ description }}',
'{{ bareMetalVersion }}',
'{{ annotations }}',
'{{ networkConfig }}',
'{{ controlPlane }}',
'{{ loadBalancer }}',
'{{ storage }}',
'{{ proxy }}',
'{{ clusterOperations }}',
'{{ maintenanceConfig }}',
'{{ nodeConfig }}',
'{{ securityConfig }}',
'{{ nodeAccessConfig }}',
'{{ osEnvironmentConfig }}',
'{{ binaryAuthorization }}',
'{{ upgradePolicy }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ bareMetalClusterId }}',
'{{ validateOnly }}',
'{{ allowPreflightFailure }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the parameters of a single bare metal Cluster.

UPDATE google.gkeonprem.bare_metal_clusters
SET
data__name = '{{ name }}',
data__adminClusterMembership = '{{ adminClusterMembership }}',
data__description = '{{ description }}',
data__bareMetalVersion = '{{ bareMetalVersion }}',
data__annotations = '{{ annotations }}',
data__networkConfig = '{{ networkConfig }}',
data__controlPlane = '{{ controlPlane }}',
data__loadBalancer = '{{ loadBalancer }}',
data__storage = '{{ storage }}',
data__proxy = '{{ proxy }}',
data__clusterOperations = '{{ clusterOperations }}',
data__maintenanceConfig = '{{ maintenanceConfig }}',
data__nodeConfig = '{{ nodeConfig }}',
data__securityConfig = '{{ securityConfig }}',
data__nodeAccessConfig = '{{ nodeAccessConfig }}',
data__osEnvironmentConfig = '{{ osEnvironmentConfig }}',
data__binaryAuthorization = '{{ binaryAuthorization }}',
data__upgradePolicy = '{{ upgradePolicy }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND bareMetalClustersId = '{{ bareMetalClustersId }}' --required
AND updateMask = '{{ updateMask}}'
AND allowMissing = {{ allowMissing}}
AND validateOnly = {{ validateOnly}}
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a single bare metal Cluster.

DELETE FROM google.gkeonprem.bare_metal_clusters
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND bareMetalClustersId = '{{ bareMetalClustersId }}' --required
AND etag = '{{ etag }}'
AND allowMissing = '{{ allowMissing }}'
AND validateOnly = '{{ validateOnly }}'
AND force = '{{ force }}'
AND ignoreErrors = '{{ ignoreErrors }}';

Lifecycle Methods

Enrolls an existing bare metal user cluster and its node pools to the Anthos On-Prem API within a given project and location. Through enrollment, an existing cluster will become Anthos On-Prem API managed. The corresponding GCP resources will be created and all future modifications to the cluster and/or its node pools will be expected to be performed through the API.

EXEC google.gkeonprem.bare_metal_clusters.projects_locations_bare_metal_clusters_enroll 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required
@@json=
'{
"bareMetalClusterId": "{{ bareMetalClusterId }}",
"localName": "{{ localName }}",
"adminClusterMembership": "{{ adminClusterMembership }}",
"localNamespace": "{{ localNamespace }}"
}';