How to design a system

I now use the python program as the server side, the server side receives the request from the front-end and establishes a task queue and adds the request sent by the front-end to the queue, the backend regularly polls to detect the queue, and takes out the tasks in the queue according to the first-in, first-out principle, the task is mainly used to create containers according to parameters and execute scripts in them. So how do I create this task queue, can I use Kubernetes to create it directly, and do I need additional middleware?