Skip to main content

bare_metal_admin_clusters

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

Overview

Namebare_metal_admin_clusters
TypeResource
Idgoogle.gkeonprem.bare_metal_admin_clusters

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringImmutable. The bare metal admin cluster resource name.
annotationsobjectAnnotations 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.
bareMetalVersionstringThe Anthos clusters on bare metal version for the bare metal admin cluster.
binaryAuthorizationobjectBinary Authorization related configurations. (id: BinaryAuthorization)
clusterOperationsobjectCluster operations configuration. (id: BareMetalAdminClusterOperationsConfig)
controlPlaneobjectControl plane configuration. (id: BareMetalAdminControlPlaneConfig)
createTimestring (google-datetime)Output only. The time at which this bare metal admin cluster was created.
deleteTimestring (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
descriptionstringA human readable description of this bare metal admin cluster.
endpointstringOutput only. The IP address name of bare metal admin cluster's API server.
etagstringThis 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)
loadBalancerobjectLoad balancer configuration. (id: BareMetalAdminLoadBalancerConfig)
localNamestringOutput 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.
maintenanceConfigobjectMaintenance configuration. (id: BareMetalAdminMaintenanceConfig)
maintenanceStatusobjectOutput only. MaintenanceStatus representing state of maintenance. (id: BareMetalAdminMaintenanceStatus)
networkConfigobjectNetwork configuration. (id: BareMetalAdminNetworkConfig)
nodeAccessConfigobjectNode access related configurations. (id: BareMetalAdminNodeAccessConfig)
nodeConfigobjectWorkload node configuration. (id: BareMetalAdminWorkloadNodeConfig)
osEnvironmentConfigobjectOS environment related configurations. (id: BareMetalAdminOsEnvironmentConfig)
proxyobjectProxy configuration. (id: BareMetalAdminProxyConfig)
reconcilingbooleanOutput only. If set, there are currently changes in flight to the bare metal Admin Cluster.
securityConfigobjectSecurity related configuration. (id: BareMetalAdminSecurityConfig)
statestringOutput only. The current state of the bare metal admin cluster.
statusobjectOutput only. ResourceStatus representing detailed cluster status. (id: ResourceStatus)
storageobjectStorage configuration. (id: BareMetalAdminStorageConfig)
uidstringOutput only. The unique identifier of the bare metal admin cluster.
updateTimestring (google-datetime)Output only. The time at which this bare metal admin cluster was last updated.
validationCheckobjectOutput only. ValidationCheck representing 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_admin_clusters_getselectprojectsId, locationsId, bareMetalAdminClustersIdview, allowMissingGets details of a single bare metal admin cluster.
projects_locations_bare_metal_admin_clusters_listselectprojectsId, locationsIdpageSize, pageToken, view, allowMissingLists bare metal admin clusters in a given project and location.
projects_locations_bare_metal_admin_clusters_createinsertprojectsId, locationsIdbareMetalAdminClusterId, validateOnly, allowPreflightFailureCreates 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
projects_locations_bare_metal_admin_clusters_patchupdateprojectsId, locationsId, bareMetalAdminClustersIdupdateMask, validateOnlyUpdates the parameters of a single bare metal admin cluster.
projects_locations_bare_metal_admin_clusters_enrollexecprojectsId, locationsIdEnrolls an existing bare metal admin cluster to the Anthos On-Prem API within a given project and location. Through enrollment, an existing admin cluster will become Anthos On-Prem API managed. The corresponding GCP resources will be created and all future modifications to the cluster will be expected to be performed through the API.
projects_locations_bare_metal_admin_clusters_unenrollexecprojectsId, locationsId, bareMetalAdminClustersIdetag, allowMissing, validateOnly, ignoreErrorsUnenrolls an existing bare metal admin cluster 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 will continue to run; however, they will no longer be accessible through the Anthos On-Prem API or its clients.
projects_locations_bare_metal_admin_clusters_query_version_configexecprojectsId, locationsIdupgradeConfig.clusterNameQueries the bare metal admin 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
bareMetalAdminClustersIdstring
locationsIdstring
projectsIdstring
allowMissingboolean
allowPreflightFailureboolean
bareMetalAdminClusterIdstring
etagstring
ignoreErrorsboolean
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)
upgradeConfig.clusterNamestring
validateOnlyboolean
viewstring

SELECT examples

Gets details of a single bare metal admin cluster.

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

INSERT examples

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

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

UPDATE examples

Updates the parameters of a single bare metal admin cluster.

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

Lifecycle Methods

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

EXEC google.gkeonprem.bare_metal_admin_clusters.projects_locations_bare_metal_admin_clusters_enroll 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required
@@json=
'{
"bareMetalAdminClusterId": "{{ bareMetalAdminClusterId }}",
"membership": "{{ membership }}"
}';