共用方式為


Kube Environments - Create Or Update

建立或更新 Kubernetes 環境的說明。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}?api-version=2025-05-01

URI 參數

名稱 位於 必要 類型 Description
name
path True

string

Kubernetes 環境的名稱。

resourceGroupName
path True

string

minLength: 1
maxLength: 90

資源群組的名稱。 名稱不區分大小寫。

subscriptionId
path True

string (uuid)

目標訂用帳戶的標識碼。 此值必須是 UUID。

api-version
query True

string

minLength: 1

用於此作業的 API 版本。

要求本文

名稱 必要 類型 Description
location True

string

資源所在的地理位置

extendedLocation

ExtendedLocation

擴充位置。

kind

string

資源種類。

properties.aksResourceID

string

properties.appLogsConfiguration

AppLogsConfiguration

叢集組態,可讓記錄常駐程式將應用程式記錄匯出至目的地。 目前僅支援「log-analytics」

properties.arcConfiguration

ArcConfiguration

決定 ARC 叢集元件類型的叢集組態。 例如:在 BuildService 種類、前端服務成品 StorageType 等之間進行選擇。

properties.containerAppsConfiguration

ContainerAppsConfiguration

容器應用程式環境的叢集設定,以設定 Dapr 檢測金鑰和 VNET 組態

properties.environmentType

string

Kubernetes Environment 的類型。 僅支援容器應用程式環境,其值為受控

properties.internalLoadBalancerEnabled

boolean

只有在 Vnet/子網內才顯示

properties.staticIp

string

KubeEnvironment 的靜態 IP

tags

object

資源標籤。

回應

名稱 類型 Description
200 OK

KubeEnvironment

資源「KubeEnvironment」更新操作成功

201 Created

KubeEnvironment

資源「KubeEnvironment」創建作業成功

標題

  • Location: string
  • Retry-After: integer
Other Status Codes

DefaultErrorResponse

未預期的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

Create kube environments

範例要求

PUT https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.Web/kubeEnvironments/testkubeenv?api-version=2025-05-01

{
  "location": "East US",
  "properties": {
    "staticIp": "1.2.3.4"
  }
}

範例回覆

{
  "name": "testkubeenv",
  "type": "Microsoft.Web/kubeEnvironments",
  "extendedLocation": {
    "name": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation",
    "type": "customLocation"
  },
  "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.Web/kubeEnvironments/testkubeenv",
  "location": "East US",
  "properties": {
    "aksResourceID": "test",
    "appLogsConfiguration": null,
    "arcConfiguration": null,
    "defaultDomain": "testkubeenv.k4apps.io",
    "deploymentErrors": null,
    "internalLoadBalancerEnabled": false,
    "provisioningState": "Succeeded",
    "staticIp": "1.2.3.4"
  },
  "tags": {}
}
{
  "name": "testkubeenv",
  "type": "Microsoft.Web/kubeEnvironments",
  "extendedLocation": {
    "name": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation",
    "type": "customLocation"
  },
  "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.Web/kubeEnvironments/testkubeenv",
  "location": "East US",
  "properties": {
    "aksResourceID": "test",
    "appLogsConfiguration": null,
    "arcConfiguration": null,
    "defaultDomain": "testkubeenv.k4apps.io",
    "deploymentErrors": null,
    "internalLoadBalancerEnabled": false,
    "provisioningState": "InitializationInProgress",
    "staticIp": "1.2.3.4"
  },
  "tags": {}
}

定義

名稱 Description
AppLogsConfiguration
ArcConfiguration
ContainerAppsConfiguration
createdByType

建立資源的身分識別類型。

DefaultErrorResponse

App Service 錯誤回應。

DefaultErrorResponseError

錯誤模型。

DefaultErrorResponseErrorDetailsItem

詳細的錯誤。

ExtendedLocation

擴充位置。

FrontEndConfiguration
FrontEndServiceType
KubeEnvironment

Azure App Service 專用於 Web 工作負載的 Kubernetes 叢集

KubeEnvironmentProvisioningState

Kubernetes 環境的佈建狀態。

LogAnalyticsConfiguration
StorageType
systemData

與建立和上次修改資源相關的元數據。

AppLogsConfiguration

名稱 類型 Description
destination

string

logAnalyticsConfiguration

LogAnalyticsConfiguration

ArcConfiguration

名稱 類型 Description
artifactStorageAccessMode

string

artifactStorageClassName

string

artifactStorageMountPath

string

artifactStorageNodeName

string

artifactsStorageType

StorageType

frontEndServiceConfiguration

FrontEndConfiguration

kubeConfig

string (password)

ContainerAppsConfiguration

名稱 類型 Description
appSubnetResourceId

string

控制平面基礎結構元件的子網資源標識碼。 此子網必須與 appSubnetResourceId 中所定義的子網位於相同的 VNET 中。 如果已定義,不得與 platformReservedCidr 中定義的 IP 範圍重疊。

