Search code examples
dockerkubernetesopenshift-client-toolsopenshift-origin

Adding docker container to running OpenShift pod


I can add a container to a pod by editing the pod template, but I'm looking for something simpler. Is there any way to add a container to a deployed OpenShift pod without editing the pod template? CLI preferable.


Solution

  • There is no command today that makes it easy to add a container to the pod template for an RC or deployment. You can use oc new-app to quickly generate deployment configs that have multiple containers with

    oc new-app php+apache+somethingelse
    

    But this won't let you deeply customize those containers.

    Agree this would be nice to have - as a mode to "run", perhaps.