M
M
Maxim Firsov2019-09-29 12:01:19
Kubernetes
Maxim Firsov, 2019-09-29 12:01:19

Kubernetes: Run a container once on demand from another container?

Good afternoon!
I am designing a video processing system, tell me, let's say I have a Pod in which api-container works, it processes all incoming requests from clients via HTTPs, for some requests you need to run a separate container (in a separate Node / Pod designed for this), which will transcode the video for quite a long time. Can you tell me how you can run such a container once? Or even several to parallelize tasks?
Sincerely.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly Karasik, 2019-09-29
@vitaly_il1

You can do Horizontal Pod Autoscaling ( https://kubernetes.io/docs/tasks/run-application/h... based on custom metric - number of videos for processing.

C
chupasaurus, 2019-09-29
@chupasaurus

Through Jobs in K8s API. The link specs in YAML and kubectl, but for the application you need to knock directly, so you need to:

  1. make a service account with the rights to create/read/track them
  2. add this account to api-container spec
  3. send JSON specs of these jobs to kubernetes address

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question