Temporary files in docker on Azure k8s

Matteo Rigoni 2 Reputation points
2023-07-06T19:14:20.72+00:00

Hi all, i've a container running code in .NET 6, dockerized and running on Azure k8s. Inside this container, i handle a message from a topic of a Service Bus. It should manage aroung 20k messages a day.

Scenario description:

I have to call an .exe (size around 100 MB) that take in input a file and generate a response in a given physical subfolder on disk. The response include two files, that i upload then to a blob storage. Finally i delete these temporary files on disk. The execution of the .exe will be of 1 minute.

Question:

Where should i store the exe? Its content will change 2-3 times a year (so few times). I was thinking to include it in the docker image, for example in "\app\resources" and then call it creating a random temp folder in the same path, one for each execution. In alternative i was thinking to Azure File Share (but i'm concerned about the traffic cost). The data is temporary, so if the pod goes down, i don't care about them.

I've already read about volumes in Docker, but i don't find any question/topic that fit my problem, so i'm searching for some advices.

Thanks

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,227 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,201 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AirGordon 7,145 Reputation points
    2023-07-06T19:29:33.09+00:00

    Putting it in the docker image would be the most common practice.

    It'll be compressed in the docker image, and mounting it from storage will create an additional dependency and potential extra cost as you've noted.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.