Extensions - Create

Create a new Kubernetes Cluster Extension.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}?api-version=2023-05-01

URI Parameters

Name In Required Type Description
clusterName
path True

string

The name of the kubernetes cluster.

clusterResourceName
path True

string

The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.

clusterRp
path True

string

The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.

extensionName
path True

string

Name of the Extension.

resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

Request Body

Name Type Description
identity

Identity

Identity of the Extension resource

plan

Plan

The plan information.

properties.aksAssignedIdentity

AksAssignedIdentity

Identity of the Extension resource in an AKS cluster

properties.autoUpgradeMinorVersion

boolean

Flag to note if this extension participates in auto upgrade of minor version, or not.

properties.configurationProtectedSettings

object

Configuration settings that are sensitive, as name-value pairs for configuring this extension.

properties.configurationSettings

object

Configuration settings, as name-value pairs for configuring this extension.

properties.extensionType

string

Type of the Extension, of which this resource is an instance of. It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher.

properties.releaseTrain

string

ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'.

properties.scope

Scope

Scope at which the extension is installed.

properties.statuses

ExtensionStatus[]

Status from this extension.

properties.version

string

User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be 'false'.

Responses

Name Type Description
200 OK

Extension

Request received successfully for an existing resource.

201 Created

Extension

Request received successfully.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Create Extension
Create Extension with Plan

Create Extension

Sample request

PUT https://management.azure.com/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/ClusterMonitor?api-version=2023-05-01

{
  "properties": {
    "extensionType": "azuremonitor-containers",
    "autoUpgradeMinorVersion": true,
    "releaseTrain": "Preview",
    "scope": {
      "cluster": {
        "releaseNamespace": "kube-system"
      }
    },
    "configurationSettings": {
      "omsagent.secret.wsid": "fakeTokenPlaceholder",
      "omsagent.env.clusterName": "clusterName1"
    },
    "configurationProtectedSettings": {
      "omsagent.secret.key": "secretKeyValue01"
    }
  }
}

Sample response

Operation-Location: /subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/ClusterMonitor/operations/{operationId}
x-ms-async-operation-timeout: PT48H
Azure-AsyncOperation: http://management.azure.com/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Kubernetes/ConnectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/ClusterMonitor/operations/operationId?api-version=2023-05-01
{
  "id": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/ClusterMonitor",
  "type": "Microsoft.KubernetesConfiguration/extensions",
  "name": "ClusterMonitor",
  "systemData": {
    "createdBy": "string",
    "createdByType": "Application",
    "createdAt": "2021-09-08T05:10:57.027Z",
    "lastModifiedBy": "string",
    "lastModifiedByType": "Application",
    "lastModifiedAt": "2021-09-08T05:10:57.027Z"
  },
  "properties": {
    "extensionType": "azuremonitor-containers",
    "autoUpgradeMinorVersion": false,
    "releaseTrain": "Preview",
    "version": "0.1.4",
    "scope": {
      "cluster": {
        "releaseNamespace": "kube-system"
      }
    },
    "configurationSettings": {
      "omsagent.secret.wsid": "fakeTokenPlaceholder",
      "omsagent.env.clusterName": "clusterName1"
    },
    "provisioningState": "Creating",
    "currentVersion": null,
    "statuses": [],
    "isSystemExtension": false
  }
}
Operation-Location: /subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/ClusterMonitor/operations/{operationId}
x-ms-async-operation-timeout: PT48H
{
  "id": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/ClusterMonitor",
  "type": "Microsoft.KubernetesConfiguration/extensions",
  "name": "ClusterMonitor",
  "systemData": {
    "createdBy": "string",
    "createdByType": "Application",
    "createdAt": "2021-09-08T05:10:57.027Z",
    "lastModifiedBy": "string",
    "lastModifiedByType": "Application",
    "lastModifiedAt": "2021-09-08T05:10:57.027Z"
  },
  "properties": {
    "extensionType": "azuremonitor-containers",
    "autoUpgradeMinorVersion": false,
    "releaseTrain": "Preview",
    "version": "0.1.4",
    "scope": {
      "cluster": {
        "releaseNamespace": "kube-system"
      }
    },
    "configurationSettings": {
      "omsagent.secret.wsid": "fakeTokenPlaceholder",
      "omsagent.env.clusterName": "clusterName1"
    },
    "provisioningState": "Succeeded",
    "currentVersion": "0.1.4",
    "statuses": [],
    "isSystemExtension": false
  }
}

Create Extension with Plan

Sample request

PUT https://management.azure.com/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/azureVote?api-version=2023-05-01

{
  "properties": {
    "extensionType": "azure-vote",
    "autoUpgradeMinorVersion": true,
    "releaseTrain": "Preview"
  },
  "plan": {
    "name": "azure-vote-standard",
    "publisher": "Microsoft",
    "product": "azure-vote-standard-offer-id"
  }
}

Sample response