controlPlaneSubnetResourceId

string

控制平面基礎結構元件的子網資源標識碼。 此子網必須與 appSubnetResourceId 中所定義的子網位於相同的 VNET 中。 如果已定義,不得與 platformReservedCidr 中定義的 IP 範圍重疊。

daprAIInstrumentationKey

string

Dapr 用來將服務匯出至服務通訊遙測的 Azure 監視器檢測密鑰

dockerBridgeCidr

string

指派給 Docker 網橋網路的 CIDR 表示法 IP 範圍。 如果已定義,它不得與 platformReservedCidr 中定義的任何子網 IP 範圍或 IP 範圍重疊。

platformReservedCidr

string

CIDR 表示法中的IP範圍,可以保留給環境基礎結構IP位址。 它不得與任何其他子網IP範圍重疊。

platformReservedDnsIP

string

由 platformReservedCidr 定義的 IP 位址,將保留給內部 DNS 伺服器

createdByType

建立資源的身分識別類型。

Description
User
Application
ManagedIdentity
Key

DefaultErrorResponse

App Service 錯誤回應。

名稱 類型 Description
error

DefaultErrorResponseError

錯誤模型。

DefaultErrorResponseError

錯誤模型。

名稱 類型 Description
code

string

標準化字串,以程式設計方式識別錯誤。

details

DefaultErrorResponseErrorDetailsItem[]

詳細的錯誤。

innererror

string

偵錯錯誤的詳細資訊。

message

string

詳細的錯誤描述和偵錯資訊。

target

string

詳細的錯誤描述和偵錯資訊。

DefaultErrorResponseErrorDetailsItem

詳細的錯誤。

名稱 類型 Description
code

string

標準化字串,以程式設計方式識別錯誤。

message

string

詳細的錯誤描述和偵錯資訊。

target

string

詳細的錯誤描述和偵錯資訊。

ExtendedLocation

擴充位置。

名稱 類型 Description
name

string

擴充位置的名稱。

type

string

延伸位置的類型。

FrontEndConfiguration

名稱 類型 Description
kind

FrontEndServiceType

FrontEndServiceType

Description
NodePort
LoadBalancer

KubeEnvironment

Azure App Service 專用於 Web 工作負載的 Kubernetes 叢集

名稱 類型 Description
extendedLocation

ExtendedLocation

擴充位置。

id

string (arm-id)

資源的完整資源標識碼。 例如 “/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}”

kind

string

資源種類。

location

string

資源所在的地理位置

name

string

資源的名稱

properties.aksResourceID

string

properties.appLogsConfiguration

AppLogsConfiguration

叢集組態,可讓記錄常駐程式將應用程式記錄匯出至目的地。 目前僅支援「log-analytics」

properties.arcConfiguration

ArcConfiguration

決定 ARC 叢集元件類型的叢集組態。 例如:在 BuildService 種類、前端服務成品 StorageType 等之間進行選擇。

properties.containerAppsConfiguration

ContainerAppsConfiguration

容器應用程式環境的叢集設定,以設定 Dapr 檢測金鑰和 VNET 組態

properties.defaultDomain

string

叢集的預設網域名稱

properties.deploymentErrors

string

部署或部署驗證期間發生的任何錯誤

properties.environmentType

string

Kubernetes Environment 的類型。 僅支援容器應用程式環境,其值為受控

properties.internalLoadBalancerEnabled

boolean

只有在 Vnet/子網內才顯示

properties.provisioningState

KubeEnvironmentProvisioningState

Kubernetes 環境的佈建狀態。

properties.staticIp

string

KubeEnvironment 的靜態 IP

systemData

systemData

包含 createdBy 和 modifiedBy 資訊的 Azure Resource Manager 中繼資料。

tags

object

資源標籤。

type

string

資源的類型。 例如「Microsoft.Compute/virtualMachines」或「Microsoft.Storage/storageAccounts」

KubeEnvironmentProvisioningState

Kubernetes 環境的佈建狀態。

Description
Succeeded
Failed
Canceled
Waiting
InitializationInProgress
InfrastructureSetupInProgress
InfrastructureSetupComplete
ScheduledForDelete
UpgradeRequested
UpgradeFailed

LogAnalyticsConfiguration

名稱 類型 Description
customerId

string

sharedKey

string (password)

StorageType

Description
LocalNode
NetworkFileSystem

systemData

與建立和上次修改資源相關的元數據。

名稱 類型 Description
createdAt

string (date-time)

資源建立的時間戳(UTC)。

createdBy

string

建立資源的身分識別。

createdByType

createdByType

建立資源的身分識別類型。

lastModifiedAt

string (date-time)

上次修改的資源時間戳 (UTC)

lastModifiedBy

string

上次修改資源的身分識別。

lastModifiedByType

createdByType

上次修改資源的身分識別類型。