Skip to content

defaults.replicas

View as Markdown

Number of copies. An integer fixes the count; an object enables autoscaling.

  • Type: integer or object
  • Since: manifest v1

Accepted forms

  • integer
  • object: the full form, with the fields below
defaults:
replicas: 2
defaults:
replicas:
min: 2
max: 6
scale_on:
cpu: 70%

defaults.replicas.min

Fewest replicas. 0 allows scaling to zero.

  • Type: integer
  • Default: 1
  • Range: 0 to 20
  • Since: manifest v1
defaults:
replicas:
min: 2

defaults.replicas.max

Most replicas.

  • Type: integer
  • Range: 1 to 20
  • Since: manifest v1
defaults:
replicas:
max: 6

defaults.replicas.scale_on

Targets for horizontal autoscaling between min and max.

  • Type: object
  • Since: manifest v1
defaults:
replicas:
scale_on:
cpu: 70%
concurrency: 80

defaults.replicas.scale_on.cpu

Average CPU use, as a percentage of the limit.

defaults:
replicas:
scale_on:
cpu: 70%

defaults.replicas.scale_on.memory

Average memory use, as a percentage of the limit.

defaults:
replicas:
scale_on:
memory: 80%

defaults.replicas.scale_on.concurrency

In-flight requests per replica, measured at the edge.

  • Type: integer
  • Range: 1 to …
  • Since: manifest v1
defaults:
replicas:
scale_on:
concurrency: 80