Trigger azure kubernetes cronjob by azure function

Viewed 38

As per requirements we have docker container batch job running on azure kubernetes service which need to be trigger on arrival of files at azure blob storage location, please advise how this is possible or doable. Or any other design alternative for example if we can use azure function to start batch job running on aks pod on the arrival of file in azure blob storage location. Is this approach possible

1 Answers

Executing the workload in functions is not an option?

You could use EventGrid to collect the Azure File Events or send a message to Azure Service Bus/Storage Queue and from a pod listen to those events/messages. However this would require the pod to be running all the time

If you want true "event based processing" within Kubernetes your best option is Keda

If your Kubernetes Management Plane is exposed to the internet or reachable from a VNet (you could connect azure functions to it (requires premium though)), you could execute kubectl commands. But I would recommend using one of the solutions above.

Keep in mind - the Azure functions blob trigger is not always 100% reliable. Use Messaging or Event Grid if possible.

Related