简体   繁体   中英

Azure Kubernetes Service Creates Extra Resource Groups

I have created an instance of Azure Kubernetes Service (AKS) and have discovered that apart from the resource group I created the AKS instance in, two other resource groups were created for me. Here is what my resource groups and their contents looks like:

  • MyResourceGroup-Production
    • MyAKSInstance - Azure Kubernetes Service (AKS)
  • DefaultResourceGroup-WEU
    • ContainerInsights(MyAKSInstance) - Solution
    • MyAKSInstance - Log Analytics
  • MC_MyResourceGroup-Production_MyAKSInstance_westeurope
    • agentpool-availabilitySet-36219400 - Availability set
    • aks-agentpool-36219400-0 - Virtual machine
    • aks-agentpool-36219400-0_OsDisk_1_09469b24b1ff4526bcfd5d00840cfbbc - Disk
    • aks-agentpool-36219400-nic-0 - Network interface
    • aks-agentpool-36219400-nsg - Network security group
    • aks-agentpool-36219400-routetable - Route table
    • aks-vnet-36219400 - Virtual network

I have a few questions about these two separate resource groups:

  1. Can I rename the resource groups or control how they are named from my ARM template in the first place at the time of creation?
  2. Can I move the contents of DefaultResourceGroup-WEU into MyResourceGroup-Production ?
  3. Can I safely edit their settings?
  4. The DefaultResourceGroup-WEU seems to be created if you enable Log Analytics. Can I use this instance for accepting logs from other instances?

UPDATE

I managed to pre-create a log analytics resource and use that for Kubernetes. However, there is a third resource that I'm having trouble moving into my resource group:

      {
        "type": "Microsoft.Resources/deployments",
        "name": "SolutionDeployment",
        "apiVersion": "2017-05-10",
        "resourceGroup": "[split(parameters('omsWorkspaceId'),'/')[4]]",
        "subscriptionId": "[split(parameters('omsWorkspaceId'),'/')[2]]",
        "properties": {
            "mode": "Incremental",
            "template": {
                "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
                "contentVersion": "1.0.0.0",
                "parameters": {},
                "variables": {},
                "resources": [
                    {
                        "apiVersion": "2015-11-01-preview",
                        "type": "Microsoft.OperationsManagement/solutions",
                        "location": "[parameters('workspaceRegion')]",
                        "name": "[concat('ContainerInsights', '(', split(parameters('omsWorkspaceId'),'/')[8], ')')]",
                        "properties": {
                            "workspaceResourceId": "[parameters('omsWorkspaceId')]"
                        },
                        "plan": {
                            "name": "[concat('ContainerInsights', '(', split(parameters('omsWorkspaceId'),'/')[8], ')')]",
                            "product": "[concat('OMSGallery/', 'ContainerInsights')]",
                            "promotionCode": "",
                            "publisher": "Microsoft"
                        }
                    }
                ]
            }
        },
        "dependsOn": []
    }
  1. No, you cant.
  2. Yes, but I'd advice against it. I'd advice remove the health metrics from AKS, delete that resource group, create OMS in the same resource group with AKS (or wherever you need your OMS to be) and then use that OMS. it will just create container solution for you in the same resource group where oms is in.
  3. To extent, if you break anything AKS wont fix it
  4. Yes you can, but you better rework it like I mention in point 2.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM