Kube Environments - Create Or Update
创建或更新 Kubernetes 环境的说明。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}?api-version=2026-07-15
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
name
|
path | True |
string |
Kubernetes 环境的名称。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 此名称不区分大小写。 |
|
subscription
|
path | True |
string (uuid) |
目标订阅的 ID。 该值必须是 UUID。 |
|
api-version
|
query | True |
string minLength: 1 |
用于此操作的 API 版本。 |
请求正文
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| location | True |
string |
资源所在的地理位置 |
| extendedLocation |
扩展位置。 |
||
| kind |
string |
资源类型。 |
|
| properties.aksResourceID |
string |
||
| properties.appLogsConfiguration |
使日志守护程序能够将应用程序日志导出到目标的集群配置。 目前仅支持“log-analytics” |
||
| properties.arcConfiguration |
确定 ARC 集群组件类型的集群配置。 例如:在 BuildService kind、FrontEnd Service ArtifactsStorageType 等之间进行选择。 |
||
| properties.containerAppsConfiguration |
容器应用环境的群集配置,用于配置 Dapr 检测密钥和 VNET 配置 |
||
| properties.environmentType |
string |
Kubernetes 环境的类型。 仅受托管值的容器应用环境支持 |
|
| properties.internalLoadBalancerEnabled |
boolean |
仅在 Vnet/子网中可见 |
|
| properties.staticIp |
string |
KubeEnvironment 的静态 IP |
|
| tags |
object |
资源标记。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
资源“KubeEnvironment”更新作成功 |
|
| 201 Created |
资源“KubeEnvironment”创建作成功 标头
|
|
| Other Status Codes |
未预期的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流程。
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| 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=2026-07-15
{
"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": {}
}
定义
| 名称 | 说明 |
|---|---|
|
App |
|
|
Arc |
|
|
Container |
|
|
created |
创建该资源的身份类型。 |
|
Default |
应用服务错误响应。 |
|
Default |
错误模型。 |
|
Default |
详细错误。 |
|
Extended |
扩展位置。 |
|
Front |
|
|
Front |
|
|
Kube |
A Kubernetes cluster specialized for web workloads by Azure 应用服务 |
|
Kube |
Kubernetes 环境的预配状态。 |
|
Log |
|
|
Storage |
|
|
system |
与创建和上次修改资源相关的元数据。 |
AppLogsConfiguration
| 名称 | 类型 | 说明 |
|---|---|---|
| destination |
string |
|
| logAnalyticsConfiguration |
ArcConfiguration
| 名称 | 类型 | 说明 |
|---|---|---|
| artifactStorageAccessMode |
string |
|
| artifactStorageClassName |
string |
|
| artifactStorageMountPath |
string |
|
| artifactStorageNodeName |
string |
|
| artifactsStorageType | ||
| frontEndServiceConfiguration | ||
| kubeConfig |
string (password) |
ContainerAppsConfiguration
| 名称 | 类型 | 说明 |
|---|---|---|
| appSubnetResourceId |
string |
控制平面基础结构组件的子网的资源 ID。 此子网必须与 appSubnetResourceId 中定义的子网位于同一 VNET 中。 如果已定义,则不得与 platformReservedCidr 中定义的 IP 范围重叠。 |
| controlPlaneSubnetResourceId |
string |
控制平面基础结构组件的子网的资源 ID。 此子网必须与 appSubnetResourceId 中定义的子网位于同一 VNET 中。 如果已定义,则不得与 platformReservedCidr 中定义的 IP 范围重叠。 |
| daprAIInstrumentationKey |
string |
Dapr 用于将服务导出到服务通信遥测的 Azure Monitor 检测密钥 |
| dockerBridgeCidr |
string |
分配给 Docker 网桥网络的 CIDR 表示法 IP 范围。 如果已定义,则它不得与 platformReservedCidr 中定义的任何子网 IP 范围或 IP 范围重叠。 |
| platformReservedCidr |
string |
CIDR 表示法中的 IP 范围,可为环境基础结构 IP 地址保留。 它不得与任何其他子网 IP 范围重叠。 |
| platformReservedDnsIP |
string |
由 platformReservedCidr 定义的 IP 地址,将为内部 DNS 服务器保留的 IP 地址 |
createdByType
创建该资源的身份类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
DefaultErrorResponse
应用服务错误响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误模型。 |
DefaultErrorResponseError
错误模型。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
标准化字符串,以编程方式识别错误。 |
| details |
详细错误。 |
|
| innererror |
string |
调试错误的更多信息。 |
| message |
string |
详细的错误描述和调试信息。 |
| target |
string |
详细的错误描述和调试信息。 |
DefaultErrorResponseErrorDetailsItem
详细错误。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
标准化字符串,以编程方式识别错误。 |
| message |
string |
详细的错误描述和调试信息。 |
| target |
string |
详细的错误描述和调试信息。 |
ExtendedLocation
扩展位置。
| 名称 | 类型 | 说明 |
|---|---|---|
| name |
string |
扩展位置的名称。 |
| type |
string |
扩展位置的类型。 |
FrontEndConfiguration
| 名称 | 类型 | 说明 |
|---|---|---|
| kind |
FrontEndServiceType
| 值 | 说明 |
|---|---|
| NodePort | |
| LoadBalancer |
KubeEnvironment
A Kubernetes cluster specialized for web workloads by Azure 应用服务
| 名称 | 类型 | 说明 |
|---|---|---|
| extendedLocation |
扩展位置。 |
|
| id |
string (arm-id) |
该资源的完全限定资源 ID。 例如,“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
| kind |
string |
资源类型。 |
| location |
string |
资源所在的地理位置 |
| name |
string |
资源的名称 |
| properties.aksResourceID |
string |
|
| properties.appLogsConfiguration |
使日志守护程序能够将应用程序日志导出到目标的集群配置。 目前仅支持“log-analytics” |
|
| properties.arcConfiguration |
确定 ARC 集群组件类型的集群配置。 例如:在 BuildService kind、FrontEnd Service ArtifactsStorageType 等之间进行选择。 |
|
| properties.containerAppsConfiguration |
容器应用环境的群集配置,用于配置 Dapr 检测密钥和 VNET 配置 |
|
| properties.defaultDomain |
string |
集群的默认域名 |
| properties.deploymentErrors |
string |
部署或部署验证期间发生的任何错误 |
| properties.environmentType |
string |
Kubernetes 环境的类型。 仅受托管值的容器应用环境支持 |
| properties.internalLoadBalancerEnabled |
boolean |
仅在 Vnet/子网中可见 |
| properties.provisioningState |
Kubernetes 环境的预配状态。 |
|
| properties.staticIp |
string |
KubeEnvironment 的静态 IP |
| systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
|
| tags |
object |
资源标记。 |
| type |
string |
资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
KubeEnvironmentProvisioningState
Kubernetes 环境的预配状态。
| 值 | 说明 |
|---|---|
| Succeeded | |
| Failed | |
| Canceled | |
| Waiting | |
| InitializationInProgress | |
| InfrastructureSetupInProgress | |
| InfrastructureSetupComplete | |
| ScheduledForDelete | |
| UpgradeRequested | |
| UpgradeFailed |
LogAnalyticsConfiguration
| 名称 | 类型 | 说明 |
|---|---|---|
| customerId |
string |
|
| sharedKey |
string (password) |
StorageType
| 值 | 说明 |
|---|---|
| LocalNode | |
| NetworkFileSystem |
systemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
| createdBy |
string |
创建该资源的身份。 |
| createdByType |
创建该资源的身份类型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |