Want to adda new container in existing deployments but after adding its getting error

i hvae to add a another container in existing deployments also new container has to run /bin/sh -c tail -n+1 -f /var/log/app.log.

.

can anyone help me in this multi container topic

Hello kkopsmirpur,

let me help you with your concern.
to add a new container in the deployment just add new element in containers array
example

   containers:
     - image: "nginx"
       name:""nginx"
    - image: "busybox"
      name: "busybox"
      command: " /bin/sh -c tail -n+1 -f /var/log/app.log."

and as you can see just use “command” attribute to run a command in the container.

thanks,
KodeKloud support

also i have to use volume,mounted at /var/log to make app.log available at busy box

Hello @kkopsmirpur,
You can find similar example in the official k8s page: -

Logging Architecture | Kubernetes

Regards,
KodeKloud Support