0

First of all, I know absolutely nothing about Kubernetes, so please be easy on me.

Anyway, suppose I want to run a main application and a small agent application that work together. The agent will be the entry point for requests coming from the network, which will then be passed over to the main application.

Is it possible to run these 2 processes in a single container inside a pod ? I wouldn't want to start another container just to run the agent.

Or I will have necessarily have to run each of these applications in its own container inside the pod ?

2
  • Take a look at this one, assuming you're using dockerfiles: stackoverflow.com/questions/19948149/…
    – Meow_ly
    Jan 15, 2021 at 16:51
  • yes, I assumed it would not be too hard to run more than 1 process in a container, but maybe Kubernetes would impose some constraints on the containers, I don't know ... thanks anyway
    – zentrunix
    Jan 15, 2021 at 17:21

1 Answer 1

0

kubectl exec allows you to launch any executable found in the container's filesystem, so the answer is yes: You can run more than one process inside a container managed by Kubernetes, be it a Docker container or something else. Whether a process is launched manually or by the container image's startup code is not relevant.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .