Skip to content

Effective replica count of multi zone machines can be higher than the requested one #3

Description

@corvus-ch

When defining a multi AZ node group, the resulting sum of replicas will always be rounded up to a multiple of availability zone count. This can be higher than the requested ones and lead to additional costs.

Steps to Reproduce the Problem

nodeGroups:
  worker:
    replicas: 4
    multiAz: true
availabilityZones:
    - europe-west6-a
    - europe-west6-b
    - europe-west6-c

Actual Behavior

Three MachineSets each with a replicas of 2 and thus a total of 6 machines.

Expected Behavior

Three MachineSets. One with a replica set to 2 and two with a replica set to 1.

Workaround

nodeGroups:
  worker-a:
    replicas: 2
    multiAz: false
  spec:
    template:
      spec:
        providerSpec:
          zone: europe-west6-a
  worker-b:
    replicas: 1
    multiAz: false
  spec:
    template:
      spec:
        providerSpec:
          zone: europe-west6-b
  worker-c:
    replicas: 1
    multiAz: false
  spec:
    template:
      spec:
        providerSpec:
          zone: europe-west6-c

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions