bare_metal_clusters
Creates, updates, deletes, gets or lists a bare_metal_clusters
resource.
Overview
Name | bare_metal_clusters |
Type | Resource |
Id | google.gkeonprem.bare_metal_clusters |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_bare_metal_clusters_get
- projects_locations_bare_metal_clusters_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Immutable. The bare metal user cluster resource name. |
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. |
adminClusterName | string | Output only. The resource name of the bare metal admin cluster managing this user cluster. |
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. |
bareMetalVersion | string | Required. The Anthos clusters on bare metal version for your user cluster. |
binaryAuthorization | object | Binary Authorization related configurations. (id: BinaryAuthorization) |
clusterOperations | object | Cluster operations configuration. (id: BareMetalClusterOperationsConfig) |
controlPlane | object | Required. Control plane configuration. (id: BareMetalControlPlaneConfig) |
createTime | string (google-datetime) | Output only. The time when the bare metal user cluster was created. |
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 |
description | string | A human readable description of this bare metal user cluster. |
endpoint | string | Output only. The IP address of the bare metal user cluster's API server. |
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. |
fleet | object | Output only. Fleet configuration for the cluster. (id: Fleet) |
loadBalancer | object | Required. Load balancer configuration. (id: BareMetalLoadBalancerConfig) |
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. |
maintenanceConfig | object | Maintenance configuration. (id: BareMetalMaintenanceConfig) |
maintenanceStatus | object | Output only. Status of on-going maintenance tasks. (id: BareMetalMaintenanceStatus) |
networkConfig | object | Required. Network configuration. (id: BareMetalNetworkConfig) |
nodeAccessConfig | object | Node access related configurations. (id: BareMetalNodeAccessConfig) |
nodeConfig | object | Workload node configuration. (id: BareMetalWorkloadNodeConfig) |
osEnvironmentConfig | object | OS environment related configurations. (id: BareMetalOsEnvironmentConfig) |
proxy | object | Proxy configuration. (id: BareMetalProxyConfig) |
reconciling | boolean | Output only. If set, there are currently changes in flight to the bare metal user cluster. |
securityConfig | object | Security related setting configuration. (id: BareMetalSecurityConfig) |
state | string | Output only. The current state of the bare metal user cluster. |
status | object | Output only. Detailed cluster status. (id: ResourceStatus) |
storage | object | Required. Storage configuration. (id: BareMetalStorageConfig) |
uid | string | Output only. The unique identifier of the bare metal user cluster. |
updateTime | string (google-datetime) | Output only. The time when the bare metal user cluster was last updated. |
upgradePolicy | object | The cluster upgrade policy. (id: BareMetalClusterUpgradePolicy) |
validationCheck | object | Output only. The result of the preflight check. (id: ValidationCheck) |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Immutable. The bare metal user cluster resource name. |
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. |
adminClusterName | string | Output only. The resource name of the bare metal admin cluster managing this user cluster. |
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. |
bareMetalVersion | string | Required. The Anthos clusters on bare metal version for your user cluster. |
binaryAuthorization | object | Binary Authorization related configurations. (id: BinaryAuthorization) |
clusterOperations | object | Cluster operations configuration. (id: BareMetalClusterOperationsConfig) |
controlPlane | object | Required. Control plane configuration. (id: BareMetalControlPlaneConfig) |
createTime | string (google-datetime) | Output only. The time when the bare metal user cluster was created. |
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 |
description | string | A human readable description of this bare metal user cluster. |
endpoint | string | Output only. The IP address of the bare metal user cluster's API server. |
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. |
fleet | object | Output only. Fleet configuration for the cluster. (id: Fleet) |
loadBalancer | object | Required. Load balancer configuration. (id: BareMetalLoadBalancerConfig) |
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. |
maintenanceConfig | object | Maintenance configuration. (id: BareMetalMaintenanceConfig) |
maintenanceStatus | object | Output only. Status of on-going maintenance tasks. (id: BareMetalMaintenanceStatus) |
networkConfig | object | Required. Network configuration. (id: BareMetalNetworkConfig) |
nodeAccessConfig | object | Node access related configurations. (id: BareMetalNodeAccessConfig) |
nodeConfig | object | Workload node configuration. (id: BareMetalWorkloadNodeConfig) |
osEnvironmentConfig | object | OS environment related configurations. (id: BareMetalOsEnvironmentConfig) |
proxy | object | Proxy configuration. (id: BareMetalProxyConfig) |
reconciling | boolean | Output only. If set, there are currently changes in flight to the bare metal user cluster. |
securityConfig | object | Security related setting configuration. (id: BareMetalSecurityConfig) |
state | string | Output only. The current state of the bare metal user cluster. |
status | object | Output only. Detailed cluster status. (id: ResourceStatus) |
storage | object | Required. Storage configuration. (id: BareMetalStorageConfig) |
uid | string | Output only. The unique identifier of the bare metal user cluster. |
updateTime | string (google-datetime) | Output only. The time when the bare metal user cluster was last updated. |
upgradePolicy | object | The cluster upgrade policy. (id: BareMetalClusterUpgradePolicy) |
validationCheck | object | Output only. The result of the preflight check. (id: ValidationCheck) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_bare_metal_clusters_get | select | projectsId , locationsId , bareMetalClustersId | view , allowMissing | Gets details of a single bare metal Cluster. |
projects_locations_bare_metal_clusters_list | select | projectsId , locationsId | pageSize , pageToken , filter , view , allowMissing | Lists bare metal clusters in a given project and location. |
projects_locations_bare_metal_clusters_create | insert | projectsId , locationsId | bareMetalClusterId , validateOnly , allowPreflightFailure | Creates a new bare metal cluster in a given project and location. |
projects_locations_bare_metal_clusters_patch | update | projectsId , locationsId , bareMetalClustersId | updateMask , allowMissing , validateOnly | Updates the parameters of a single bare metal Cluster. |
projects_locations_bare_metal_clusters_delete | delete | projectsId , locationsId , bareMetalClustersId | etag , allowMissing , validateOnly , force , ignoreErrors | Deletes a single bare metal Cluster. |
projects_locations_bare_metal_clusters_enroll | exec | projectsId , locationsId | 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. | |
projects_locations_bare_metal_clusters_unenroll | exec | projectsId , locationsId , bareMetalClustersId | etag , allowMissing , validateOnly , force | Unenrolls 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_config | exec | projectsId , locationsId | createConfig.adminClusterMembership , createConfig.adminClusterName , upgradeConfig.clusterName | Queries 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.
Name | Datatype | Description |
---|---|---|
bareMetalClustersId | string | |
locationsId | string | |
projectsId | string | |
allowMissing | boolean | |
allowPreflightFailure | boolean | |
bareMetalClusterId | string | |
createConfig.adminClusterMembership | string | |
createConfig.adminClusterName | string | |
etag | string | |
filter | string | |
force | boolean | |
ignoreErrors | boolean | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) | |
upgradeConfig.clusterName | string | |
validateOnly | boolean | |
view | string |
SELECT
examples
- projects_locations_bare_metal_clusters_get
- projects_locations_bare_metal_clusters_list
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 }}';
Lists bare metal clusters in a given project and location.
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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND view = '{{ view }}'
AND allowMissing = '{{ allowMissing }}';
INSERT
examples
- projects_locations_bare_metal_clusters_create
- Manifest
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
;
# Description fields are for documentation purposes
- name: bare_metal_clusters
props:
- name: projectsId
value: string
description: Required parameter for the bare_metal_clusters resource.
- name: locationsId
value: string
description: Required parameter for the bare_metal_clusters resource.
- name: name
value: string
description: >
Immutable. The bare metal user cluster resource name.
- name: adminClusterMembership
value: string
description: >
Required. The admin cluster this bare metal user cluster belongs to. This is the full resource name of the admin cluster's fleet membership.
- name: description
value: string
description: >
A human readable description of this bare metal user cluster.
- name: bareMetalVersion
value: string
description: >
Required. The Anthos clusters on bare metal version for your user cluster.
- name: annotations
value: object
description: >
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.
- name: networkConfig
value: object
description: >
Required. Network configuration.
- name: controlPlane
value: object
description: >
Required. Control plane configuration.
- name: loadBalancer
value: object
description: >
Required. Load balancer configuration.
- name: storage
value: object
description: >
Required. Storage configuration.
- name: proxy
value: object
description: >
Proxy configuration.
- name: clusterOperations
value: object
description: >
Cluster operations configuration.
- name: maintenanceConfig
value: object
description: >
Maintenance configuration.
- name: nodeConfig
value: object
description: >
Workload node configuration.
- name: securityConfig
value: object
description: >
Security related setting configuration.
- name: nodeAccessConfig
value: object
description: >
Node access related configurations.
- name: osEnvironmentConfig
value: object
description: >
OS environment related configurations.
- name: binaryAuthorization
value: object
description: >
Binary Authorization related configurations.
- name: upgradePolicy
value: object
description: >
The cluster upgrade policy.
- name: bareMetalClusterId
value: string
- name: validateOnly
value: boolean
- name: allowPreflightFailure
value: boolean
UPDATE
examples
- projects_locations_bare_metal_clusters_patch
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
- projects_locations_bare_metal_clusters_delete
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
- projects_locations_bare_metal_clusters_enroll
- projects_locations_bare_metal_clusters_unenroll
- projects_locations_bare_metal_clusters_query_version_config
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 }}"
}';
Unenrolls 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.
EXEC google.gkeonprem.bare_metal_clusters.projects_locations_bare_metal_clusters_unenroll
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@bareMetalClustersId='{{ bareMetalClustersId }}' --required,
@etag='{{ etag }}',
@allowMissing={{ allowMissing }},
@validateOnly={{ validateOnly }},
@force={{ force }};
Queries the bare metal user cluster version config.
EXEC google.gkeonprem.bare_metal_clusters.projects_locations_bare_metal_clusters_query_version_config
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@createConfig.adminClusterMembership='{{ createConfig.adminClusterMembership }}',
@createConfig.adminClusterName='{{ createConfig.adminClusterName }}',
@upgradeConfig.clusterName='{{ upgradeConfig.clusterName }}';