KNative functions: Sclaed down to zero after 30s even if grace period is increased

47 views Asked by At

I configured my KNative serving like this:

apiVersion: operator.knative.dev/v1beta1
kind: KnativeServing
metadata:
  name: knative-serving
  namespace: knative-serving
spec:
  ingress:
    kourier:
      enabled: true
  config:
    network:
      ingress-class: "kourier.ingress.networking.knative.dev"
    autoscaler:
      scale-to-zero-grace-period: "600s"

I have a function which takes longer than 30 seconds to become ready. I am fine with that. But its pod is still killed after 30 seconds. Is there anything else to check (i.e. some setting in func.yaml)?

1

There are 1 answers

0
E. Anderson On

You might need to set either timeoutSeconds or configure readinessProbes and livenessProbes which are longer than the Knative defaults. You should be able to see the defaults in the applied service spec.