aks-engine icon indicating copy to clipboard operation
aks-engine copied to clipboard

Master Node ILB not registering backend pool

Open PacoGuy opened this issue 6 years ago • 4 comments

Describe the bug When deploying a new cluster with aks-engine v0.46.0 with 3 masters the master-internal-lb is not automatically registering any of the masters with the backend pool.

Steps To Reproduce Provision using the following apimodel, attempt to run 'kubectl get nodes' from the master or locally after copying the config:

{
  "apiVersion": "vlabs",
  "properties": {
    "orchestratorProfile": {
      "orchestratorType": "Kubernetes",
      "orchestratorVersion": "1.13.11",
      "kubernetesConfig": {
        "networkPolicy": "azure",
        "apiServerConfig": {
          "--enable-admission-plugins":"NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota",
          "--requestheader-allowed-names":"aggregator",
          "--authorization-mode": "Node,RBAC",
          "--default-not-ready-toleration-seconds": "60",
          "--default-unreachable-toleration-seconds": "60"
        },
        "controllerManagerConfig": {
          "--horizontal-pod-autoscaler-use-rest-clients":"true",
          "--horizontal-pod-autoscaler-sync-period":"1s"
        },
        "kubeletConfig": {
          "--max-pods": "30",
          "--cgroups-per-qos": "true",
          "--enforce-node-allocatable": "pods",
          "--system-reserved": "cpu=1,memory=5.0Gi",
          "--eviction-hard": "memory.available<15.0Gi,nodefs.available<10%,nodefs.inodesFree<5%"
        },
        "schedulerConfig": {
          "--feature-gates": "PodPriority=false"
        },
        "useInstanceMetadata": true,
        "privateCluster": {
          "enabled": true
        },
        "addons": [
          {
            "name": "cluster-autoscaler",
            "enabled": true,
            "pools": [
              {
                "name": "services",
                "config": {
                  "min-nodes": "4",
                  "max-nodes": "10"
                }
              },
              {
                "name": "notebooks",
                "config": {
                  "min-nodes": "1",
                  "max-nodes": "5"
                }
              },
              {
                "name": "workers",
                "config": {
                  "min-nodes": "2",
                  "max-nodes": "30"
                }
              }
            ],
            "config": {
              "scan-interval": "1m",
              "scale-down-delay-after-add": "4m0s",
              "scale-down-unneeded-time": "5m0s"
            }
          },
          {
            "name": "tiller",
            "enabled": true,
            "containers": [
              {
                "name": "tiller",
                "image": "gcr.io/kubernetes-helm/tiller:v2.13.1"
              }
            ]
          },
          {
            "name": "kubernetes-dashboard",
            "enabled": false
          }
        ]
      }
    },
    "masterProfile": {
      "count": 3,
      "dnsPrefix": "**********",
      "vmSize": "Standard_D8_v3",
      "ipAddressCount": 34,
      "imageReference": {
        "name": "dev0.46.0NodeImagerelease-1.3.55",
        "resourceGroup": "**********.Compute"
      },
      "vnetSubnetId": "/subscriptions/**********/resourceGroups/**********/providers/Microsoft.Network/virtualNetworks/**********/subnets/**********",
      "firstConsecutiveStaticIP": "**********.220",
      "OSDiskSizeGB": 300,
      "vnetCidr": "**********.0/20"
    },
    "agentPoolProfiles": [
      {
        "name": "services",
        "count": 4,
        "ipAddressCount": 34,
        "imageReference": {
          "name": "dev0.46.0NodeImagerelease-1.3.55",
          "resourceGroup": "**********.Compute"
        },
        "vmSize": "Standard_D32s_v3",
        "vnetSubnetId": "/subscriptions/**********/resourceGroups/**********/providers/Microsoft.Network/virtualNetworks/**********/subnets/BUYDSSQA-PROTECTEDSN",
        "storageProfile" : "ManagedDisks",
        "availabilityProfile": "VirtualMachineScaleSets",
        "customNodeLabels": {
          "role_service": "all"
        },
        "OSDiskSizeGB": 1023
      },
      {
        "name": "notebooks",
        "count": 1,
        "ipAddressCount": 34,
        "imageReference": {
          "name": "dev0.46.0NodeImagerelease-1.3.55",
          "resourceGroup": "**********.Compute"
        },
        "vmSize": "Standard_D32s_v3",
        "vnetSubnetId": "/subscriptions/**********/resourceGroups/**********/providers/Microsoft.Network/virtualNetworks/**********/subnets/BUYDSSUAT-PROTECTEDSN",
        "storageProfile" : "ManagedDisks",
        "availabilityProfile": "VirtualMachineScaleSets",
        "customNodeLabels": {
          "role_notebook": "all"
        },
        "OSDiskSizeGB": 1023
      },
      {
        "name": "workers",
        "count": 2,
        "ipAddressCount": 34,
        "imageReference": {
          "name": "dev0.46.0NodeImagerelease-1.3.55",
          "resourceGroup": "**********.Compute"
        },
        "vmSize": "Standard_D32s_v3",
        "vnetSubnetId": "/subscriptions/**********/resourceGroups/**********/providers/Microsoft.Network/virtualNetworks/**********/subnets/BUYDSSUAT-PROTECTEDSN",
        "storageProfile" : "ManagedDisks",
        "availabilityProfile": "VirtualMachineScaleSets",
        "customNodeLabels": {
          "role_worker": "all"
        },
        "OSDiskSizeGB": 1023
      }
    ],
    "linuxProfile": {
      "adminUsername": "**********",
      "ssh": {
        "publicKeys": [
          {
            "keyData": "ssh-rsa **********"
          }
        ]
      }
    },
    "servicePrincipalProfile": {
      "clientId": "**********",
      "secret": "**********"
    }
  }
}

The master nodes are accessible and ready, we can ssh to them and am not seeing any issues one the nodes them-self. However the LB shows nothing in the backend pool.

When I manually add the master nodes to the backend pool then the cluster functions as expected.

Expected behavior The master internal lb should have all three master nodes registered in the backend pool and the cluster should be accessible using the lb address.

AKS Engine version Version: v0.46.0 GitCommit: 9335dfb72 GitTreeState: clean

Kubernetes version 1.13.11

Additional context Manually adding the backend pool for the master insternal lb fixes this issue.

PacoGuy avatar Jan 28 '20 21:01 PacoGuy

Oh, and this same version of aks-engine used to launch a single master cluster works as expected.

PacoGuy avatar Jan 28 '20 21:01 PacoGuy

Hi @PacoGuy, repro'd :(

Almost certainly a regression from this:

https://github.com/Azure/aks-engine/pull/2572

(There's even a check-box that confirmed the existing Basic LB + 3 master scenario 🤦‍♂ )

We'll fix this and cut a patch release. Also, you might consider changing to Standard LB, which by itself isn't very interesting (who wants to choose a Load Balancer SKU???), but which is required for availability zones support. You probably will want to land on availability zones eventually for physical HA, and so moving over the SLB in the interim should be a painless/boring change that will mean fewer config changes when you do start poking around w/ zones.

jackfrancis avatar Jan 28 '20 23:01 jackfrancis

@PacoGuy I'm hopeful the fix is as easy as this:

https://github.com/Azure/aks-engine/pull/2646

I'll poke the team tomorrow to do a review, and I'll cut a patch release after it merges to master.

jackfrancis avatar Jan 29 '20 01:01 jackfrancis

Thank you @jackfrancis. Looks like we will stick to 0.45.0 for this release of our code but will validate this aks-engine patch release asap for our next deployment window.

PacoGuy avatar Jan 29 '20 15:01 PacoGuy