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

The following fields are returned by SELECT queries:

The resource has been successfully retrieved.

NameDatatypeDescription
extendedLocationobjectThe extended location of the cluster associated with the resource. (title: ExtendedLocation represents the Azure custom location where the resource will be created.)
locationstringThe geo-location where the resource lives
propertiesobjectThe list of the resource properties. (title: KubernetesClusterProperties represents the properties of Kubernetes cluster resource.)
tagsobjectResource tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, kubernetesClusterNameGet properties of the provided the Kubernetes cluster.
list_by_resource_groupselectsubscriptionId, resourceGroupNameGet a list of Kubernetes clusters in the provided resource group.
list_by_subscriptionselectsubscriptionIdGet a list of Kubernetes clusters in the provided subscription.
create_or_updateinsertsubscriptionId, resourceGroupName, kubernetesClusterName, data__extendedLocation, data__propertiesCreate a new Kubernetes cluster or update the properties of the existing one.
updateupdatesubscriptionId, resourceGroupName, kubernetesClusterNamePatch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently.
deletedeletesubscriptionId, resourceGroupName, kubernetesClusterNameDelete the provided Kubernetes cluster.
restart_nodeexecsubscriptionId, resourceGroupName, kubernetesClusterName, nodeNameRestart a targeted node of a Kubernetes cluster.

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
kubernetesClusterNamestringThe name of the Kubernetes cluster.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.

SELECT examples

Get properties of the provided the Kubernetes cluster.

SELECT
extendedLocation,
location,
properties,
tags
FROM azure.nexus.kubernetes_clusters
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND kubernetesClusterName = '{{ kubernetesClusterName }}' -- required
;

INSERT examples

Create a new Kubernetes cluster or update the properties of the existing one.

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

UPDATE examples

Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently.

UPDATE azure.nexus.kubernetes_clusters
SET
data__properties = '{{ properties }}',
data__tags = '{{ tags }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND kubernetesClusterName = '{{ kubernetesClusterName }}' --required
RETURNING
extendedLocation,
location,
properties,
tags;

DELETE examples

Delete the provided Kubernetes cluster.

DELETE FROM azure.nexus.kubernetes_clusters
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND kubernetesClusterName = '{{ kubernetesClusterName }}' --required
;

Lifecycle Methods

Restart a targeted node of a Kubernetes cluster.

EXEC azure.nexus.kubernetes_clusters.restart_node 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@kubernetesClusterName='{{ kubernetesClusterName }}' --required
@@json=
'{
"nodeName": "{{ nodeName }}"
}'
;