0

I have deployed the Azure Queue Trigger Function to Kubernetes with KEDA for event-driven activation and scaling. It works fine with smaller jobs, but if the time taken exceeds 5 minutes, the pods get terminated automatically, and new pods get created. Here is my YAML file, and I have set the functionTimeout to 00:30:00 in host.json. Any help would be highly appreciated.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: queue-test
  labels:
    app: queue-test
spec:
  selector:
    matchLabels:
      app: queue-test
  template:
    metadata:
      labels:
        app: queue-test
    spec:
      containers:
      - name: queue-test
        image: 
---
---
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  name: queue-test
  labels: {}
spec:
  scaleTargetRef:
    name: queue-test
  triggers:
  - type: azure-queue
    metadata:
      direction: in
      queueName: sample-queue
      connectionFromEnv: AzureWebJobsStorage

---
Lakmal
  • 779
  • 1
  • 8
  • 16

1 Answers1

1

Pods getting terminated after 5 minutes could be due to Kubernetes Liveness Probes, Pod resource limits, or KEDA scaling behavior.

Steps to debug:

  1. Check pod logs: kubectl logs <pod_name> --previous.
  2. Adjust Liveness Probe parameters or disable it.
  3. Increase resource limits in your Kubernetes Deployment.
  4. Review and adjust KEDA trigger sensitivity.

I hope this helps!

Fares
  • 605
  • 4
  • 19