Skip to main content

kubernetes_clusters

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

Overview

Namekubernetes_clusters
TypeResource
Idazure.nexus.kubernetes_clusters

Fields

NameDatatypeDescription
aad_configurationtextfield from the properties object
administrator_configurationtextfield from the properties object
attached_network_idstextfield from the properties object
available_upgradestextfield from the properties object
cluster_idtextfield from the properties object
connected_cluster_idtextfield from the properties object
control_plane_kubernetes_versiontextfield from the properties object
control_plane_node_configurationtextfield from the properties object
detailed_statustextfield from the properties object
detailed_status_messagetextfield from the properties object
extended_locationtextfield from the properties object
feature_statusestextfield from the properties object
initial_agent_pool_configurationstextfield from the properties object
kubernetesClusterNametextfield from the properties object
kubernetes_versiontextfield from the properties object
locationtextThe geo-location where the resource lives
managed_resource_group_configurationtextfield from the properties object
network_configurationtextfield from the properties object
nodestextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.

Methods

NameAccessible byRequired ParamsDescription
getSELECTkubernetesClusterName, resourceGroupName, subscriptionIdGet properties of the provided the Kubernetes cluster.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdGet a list of Kubernetes clusters in the provided resource group.
list_by_subscriptionSELECTsubscriptionIdGet a list of Kubernetes clusters in the provided subscription.
create_or_updateINSERTkubernetesClusterName, resourceGroupName, subscriptionId, data__extendedLocation, data__propertiesCreate a new Kubernetes cluster or update the properties of the existing one.
deleteDELETEkubernetesClusterName, resourceGroupName, subscriptionIdDelete the provided Kubernetes cluster.
updateUPDATEkubernetesClusterName, resourceGroupName, subscriptionIdPatch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently.
restart_nodeEXECkubernetesClusterName, resourceGroupName, subscriptionId, data__nodeNameRestart a targeted node of a Kubernetes cluster.

SELECT examples

Get a list of Kubernetes clusters in the provided subscription.

SELECT
aad_configuration,
administrator_configuration,
attached_network_ids,
available_upgrades,
cluster_id,
connected_cluster_id,
control_plane_kubernetes_version,
control_plane_node_configuration,
detailed_status,
detailed_status_message,
extended_location,
feature_statuses,
initial_agent_pool_configurations,
kubernetesClusterName,
kubernetes_version,
location,
managed_resource_group_configuration,
network_configuration,
nodes,
provisioning_state,
resourceGroupName,
subscriptionId,
tags
FROM azure.nexus.vw_kubernetes_clusters
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.nexus.kubernetes_clusters (
kubernetesClusterName,
resourceGroupName,
subscriptionId,
data__extendedLocation,
data__properties,
extendedLocation,
properties,
tags,
location
)
SELECT
'{{ kubernetesClusterName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__extendedLocation }}',
'{{ data__properties }}',
'{{ extendedLocation }}',
'{{ properties }}',
'{{ tags }}',
'{{ location }}'
;

UPDATE example

Updates a kubernetes_clusters resource.

/*+ update */
UPDATE azure.nexus.kubernetes_clusters
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
kubernetesClusterName = '{{ kubernetesClusterName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified kubernetes_clusters resource.

/*+ delete */
DELETE FROM azure.nexus.kubernetes_clusters
WHERE kubernetesClusterName = '{{ kubernetesClusterName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';