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 ?

asked Jan 15, 2021 at 16:13
2
  • Take a look at this one, assuming you're using dockerfiles: stackoverflow.com/questions/19948149/… Commented 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 Commented 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.

answered Jan 16, 2021 at 3:11

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.