kubernetes_clusters
Creates, updates, deletes, gets or lists a kubernetes_clusters resource.
Overview
| Name | kubernetes_clusters |
| Type | Resource |
| Id | azure_extras.network_cloud.kubernetes_clusters |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
- list_by_subscription
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
aadConfiguration | object | The Azure Active Directory Integration properties. |
administratorConfiguration | object | The administrative credentials that will be applied to the control plane and agent pool nodes that do not specify their own values. |
attachedNetworkIds | array | The full list of network resource IDs that are attached to this cluster, including those attached only to specific agent pools. |
availableUpgrades | array | The list of versions that this Kubernetes cluster can be upgraded to. |
clusterId | string | The resource ID of the Network Cloud cluster. |
connectedClusterId | string | The resource ID of the connected cluster set up when this Kubernetes cluster is created. |
controlPlaneKubernetesVersion | string | The current running version of Kubernetes on the control plane. |
controlPlaneNodeConfiguration | object | The defining characteristics of the control plane for this Kubernetes Cluster. Required. |
detailedStatus | string | The current status of the Kubernetes cluster. Known values are: "Available", "Error", and "Provisioning". (Available, Error, Provisioning) |
detailedStatusMessage | string | The descriptive message about the current detailed status. |
etag | string | "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."). |
extendedLocation | object | The extended location of the resource. This property is required when creating the resource. Required. |
featureStatuses | array | The current feature settings. |
initialAgentPoolConfigurations | array | The agent pools that are created with this Kubernetes cluster for running critical system services and workloads. This data in this field is only used during creation, and the field will be empty following the creation of the Kubernetes Cluster. After creation, the management of agent pools is done using the agentPools sub-resource. Required. |
kubernetesVersion | string | The Kubernetes version for this cluster. Required. |
location | string | The geo-location where the resource lives. Required. |
managedResourceGroupConfiguration | object | The configuration of the managed resource group associated with the resource. |
networkConfiguration | object | The configuration of the Kubernetes cluster networking, including the attachment of networks that span the cluster. Required. |
nodes | array | The details of the nodes in this cluster. |
provisioningState | string | The provisioning state of the Kubernetes cluster resource. Known values are: "Succeeded", "Failed", "Canceled", "Accepted", "InProgress", "Created", "Updating", and "Deleting". (Succeeded, Failed, Canceled, Accepted, InProgress, Created, Updating, Deleting) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
aadConfiguration | object | The Azure Active Directory Integration properties. |
administratorConfiguration | object | The administrative credentials that will be applied to the control plane and agent pool nodes that do not specify their own values. |
attachedNetworkIds | array | The full list of network resource IDs that are attached to this cluster, including those attached only to specific agent pools. |
availableUpgrades | array | The list of versions that this Kubernetes cluster can be upgraded to. |
clusterId | string | The resource ID of the Network Cloud cluster. |
connectedClusterId | string | The resource ID of the connected cluster set up when this Kubernetes cluster is created. |
controlPlaneKubernetesVersion | string | The current running version of Kubernetes on the control plane. |
controlPlaneNodeConfiguration | object | The defining characteristics of the control plane for this Kubernetes Cluster. Required. |
detailedStatus | string | The current status of the Kubernetes cluster. Known values are: "Available", "Error", and "Provisioning". (Available, Error, Provisioning) |
detailedStatusMessage | string | The descriptive message about the current detailed status. |
etag | string | "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."). |
extendedLocation | object | The extended location of the resource. This property is required when creating the resource. Required. |
featureStatuses | array | The current feature settings. |
initialAgentPoolConfigurations | array | The agent pools that are created with this Kubernetes cluster for running critical system services and workloads. This data in this field is only used during creation, and the field will be empty following the creation of the Kubernetes Cluster. After creation, the management of agent pools is done using the agentPools sub-resource. Required. |
kubernetesVersion | string | The Kubernetes version for this cluster. Required. |
location | string | The geo-location where the resource lives. Required. |
managedResourceGroupConfiguration | object | The configuration of the managed resource group associated with the resource. |
networkConfiguration | object | The configuration of the Kubernetes cluster networking, including the attachment of networks that span the cluster. Required. |
nodes | array | The details of the nodes in this cluster. |
provisioningState | string | The provisioning state of the Kubernetes cluster resource. Known values are: "Succeeded", "Failed", "Canceled", "Accepted", "InProgress", "Created", "Updating", and "Deleting". (Succeeded, Failed, Canceled, Accepted, InProgress, Created, Updating, Deleting) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
aadConfiguration | object | The Azure Active Directory Integration properties. |
administratorConfiguration | object | The administrative credentials that will be applied to the control plane and agent pool nodes that do not specify their own values. |
attachedNetworkIds | array | The full list of network resource IDs that are attached to this cluster, including those attached only to specific agent pools. |
availableUpgrades | array | The list of versions that this Kubernetes cluster can be upgraded to. |
clusterId | string | The resource ID of the Network Cloud cluster. |
connectedClusterId | string | The resource ID of the connected cluster set up when this Kubernetes cluster is created. |
controlPlaneKubernetesVersion | string | The current running version of Kubernetes on the control plane. |
controlPlaneNodeConfiguration | object | The defining characteristics of the control plane for this Kubernetes Cluster. Required. |
detailedStatus | string | The current status of the Kubernetes cluster. Known values are: "Available", "Error", and "Provisioning". (Available, Error, Provisioning) |
detailedStatusMessage | string | The descriptive message about the current detailed status. |
etag | string | "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."). |
extendedLocation | object | The extended location of the resource. This property is required when creating the resource. Required. |
featureStatuses | array | The current feature settings. |
initialAgentPoolConfigurations | array | The agent pools that are created with this Kubernetes cluster for running critical system services and workloads. This data in this field is only used during creation, and the field will be empty following the creation of the Kubernetes Cluster. After creation, the management of agent pools is done using the agentPools sub-resource. Required. |
kubernetesVersion | string | The Kubernetes version for this cluster. Required. |
location | string | The geo-location where the resource lives. Required. |
managedResourceGroupConfiguration | object | The configuration of the managed resource group associated with the resource. |
networkConfiguration | object | The configuration of the Kubernetes cluster networking, including the attachment of networks that span the cluster. Required. |
nodes | array | The details of the nodes in this cluster. |
provisioningState | string | The provisioning state of the Kubernetes cluster resource. Known values are: "Succeeded", "Failed", "Canceled", "Accepted", "InProgress", "Created", "Updating", and "Deleting". (Succeeded, Failed, Canceled, Accepted, InProgress, Created, Updating, Deleting) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, kubernetes_cluster_name, subscription_id | Get properties of the provided the Kubernetes cluster. | |
list_by_resource_group | select | resource_group_name, subscription_id | $top, $skipToken | Get a list of Kubernetes clusters in the provided resource group. |
list_by_subscription | select | subscription_id | $top, $skipToken | Get a list of Kubernetes clusters in the provided subscription. |
create_or_update | insert | resource_group_name, kubernetes_cluster_name, subscription_id, location, properties, extendedLocation | Create a new Kubernetes cluster or update the properties of the existing one. | |
update | update | resource_group_name, kubernetes_cluster_name, subscription_id | 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. | |
create_or_update | replace | resource_group_name, kubernetes_cluster_name, subscription_id, location, properties, extendedLocation | Create a new Kubernetes cluster or update the properties of the existing one. | |
delete | delete | resource_group_name, kubernetes_cluster_name, subscription_id | Delete the provided Kubernetes cluster. | |
restart_node | exec | resource_group_name, kubernetes_cluster_name, subscription_id, nodeName | Restart 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.
| Name | Datatype | Description |
|---|---|---|
kubernetes_cluster_name | string | The name of the Kubernetes cluster. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
$skipToken | string | The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. Default value is None. |
$top | integer | The maximum number of resources to return from the operation. Example: '$top=10'. Default value is None. |
SELECT examples
- get
- list_by_resource_group
- list_by_subscription
Get properties of the provided the Kubernetes cluster.
SELECT
id,
name,
aadConfiguration,
administratorConfiguration,
attachedNetworkIds,
availableUpgrades,
clusterId,
connectedClusterId,
controlPlaneKubernetesVersion,
controlPlaneNodeConfiguration,
detailedStatus,
detailedStatusMessage,
etag,
extendedLocation,
featureStatuses,
initialAgentPoolConfigurations,
kubernetesVersion,
location,
managedResourceGroupConfiguration,
networkConfiguration,
nodes,
provisioningState,
systemData,
tags,
type
FROM azure_extras.network_cloud.kubernetes_clusters
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND kubernetes_cluster_name = '{{ kubernetes_cluster_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Get a list of Kubernetes clusters in the provided resource group.
SELECT
id,
name,
aadConfiguration,
administratorConfiguration,
attachedNetworkIds,
availableUpgrades,
clusterId,
connectedClusterId,
controlPlaneKubernetesVersion,
controlPlaneNodeConfiguration,
detailedStatus,
detailedStatusMessage,
etag,
extendedLocation,
featureStatuses,
initialAgentPoolConfigurations,
kubernetesVersion,
location,
managedResourceGroupConfiguration,
networkConfiguration,
nodes,
provisioningState,
systemData,
tags,
type
FROM azure_extras.network_cloud.kubernetes_clusters
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $top = '{{ $top }}'
AND $skipToken = '{{ $skipToken }}'
;
Get a list of Kubernetes clusters in the provided subscription.
SELECT
id,
name,
aadConfiguration,
administratorConfiguration,
attachedNetworkIds,
availableUpgrades,
clusterId,
connectedClusterId,
controlPlaneKubernetesVersion,
controlPlaneNodeConfiguration,
detailedStatus,
detailedStatusMessage,
etag,
extendedLocation,
featureStatuses,
initialAgentPoolConfigurations,
kubernetesVersion,
location,
managedResourceGroupConfiguration,
networkConfiguration,
nodes,
provisioningState,
systemData,
tags,
type
FROM azure_extras.network_cloud.kubernetes_clusters
WHERE subscription_id = '{{ subscription_id }}' -- required
AND $top = '{{ $top }}'
AND $skipToken = '{{ $skipToken }}'
;
INSERT examples
- create_or_update
- Manifest
Create a new Kubernetes cluster or update the properties of the existing one.
INSERT INTO azure_extras.network_cloud.kubernetes_clusters (
tags,
location,
properties,
extendedLocation,
resource_group_name,
kubernetes_cluster_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}' /* required */,
'{{ extendedLocation }}' /* required */,
'{{ resource_group_name }}',
'{{ kubernetes_cluster_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
extendedLocation,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: kubernetes_clusters
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the kubernetes_clusters resource.
- name: kubernetes_cluster_name
value: "{{ kubernetes_cluster_name }}"
description: Required parameter for the kubernetes_clusters resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the kubernetes_clusters resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
description: |
The list of the resource properties. Required.
value:
aadConfiguration:
adminGroupObjectIds:
- "{{ adminGroupObjectIds }}"
administratorConfiguration:
adminUsername: "{{ adminUsername }}"
sshPublicKeys:
- keyData: "{{ keyData }}"
controlPlaneNodeConfiguration:
administratorConfiguration:
adminUsername: "{{ adminUsername }}"
sshPublicKeys:
- keyData: "{{ keyData }}"
availabilityZones:
- "{{ availabilityZones }}"
count: {{ count }}
vmSkuName: "{{ vmSkuName }}"
initialAgentPoolConfigurations:
- administratorConfiguration:
adminUsername: "{{ adminUsername }}"
sshPublicKeys:
- keyData: "{{ keyData }}"
agentOptions:
hugepagesCount: {{ hugepagesCount }}
hugepagesSize: "{{ hugepagesSize }}"
attachedNetworkConfiguration:
l2Networks:
- networkId: "{{ networkId }}"
pluginType: "{{ pluginType }}"
l3Networks:
- ipamEnabled: "{{ ipamEnabled }}"
networkId: "{{ networkId }}"
pluginType: "{{ pluginType }}"
trunkedNetworks:
- networkId: "{{ networkId }}"
pluginType: "{{ pluginType }}"
availabilityZones: "{{ availabilityZones }}"
count: {{ count }}
labels: "{{ labels }}"
mode: "{{ mode }}"
taints: "{{ taints }}"
upgradeSettings:
drainTimeout: {{ drainTimeout }}
maxSurge: "{{ maxSurge }}"
maxUnavailable: "{{ maxUnavailable }}"
vmSkuName: "{{ vmSkuName }}"
name: "{{ name }}"
kubernetesVersion: "{{ kubernetesVersion }}"
managedResourceGroupConfiguration:
location: "{{ location }}"
name: "{{ name }}"
networkConfiguration:
attachedNetworkConfiguration:
l2Networks:
- networkId: "{{ networkId }}"
pluginType: "{{ pluginType }}"
l3Networks:
- ipamEnabled: "{{ ipamEnabled }}"
networkId: "{{ networkId }}"
pluginType: "{{ pluginType }}"
trunkedNetworks:
- networkId: "{{ networkId }}"
pluginType: "{{ pluginType }}"
bgpServiceLoadBalancerConfiguration:
bgpAdvertisements:
- advertiseToFabric: "{{ advertiseToFabric }}"
communities: "{{ communities }}"
ipAddressPools: "{{ ipAddressPools }}"
peers: "{{ peers }}"
bgpPeers:
- bfdEnabled: "{{ bfdEnabled }}"
bgpMultiHop: "{{ bgpMultiHop }}"
holdTime: "{{ holdTime }}"
keepAliveTime: "{{ keepAliveTime }}"
myAsn: {{ myAsn }}
name: "{{ name }}"
password: "{{ password }}"
peerAddress: "{{ peerAddress }}"
peerAsn: {{ peerAsn }}
peerPort: {{ peerPort }}
fabricPeeringEnabled: "{{ fabricPeeringEnabled }}"
ipAddressPools:
- addresses: "{{ addresses }}"
autoAssign: "{{ autoAssign }}"
name: "{{ name }}"
onlyUseHostIps: "{{ onlyUseHostIps }}"
cloudServicesNetworkId: "{{ cloudServicesNetworkId }}"
cniNetworkId: "{{ cniNetworkId }}"
dnsServiceIp: "{{ dnsServiceIp }}"
l2ServiceLoadBalancerConfiguration:
ipAddressPools:
- addresses: "{{ addresses }}"
autoAssign: "{{ autoAssign }}"
name: "{{ name }}"
onlyUseHostIps: "{{ onlyUseHostIps }}"
podCidrs:
- "{{ podCidrs }}"
serviceCidrs:
- "{{ serviceCidrs }}"
attachedNetworkIds:
- "{{ attachedNetworkIds }}"
availableUpgrades:
- availabilityLifecycle: "{{ availabilityLifecycle }}"
version: "{{ version }}"
clusterId: "{{ clusterId }}"
connectedClusterId: "{{ connectedClusterId }}"
controlPlaneKubernetesVersion: "{{ controlPlaneKubernetesVersion }}"
detailedStatus: "{{ detailedStatus }}"
detailedStatusMessage: "{{ detailedStatusMessage }}"
featureStatuses:
- detailedStatus: "{{ detailedStatus }}"
detailedStatusMessage: "{{ detailedStatusMessage }}"
name: "{{ name }}"
version: "{{ version }}"
nodes:
- agentPoolId: "{{ agentPoolId }}"
availabilityZone: "{{ availabilityZone }}"
bareMetalMachineId: "{{ bareMetalMachineId }}"
cpuCores: {{ cpuCores }}
detailedStatus: "{{ detailedStatus }}"
detailedStatusMessage: "{{ detailedStatusMessage }}"
diskSizeGB: {{ diskSizeGB }}
image: "{{ image }}"
kubernetesVersion: "{{ kubernetesVersion }}"
labels: "{{ labels }}"
memorySizeGB: {{ memorySizeGB }}
mode: "{{ mode }}"
name: "{{ name }}"
networkAttachments: "{{ networkAttachments }}"
powerState: "{{ powerState }}"
role: "{{ role }}"
taints: "{{ taints }}"
vmSkuName: "{{ vmSkuName }}"
provisioningState: "{{ provisioningState }}"
- name: extendedLocation
description: |
The extended location of the resource. This property is required when creating the resource. Required.
value:
name: "{{ name }}"
type: "{{ type }}"
UPDATE examples
- update
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_extras.network_cloud.kubernetes_clusters
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND kubernetes_cluster_name = '{{ kubernetes_cluster_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
extendedLocation,
location,
properties,
systemData,
tags,
type;
REPLACE examples
- create_or_update
Create a new Kubernetes cluster or update the properties of the existing one.
REPLACE azure_extras.network_cloud.kubernetes_clusters
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
extendedLocation = '{{ extendedLocation }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND kubernetes_cluster_name = '{{ kubernetes_cluster_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
AND properties = '{{ properties }}' --required
AND extendedLocation = '{{ extendedLocation }}' --required
RETURNING
id,
name,
etag,
extendedLocation,
location,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Delete the provided Kubernetes cluster.
DELETE FROM azure_extras.network_cloud.kubernetes_clusters
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND kubernetes_cluster_name = '{{ kubernetes_cluster_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- restart_node
Restart a targeted node of a Kubernetes cluster.
EXEC azure_extras.network_cloud.kubernetes_clusters.restart_node
@resource_group_name='{{ resource_group_name }}' --required,
@kubernetes_cluster_name='{{ kubernetes_cluster_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"nodeName": "{{ nodeName }}"
}'
;