Operation-Location: /subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/azureVote/operations/{operationId}
x-ms-async-operation-timeout: PT48H
Azure-AsyncOperation: http://management.azure.com/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Kubernetes/ConnectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/azureVote/operations/operationId?api-version=2022-04-01-preview
{
  "id": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/azureVote",
  "type": "Microsoft.KubernetesConfiguration/extensions",
  "name": "azureVote",
  "systemData": {
    "createdBy": "string",
    "createdByType": "Application",
    "createdAt": "2021-09-08T05:10:57.027Z",
    "lastModifiedBy": "string",
    "lastModifiedByType": "Application",
    "lastModifiedAt": "2021-09-08T05:10:57.027Z"
  },
  "plan": {
    "name": "azure-vote-standard",
    "publisher": "Microsoft",
    "product": "azure-vote-standard-offer-id"
  },
  "properties": {
    "extensionType": "azure-vote",
    "autoUpgradeMinorVersion": true,
    "releaseTrain": "Preview",
    "version": "0.1.4",
    "scope": {
      "cluster": {
        "releaseNamespace": "kube-system"
      }
    },
    "provisioningState": "Creating",
    "statuses": [],
    "currentVersion": null,
    "isSystemExtension": false
  }
}
Operation-Location: /subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/azureVote/operations/{operationId}
x-ms-async-operation-timeout: PT48H
{
  "id": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/azureVote",
  "type": "Microsoft.KubernetesConfiguration/extensions",
  "name": "azureVote",
  "systemData": {
    "createdBy": "string",
    "createdByType": "Application",
    "createdAt": "2021-09-08T05:10:57.027Z",
    "lastModifiedBy": "string",
    "lastModifiedByType": "Application",
    "lastModifiedAt": "2021-09-08T05:10:57.027Z"
  },
  "plan": {
    "name": "azure-vote-standard",
    "publisher": "Microsoft",
    "product": "azure-vote-standard-offer-id"
  },
  "properties": {
    "extensionType": "azure-vote",
    "autoUpgradeMinorVersion": true,
    "releaseTrain": "Preview",
    "version": "0.1.4",
    "scope": {
      "cluster": {
        "releaseNamespace": "kube-system"
      }
    },
    "provisioningState": "Creating",
    "statuses": [],
    "currentVersion": "0.1.4",
    "isSystemExtension": false
  }
}

Definitions

Name Description
AksAssignedIdentity

Identity of the Extension resource in an AKS cluster

AKSIdentityType

The identity type.

createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

Extension

The Extension object.

ExtensionStatus

Status from the extension.

Identity

Identity for the resource.

LevelType

Level of the status.

Plan

Plan for the resource.

ProvisioningState

Status of installation of this extension.

ResourceIdentityType

The identity type.

Scope

Scope of the extension. It can be either Cluster or Namespace; but not both.

ScopeCluster

Specifies that the scope of the extension is Cluster

ScopeNamespace

Specifies that the scope of the extension is Namespace

systemData

Metadata pertaining to creation and last modification of the resource.

AksAssignedIdentity

Identity of the Extension resource in an AKS cluster

Name Type Description
principalId

string

The principal ID of resource identity.

tenantId

string

The tenant ID of resource.

type

AKSIdentityType

The identity type.

AKSIdentityType

The identity type.

Name Type Description
SystemAssigned

string

UserAssigned

string

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

Extension

The Extension object.

Name Type Default value Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

identity

Identity

Identity of the Extension resource

name

string

The name of the resource

plan

Plan

The plan information.

properties.aksAssignedIdentity

AksAssignedIdentity

Identity of the Extension resource in an AKS cluster

properties.autoUpgradeMinorVersion

boolean

True

Flag to note if this extension participates in auto upgrade of minor version, or not.

properties.configurationProtectedSettings

object

Configuration settings that are sensitive, as name-value pairs for configuring this extension.

properties.configurationSettings

object

Configuration settings, as name-value pairs for configuring this extension.

properties.currentVersion

string

Currently installed version of the extension.

properties.customLocationSettings

object

Custom Location settings properties.

properties.errorInfo

ErrorDetail

Error information from the Agent - e.g. errors during installation.

properties.extensionType

string

Type of the Extension, of which this resource is an instance of. It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher.

properties.isSystemExtension

boolean

False

Flag to note if this extension is a system extension

properties.packageUri

string

Uri of the Helm package

properties.provisioningState

ProvisioningState

Status of installation of this extension.

properties.releaseTrain

string

Stable

ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'.

properties.scope

Scope

Scope at which the extension is installed.

properties.statuses

ExtensionStatus[]

Status from this extension.

properties.version

string

User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be 'false'.

systemData

systemData

Top level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

ExtensionStatus

Status from the extension.

Name Type Default value Description
code

string

Status code provided by the Extension

displayStatus

string

Short description of status of the extension.

level

LevelType

Information

Level of the status.

message

string

Detailed message of the status from the Extension.

time

string

DateLiteral (per ISO8601) noting the time of installation status.

Identity

Identity for the resource.

Name Type Description
principalId

string

The principal ID of resource identity.

tenantId

string

The tenant ID of resource.

type

ResourceIdentityType

The identity type.

LevelType

Level of the status.

Name Type Description
Error

string

Information

string

Warning

string

Plan

Plan for the resource.

Name Type Description
name

string

A user defined name of the 3rd Party Artifact that is being procured.

product

string

The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding.

promotionCode

string

A publisher provided promotion code as provisioned in Data Market for the said product/artifact.

publisher

string

The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic

version

string

The version of the desired product/artifact.

ProvisioningState

Status of installation of this extension.

Name Type Description
Canceled

string

Creating

string

Deleting

string

Failed

string

Succeeded

string

Updating

string

ResourceIdentityType

The identity type.

Name Type Description
SystemAssigned

string

Scope

Scope of the extension. It can be either Cluster or Namespace; but not both.

Name Type Description
cluster

ScopeCluster

Specifies that the scope of the extension is Cluster

namespace

ScopeNamespace

Specifies that the scope of the extension is Namespace

ScopeCluster

Specifies that the scope of the extension is Cluster

Name Type Description
releaseNamespace

string

Namespace where the extension Release must be placed, for a Cluster scoped extension. If this namespace does not exist, it will be created

ScopeNamespace

Specifies that the scope of the extension is Namespace

Name Type Description
targetNamespace

string

Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it will be created

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.