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

NameDatatypeDescription
namestringImmutable. The bare metal user cluster resource name.
descriptionstringA human readable description of this bare metal user cluster.
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.
binaryAuthorizationobjectConfiguration for Binary Authorization.
clusterOperationsobjectSpecifies the bare metal user cluster's observability infrastructure.
controlPlaneobjectSpecifies the control plane configuration.
createTimestringOutput only. The time when the bare metal user cluster was created.
deleteTimestringOutput only. The time when the bare metal user cluster was deleted. If the resource is not deleted, this must be empty
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.
fleetobjectFleet 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 for more details on Anthos multi-cluster capabilities using Fleets. ##
loadBalancerobjectSpecifies the load balancer configuration.
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.
maintenanceConfigobjectSpecifies configurations to put bare metal nodes in and out of maintenance.
maintenanceStatusobjectRepresents the maintenance status of the bare metal user cluster.
networkConfigobjectSpecifies the cluster network configuration.
nodeAccessConfigobjectSpecifies the node access related settings for the bare metal user cluster.
nodeConfigobjectSpecifies the workload node configurations.
osEnvironmentConfigobjectSpecifies operating system settings for cluster provisioning.
proxyobjectSpecifies the cluster proxy configuration.
reconcilingbooleanOutput only. If set, there are currently changes in flight to the bare metal user cluster.
securityConfigobjectSpecifies the security related settings for the bare metal user cluster.
statestringOutput only. The current state of the bare metal user cluster.
statusobjectResourceStatus describes why a cluster or node pool has a certain status. (e.g., ERROR or DEGRADED).
storageobjectBareMetalStorageConfig specifies the cluster storage configuration.
uidstringOutput only. The unique identifier of the bare metal user cluster.
updateTimestringOutput only. The time when the bare metal user cluster was last updated.
upgradePolicyobjectBareMetalClusterUpgradePolicy defines the cluster upgrade policy.
validationCheckobjectValidationCheck represents the result of preflight check.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_bare_metal_clusters_getSELECTbareMetalClustersId, locationsId, projectsIdGets details of a single bare metal Cluster.
projects_locations_bare_metal_clusters_listSELECTlocationsId, projectsIdLists bare metal clusters in a given project and location.
projects_locations_bare_metal_clusters_createINSERTlocationsId, projectsIdCreates a new bare metal cluster in a given project and location.
projects_locations_bare_metal_clusters_deleteDELETEbareMetalClustersId, locationsId, projectsIdDeletes a single bare metal Cluster.
projects_locations_bare_metal_clusters_patchUPDATEbareMetalClustersId, locationsId, projectsIdUpdates the parameters of a single bare metal Cluster.
projects_locations_bare_metal_clusters_enrollEXEClocationsId, projectsIdEnrolls 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_query_version_configEXEClocationsId, projectsIdQueries the bare metal user cluster version config.
projects_locations_bare_metal_clusters_unenrollEXECbareMetalClustersId, locationsId, projectsIdUnenrolls 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.

SELECT examples

Lists bare metal clusters in a given project and location.

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

INSERT example

Use the following StackQL query and manifest file to create a new bare_metal_clusters resource.

/*+ create */
INSERT INTO google.gkeonprem.bare_metal_clusters (
locationsId,
projectsId,
name,
adminClusterMembership,
description,
bareMetalVersion,
annotations,
networkConfig,
controlPlane,
loadBalancer,
storage,
proxy,
clusterOperations,
maintenanceConfig,
nodeConfig,
securityConfig,
nodeAccessConfig,
osEnvironmentConfig,
binaryAuthorization,
upgradePolicy
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ adminClusterMembership }}',
'{{ description }}',
'{{ bareMetalVersion }}',
'{{ annotations }}',
'{{ networkConfig }}',
'{{ controlPlane }}',
'{{ loadBalancer }}',
'{{ storage }}',
'{{ proxy }}',
'{{ clusterOperations }}',
'{{ maintenanceConfig }}',
'{{ nodeConfig }}',
'{{ securityConfig }}',
'{{ nodeAccessConfig }}',
'{{ osEnvironmentConfig }}',
'{{ binaryAuthorization }}',
'{{ upgradePolicy }}'
;

UPDATE example

Updates a bare_metal_clusters resource.

/*+ update */
UPDATE google.gkeonprem.bare_metal_clusters
SET
name = '{{ name }}',
adminClusterMembership = '{{ adminClusterMembership }}',
description = '{{ description }}',
bareMetalVersion = '{{ bareMetalVersion }}',
annotations = '{{ annotations }}',
networkConfig = '{{ networkConfig }}',
controlPlane = '{{ controlPlane }}',
loadBalancer = '{{ loadBalancer }}',
storage = '{{ storage }}',
proxy = '{{ proxy }}',
clusterOperations = '{{ clusterOperations }}',
maintenanceConfig = '{{ maintenanceConfig }}',
nodeConfig = '{{ nodeConfig }}',
securityConfig = '{{ securityConfig }}',
nodeAccessConfig = '{{ nodeAccessConfig }}',
osEnvironmentConfig = '{{ osEnvironmentConfig }}',
binaryAuthorization = '{{ binaryAuthorization }}',
upgradePolicy = '{{ upgradePolicy }}'
WHERE
bareMetalClustersId = '{{ bareMetalClustersId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified bare_metal_clusters resource.

/*+ delete */
DELETE FROM google.gkeonprem.bare_metal_clusters
WHERE bareMetalClustersId = '{{ bareMetalClustersId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';