kubectl apply -f https://raw.githubusercontent.com/timberio/examples/master/kubernetes/reading-log-files-from-containers/logging-app-pod-sidecar-log-streamer.yaml
How do we add Sidecar container to running pod?
kubectl apply -f https://raw.githubusercontent.com/timberio/examples/master/kubernetes/reading-log-files-from-containers/logging-app-pod-sidecar-log-streamer.yaml
How do we add Sidecar container to running pod?
You have to configure the sidecar container in a deployment/statefulset/daemonset and redeploy
To add sidecar to an existing pod, you can generate the pod yaml using -oyaml > newpodfile.yaml
Or you can edit the pod and a the configuration will be saved under /tmp.
Also, review the kubernetes documenation below. The doc contains a sample configuration file for a pod that has two sidecar containers: