Set-AzConnectedKubernetes
语法
SetExpanded (默认值)
Set-AzConnectedKubernetes
-ClusterName <String>
-ResourceGroupName <String>
-Location <String>
[-SubscriptionId <String>]
[-AadProfileAdminGroupObjectID <String[]>]
[-AadProfileEnableAzureRbac]
[-AadProfileTenantId <String>]
[-ArcAgentProfileAgentAutoUpgrade <String>]
[-ArcAgentProfileAgentError <IAgentError[]>]
[-ArcAgentProfileDesiredAgentVersion <String>]
[-ArcAgentProfileSystemComponent <ISystemComponent[]>]
[-ArcAgentryConfiguration <IArcAgentryConfigurations[]>]
[-AzureHybridBenefit <String>]
[-Distribution <String>]
[-DistributionVersion <String>]
[-GatewayEnabled]
[-Infrastructure <String>]
[-Kind <String>]
[-PrivateLinkScopeResourceId <String>]
[-PrivateLinkState <String>]
[-ProvisioningState <String>]
[-Tag <Hashtable>]
[-CustomLocationsOid <String>]
[-OidcIssuerProfileEnabled]
[-OidcIssuerProfileSelfHostedIssuerUrl <String>]
[-WorkloadIdentityEnabled]
[-AcceptEULA]
[-ConfigurationSetting <Hashtable>]
[-ConfigurationProtectedSetting <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetExpandedDisableGateway
Set-AzConnectedKubernetes
-ClusterName <String>
-ResourceGroupName <String>
-Location <String>
[-SubscriptionId <String>]
[-AadProfileAdminGroupObjectID <String[]>]
[-AadProfileEnableAzureRbac]
[-AadProfileTenantId <String>]
[-ArcAgentProfileAgentAutoUpgrade <String>]
[-ArcAgentProfileAgentError <IAgentError[]>]
[-ArcAgentProfileDesiredAgentVersion <String>]
[-ArcAgentProfileSystemComponent <ISystemComponent[]>]
[-ArcAgentryConfiguration <IArcAgentryConfigurations[]>]
[-AzureHybridBenefit <String>]
[-Distribution <String>]
[-DistributionVersion <String>]
[-GatewayEnabled]
[-Infrastructure <String>]
[-Kind <String>]
[-PrivateLinkScopeResourceId <String>]
[-PrivateLinkState <String>]
[-ProvisioningState <String>]
[-Tag <Hashtable>]
[-CustomLocationsOid <String>]
[-OidcIssuerProfileEnabled]
[-OidcIssuerProfileSelfHostedIssuerUrl <String>]
[-WorkloadIdentityEnabled]
[-AcceptEULA]
[-ConfigurationSetting <Hashtable>]
[-ConfigurationProtectedSetting <Hashtable>]
[-DisableGateway]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetExpandedEnableGateway
Set-AzConnectedKubernetes
-ClusterName <String>
-ResourceGroupName <String>
-Location <String>
-GatewayResourceId <String>
[-SubscriptionId <String>]
[-AadProfileAdminGroupObjectID <String[]>]
[-AadProfileEnableAzureRbac]
[-AadProfileTenantId <String>]
[-ArcAgentProfileAgentAutoUpgrade <String>]
[-ArcAgentProfileAgentError <IAgentError[]>]
[-ArcAgentProfileDesiredAgentVersion <String>]
[-ArcAgentProfileSystemComponent <ISystemComponent[]>]
[-ArcAgentryConfiguration <IArcAgentryConfigurations[]>]
[-AzureHybridBenefit <String>]
[-Distribution <String>]
[-DistributionVersion <String>]
[-GatewayEnabled]
[-Infrastructure <String>]
[-Kind <String>]
[-PrivateLinkScopeResourceId <String>]
[-PrivateLinkState <String>]
[-ProvisioningState <String>]
[-Tag <Hashtable>]
[-CustomLocationsOid <String>]
[-OidcIssuerProfileEnabled]
[-OidcIssuerProfileSelfHostedIssuerUrl <String>]
[-WorkloadIdentityEnabled]
[-AcceptEULA]
[-ConfigurationSetting <Hashtable>]
[-ConfigurationProtectedSetting <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetEnableGateway
Set-AzConnectedKubernetes
-GatewayResourceId <String>
-InputObject <IConnectedCluster>
[-SubscriptionId <String>]
[-AadProfileAdminGroupObjectID <String[]>]
[-AadProfileEnableAzureRbac]
[-AadProfileTenantId <String>]
[-ArcAgentProfileAgentAutoUpgrade <String>]
[-ArcAgentProfileAgentError <IAgentError[]>]
[-ArcAgentProfileDesiredAgentVersion <String>]
[-ArcAgentProfileSystemComponent <ISystemComponent[]>]
[-ArcAgentryConfiguration <IArcAgentryConfigurations[]>]
[-AzureHybridBenefit <String>]
[-Distribution <String>]
[-DistributionVersion <String>]
[-GatewayEnabled]
[-Infrastructure <String>]
[-Kind <String>]
[-PrivateLinkScopeResourceId <String>]
[-PrivateLinkState <String>]
[-ProvisioningState <String>]
[-Tag <Hashtable>]
[-CustomLocationsOid <String>]
[-OidcIssuerProfileEnabled]
[-OidcIssuerProfileSelfHostedIssuerUrl <String>]
[-WorkloadIdentityEnabled]
[-AcceptEULA]
[-ConfigurationSetting <Hashtable>]
[-ConfigurationProtectedSetting <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetDisableGateway
Set-AzConnectedKubernetes
-InputObject <IConnectedCluster>
[-SubscriptionId <String>]
[-AadProfileAdminGroupObjectID <String[]>]
[-AadProfileEnableAzureRbac]
[-AadProfileTenantId <String>]
[-ArcAgentProfileAgentAutoUpgrade <String>]
[-ArcAgentProfileAgentError <IAgentError[]>]
[-ArcAgentProfileDesiredAgentVersion <String>]
[-ArcAgentProfileSystemComponent <ISystemComponent[]>]
[-ArcAgentryConfiguration <IArcAgentryConfigurations[]>]
[-AzureHybridBenefit <String>]
[-Distribution <String>]
[-DistributionVersion <String>]
[-GatewayEnabled]
[-Infrastructure <String>]
[-Kind <String>]
[-PrivateLinkScopeResourceId <String>]
[-PrivateLinkState <String>]
[-ProvisioningState <String>]
[-Tag <Hashtable>]
[-CustomLocationsOid <String>]
[-OidcIssuerProfileEnabled]
[-OidcIssuerProfileSelfHostedIssuerUrl <String>]
[-WorkloadIdentityEnabled]
[-AcceptEULA]
[-ConfigurationSetting <Hashtable>]
[-ConfigurationProtectedSetting <Hashtable>]
[-DisableGateway]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set
Set-AzConnectedKubernetes
-InputObject <IConnectedCluster>
[-SubscriptionId <String>]
[-AadProfileAdminGroupObjectID <String[]>]
[-AadProfileEnableAzureRbac]
[-AadProfileTenantId <String>]
[-ArcAgentProfileAgentAutoUpgrade <String>]
[-ArcAgentProfileAgentError <IAgentError[]>]
[-ArcAgentProfileDesiredAgentVersion <String>]
[-ArcAgentProfileSystemComponent <ISystemComponent[]>]
[-ArcAgentryConfiguration <IArcAgentryConfigurations[]>]
[-AzureHybridBenefit <String>]
[-Distribution <String>]
[-DistributionVersion <String>]
[-GatewayEnabled]
[-Infrastructure <String>]
[-Kind <String>]
[-PrivateLinkScopeResourceId <String>]
[-PrivateLinkState <String>]
[-ProvisioningState <String>]
[-Tag <Hashtable>]
[-CustomLocationsOid <String>]
[-OidcIssuerProfileEnabled]
[-OidcIssuerProfileSelfHostedIssuerUrl <String>]
[-WorkloadIdentityEnabled]
[-AcceptEULA]
[-ConfigurationSetting <Hashtable>]
[-ConfigurationProtectedSetting <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
用于设置已连接的群集资源的属性的 API。
替换现有已连接群集的所有配置;未指定的任何属性都将重置为其默认值。
示例
示例 1:禁用连接的 Kubernetes 群集的网关
Set-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -Location eastus -DisableGateway
Location Name ResourceGroupName
-------- ---- -----------------
eastus azps_test_cluster azps_test_group
此命令禁用连接的 Kubernetes 群集的网关功能。
示例 2:为连接的 Kubernetes 群集启用网关
Set-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -Location eastus -GatewayResourceId $gatewayResourceId
Location Name ResourceGroupName
-------- ---- -----------------
eastus azps_test_cluster azps_test_group
此命令启用连接的 kubernetes 群集的网关功能。
# Get an existing cluster first
$inputObject = Get-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -SubscriptionId $subscriptionId
# Enable gateway and set gateway resource Id
$inputObject.GatewayEnabled=$true
$inputObject.GatewayResourceId=$gatewayResourceId
Set-AzConnectedKubernetes -InputObject $inputObject
Location Name ResourceGroupName
-------- ---- -----------------
eastus azps_test_cluster azps_test_group
此命令启用连接的 kubernetes 群集的网关功能。
# Get an existing cluster first
$inputObject = Get-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -SubscriptionId $subscriptionId
# Enable workload identity and OIDC issuer profile
$inputObject.WorkloadIdentityEnabled=$true
$inputObject.OidcIssuerProfileEnabled=$true
Set-AzConnectedKubernetes -InputObject $inputObject
Location Name ResourceGroupName
-------- ---- -----------------
eastus azps_test_cluster azps_test_group
此命令为连接的 Kubernetes 群集启用工作负荷标识和 OIDC 颁发者配置文件
# Get an existing cluster first
$inputObject = Get-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -SubscriptionId $subscriptionId
# Disable workload identity
$inputObject.WorkloadIdentityEnabled=$false
Set-AzConnectedKubernetes -InputObject $inputObject
Location Name ResourceGroupName
-------- ---- -----------------
eastus azps_test_cluster azps_test_group
此命令禁用连接的 kubernetes 群集的工作负荷标识
示例 6:禁用连接的 kubernetes 群集的工作负荷标识
Get-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -SubscriptionId $subscriptionId | Set-AzConnectedKubernetes -WorkloadIdentityEnabled:$false
Location Name ResourceGroupName
-------- ---- -----------------
eastus azps_test_cluster azps_test_group
此命令禁用连接的 kubernetes 群集的工作负荷标识
参数
-AadProfileAdminGroupObjectID
将具有群集管理员角色的 AAD 组对象 ID 的列表。
参数属性
类型: String [ ]
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-AadProfileEnableAzureRbac
是否为 Kubernetes 授权启用 Azure RBAC。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-AadProfileTenantId
用于身份验证的 AAD 租户 ID。
如果未指定,将使用部署订阅的租户。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-AcceptEULA
接受 ConnectedKubernetes 的 EULA,法律术语将在未提供此参数的情况下弹出
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ArcAgentProfileAgentAutoUpgrade
指示是否自动将 Arc 代理升级到最新版本。
默认值为“已启用”。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ArcAgentProfileAgentError
群集资源上的 arc 代理和系统组件错误列表。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ArcAgentProfileDesiredAgentVersion
要安装在群集资源上的 Arc 代理的版本
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ArcAgentProfileSystemComponent
群集资源上安装的系统扩展列表。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ArcAgentryConfiguration
用于自定义已连接群集行为的配置设置。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-AsJob
以作业身份运行命令
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-AzureHybridBenefit
指示是否选择加入 Azure 混合权益
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ClusterName
调用其获取的 Kubernetes 群集的名称。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
别名: Name
参数集
SetExpanded
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
SetExpandedDisableGateway
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
SetExpandedEnableGateway
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ConfigurationProtectedSetting
Arc Agentry 系统保护配置
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ConfigurationSetting
Arc 代理系统配置
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Confirm
在运行 cmdlet 之前,提示你进行确认。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-CustomLocationsOid
“custom-locations”应用的 OID。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DefaultProfile
DefaultProfile 参数不起作用。
如果对其他订阅执行 cmdlet,请使用 SubscriptionId 参数。
参数属性
类型: PSObject
默认值: None
支持通配符: False
不显示: False
别名: AzureRMContext, AzureCredential
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DisableGateway
用于设置已连接的群集资源的属性的 API。
替换现有已连接群集的所有配置;未指定的任何属性都将重置为其默认值。
参数属性
参数集
SetExpandedDisableGateway
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
SetDisableGateway
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Distribution
在此连接的群集上运行的 Kubernetes 分发版。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DistributionVersion
此连接的群集上的 Kubernetes 分发版本。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-GatewayEnabled
指示是否启用了 Arc 路由器连接的网关。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-GatewayResourceId
Arc 网关资源 ID,提供这将启用网关
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
SetExpandedEnableGateway
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
SetEnableGateway
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Infrastructure
在此连接的群集所表示的 Kubernetes 群集上运行的基础结构。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
用于设置已连接的群集资源的属性的 API。
替换现有已连接群集的所有配置;未指定的任何属性都将重置为其默认值。
SetEnableGateway
Position: Named
必需: True
来自管道的值: True
来自管道的值(按属性名称): False
来自剩余参数的值: False
SetDisableGateway
Position: Named
必需: True
来自管道的值: True
来自管道的值(按属性名称): False
来自剩余参数的值: False
Set
Position: Named
必需: True
来自管道的值: True
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Kind
连接的群集类型。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Location
资源所在的地理位置
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
SetExpanded
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
SetExpandedDisableGateway
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
SetExpandedEnableGateway
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-NoWait
异步运行命令
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-OidcIssuerProfileEnabled
是否为工作负荷标识集成启用 oidc 颁发者。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-OidcIssuerProfileSelfHostedIssuerUrl
用于工作负荷标识功能的公有云群集(AKS、EKS、GKE)的颁发者 URL。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-PrivateLinkScopeResourceId
仅当启用了 privateLinkState 时,才会填充此值。
此连接的群集分配给专用链接范围的资源 ID(如果有)。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-PrivateLinkState
描述已连接群集资源上的专用链接状态的属性。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ProvisioningState
连接的群集资源的预配状态。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ResourceGroupName
资源组的名称。
此名称不区分大小写。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
SetExpanded
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
SetExpandedDisableGateway
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
SetExpandedEnableGateway
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-SubscriptionId
目标订阅的 ID。
参数属性
类型: String
默认值: (Get-AzContext).Subscription.Id
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Tag
资源标记。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-WhatIf
显示 cmdlet 运行时会发生什么情况。
命令脚本未运行。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-WorkloadIdentityEnabled
是启用或禁用工作负荷标识 Webhook
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters 。
输出