Skip to content

minScale causes pods to be killed during deploy #6935

@duglin

Description

@duglin

In what area(s)?

/area autoscale

What version of Knative?

v0.12.0

Expected Behavior

minScale pods to be created and for them to stick around

Actual Behavior

minScale pods are created, then 1/2 are killed and recreated almost immediately

Steps to Reproduce the Problem

kn service create echo --min-scale=10 --image duglin/echo --async && watch kubectl get pods

or

$ cat a
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
  name: echo
spec:
  template:
    metadata:
      annotations:
        autoscaling.knative.dev/minScale: "10"
    spec:
      containers:
      - image: duglin/echo

$ kubectl apply -f a && watch kubectl get pods

You should see 10 pods get created, and then 1/2 of them will immediately be killed, and 5 more will be created to take their place.

While with minScale there's no guarantee that things will not go below that number, it seems like something isn't quite right that we seem to purposely kill pods that put us below the minimum requested.

Metadata

Metadata

Assignees

Labels

area/autoscalekind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions