Azure托管ClusterApiHealth

p8h8hvxi  于 2023-03-31  发布在  其他
关注(0)|答案(1)|浏览(70)

应该有一个Azure托管集群API,看起来像这样:

const url = `https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/${aksClusterName}/managedClusterApiHealth?api-version=2021-11-01`;

我得到一个错误,说这个API版本不支持managedClusterApiHealth。为什么?如果不支持,那么我应该为managedClusterApiHealth api使用什么?

sigwle7e

sigwle7e1#

我得到一个错误,说这个API版本不支持managedClusterApiHealth
我试着从Postman调用托管集群API,得到了下面的错误,原因是托管集群获取API操作不支持2021-11-01 API版本:-

我将API版本更改为2023-01-01,API调用工作,但它给出了401 page not found erorr,因为获取托管群集API操作不支持managedClusterApiHealth,请参阅下面的MS文档:-

Managed Clusters - Get - REST API (Azure AKS) | Microsoft Learn〉* 没有名为managedClusterApiHealth的参数 *

请求:-

https://management.azure.com/subscriptions/0151c365-f598-44d6-b4fd-e2b6e97cb2a7/resourceGroups/valleyrg/providers/Microsoft.ContainerService/managedClusters/valleyaks09/managedClusterApiHealth?api-version=2023-01-01

输出:-

我删除了***managedClusterApiHealth***,调用Get managed cluster operation,得到的输出参数如下:-

请求:-

https://management.azure.com/subscriptions/0151c365-f598-44d6-b4fd-e2b6e97cb2a7/resourceGroups/valleyrg/providers/Microsoft.ContainerService/managedClusters/valleyaks09/?api-version=2023-01-01

输出:-

完整输出:-

"properties": {

"provisioningState": "Succeeded",

"powerState": {

"code": "Running"

},

"kubernetesVersion": "1.24.9",

"currentKubernetesVersion": "1.24.9",

"dnsPrefix": "valleyaks09-dns",

"fqdn": "valleyaks09-dns-jpu7i04j.hcp.eastus.azmk8s.io",

"azurePortalFQDN": "valleyaks09-dns-jpu7i04j.portal.hcp.eastus.azmk8s.io",

"agentPoolProfiles": [

{

"name": "agentpool",

"count": 1,

"vmSize": "Standard_DS2_v2",

"osDiskSizeGB": 128,

"osDiskType": "Managed",

"kubeletDiskType": "OS",

"maxPods": 110,

"type": "VirtualMachineScaleSets",

"availabilityZones": [

"1",

"2",

"3"

],

"maxCount": 5,

"minCount": 1,

"enableAutoScaling": true,

"provisioningState": "Succeeded",

"powerState": {

"code": "Running"

},

"orchestratorVersion": "1.24.9",

"currentOrchestratorVersion": "1.24.9",

"enableNodePublicIP": false,

"mode": "System",

"osType": "Linux",

"osSKU": "Ubuntu",

"nodeImageVersion": "AKSUbuntu-1804gen2containerd-202303.06.0",

"enableFIPS": false

}

],

"servicePrincipalProfile": {

"clientId": "msi"

},

"addonProfiles": {

"azureKeyvaultSecretsProvider": {

"enabled": false,

"config": null

},

"azurepolicy": {

"enabled": true,

"config": null,

"identity": {

"resourceId": "/subscriptions/<sub-id>/resourcegroups/MC_valleyrg_valleyaks09_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/azurepolicy-valleyaks09",

"clientId": "<client-id>",

"objectId": "<object-id>"

}

},

"omsAgent": {

"enabled": true,

"config": {

"logAnalyticsWorkspaceResourceID": "/subscriptions/<sub-id>/resourceGroups/DefaultResourceGroup-EUS/providers/Microsoft.OperationalInsights/workspaces/DefaultWorkspace-xxxxx-xxxx-44d6-b4fd-e2b6e97cb2a7-EUS"

},

"identity": {

"resourceId": "/subscriptions/<subscription-id>/resourcegroups/MC_valleyrg_valleyaks09_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/omsagent-valleyaks09",

"clientId": "<client-id>",

"objectId": "<object-id>"

}

}

},

"nodeResourceGroup": "MC_valleyrg_valleyaks09_eastus",

"enableRBAC": true,

"networkProfile": {

"networkPlugin": "kubenet",

"loadBalancerSku": "Standard",

"loadBalancerProfile": {

"managedOutboundIPs": {

"count": 1

},

"effectiveOutboundIPs": [

{

"id": "/subscriptions/<sub-id>/resourceGroups/MC_valleyrg_valleyaks09_eastus/providers/Microsoft.Network/publicIPAddresses/xxxxxxx-xxxx-4b88-a130-4bf2706336d6"

}

]

},

"podCidr": "10.244.0.0/16",

"serviceCidr": "10.0.0.0/16",

"dnsServiceIP": "10.0.0.10",

"dockerBridgeCidr": "172.17.0.1/16",

"outboundType": "loadBalancer",

"podCidrs": [

"10.244.0.0/16"

],

"serviceCidrs": [

"10.0.0.0/16"

],

"ipFamilies": [

"IPv4"

]

},

"maxAgentPools": 100,

"identityProfile": {

"kubeletidentity": {

"resourceId": "/subscriptions/subscription-id>/resourcegroups/MC_valleyrg_valleyaks09_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/valleyaks09-agentpool",

"clientId": "<client-id>",

"objectId": "<object-id>"

}

},

"autoScalerProfile": {

"balance-similar-node-groups": "false",

"expander": "random",

"max-empty-bulk-delete": "10",

"max-graceful-termination-sec": "600",

"max-node-provision-time": "15m",

"max-total-unready-percentage": "45",

"new-pod-scale-up-delay": "0s",

"ok-total-unready-count": "3",

"scale-down-delay-after-add": "10m",

"scale-down-delay-after-delete": "10s",

"scale-down-delay-after-failure": "3m",

"scale-down-unneeded-time": "10m",

"scale-down-unready-time": "20m",

"scale-down-utilization-threshold": "0.5",

"scan-interval": "10s",

"skip-nodes-with-local-storage": "false",

"skip-nodes-with-system-pods": "true"

},

"autoUpgradeProfile": {

"upgradeChannel": "patch"

},

"disableLocalAccounts": false,

"securityProfile": {

"defender": {

"logAnalyticsWorkspaceResourceId": "/subscriptions/<sub-id>/resourcegroups/DefaultResourceGroup-EUS/providers/Microsoft.OperationalInsights/workspaces/DefaultWorkspace-xxxxxxxx-xxx-xxxx-b4fd-e2b6e97cb2a7-EUS",

"securityMonitoring": {

"enabled": true

}

}

},

"storageProfile": {

"diskCSIDriver": {

"enabled": true

},

"fileCSIDriver": {

"enabled": true

},

"snapshotController": {

"enabled": true

}

},

"oidcIssuerProfile": {

"enabled": false

},

"workloadAutoScalerProfile": {}

},

"identity": {

"type": "SystemAssigned",

"principalId": "xxxxx-f4ab-40f8-ab00-dc58079e4b9b",

"tenantId": "xxxxx-7f45-4ce4-99ed-af9038592395"

},

"sku": {

"name": "Basic",

"tier": "Paid"

}

}

相关问题