In Kubernetes you Init Containers can be specified for a Deployment. Unfortunately it appears that the kubernetes metadata fields are not showing up for logs from an init-container in a pod. The logs from the main app container (in this case Nginx) are being populated fine. See the following screenshot for an example. The sleep and terminating log messages were from an init container.
Is there something I'm missing from a configuration perspective? Since the one container works but the other doesn't I think it might be an oversight or a particular way the metadata is gathered?
Any guidance appreciated. This is using v6.0.0-alpha2. Below is a Deployment that could be used to reproduce:
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: nginx
spec:
replicas: 3
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.13.1
ports:
- containerPort: 80
initContainers:
- name: slowness
image: busybox
command: ['sh', '-c', 'echo "Sleeping 10 sceonds..." && sleep 10']