Search code examples
kubernetescontainerscloud-foundryamazon-ecs

Does CloudFoundry support multiple containers per app?


A Kubernetes Pod and an AWS ECS Task Definition both support multiple different container images: each instance of the pod / task will run all images as containers together.

Does CloudFoundry support a similar concept to allow apps that consist of multiple, separate processes?


Solution

  • tl;dr

    No. You can only run a single container per application instance.

    Longer Answer

    Most of the answers are quickly pointing you to PKS, however Cloud Foundry itself is outside of that.

    Cloud Foundry runs each application via Diego. Each application runs as a standalone container on a diego-cell. This is different from Kubernetes which you think of Pods or groups of colocated containers.

    Cloud Foundry allows you to run multiple instances of each container, but I believe this is different from what you are asking.

    Workaround

    You may not be able to run multiple containers, but you can run multiple processes. For an example of this, check out how CF-FaaS runs. It uses the CF-Space-Security processes in a collocated scheme.