Hi all We are trying to add docker logging options to our kubernetes deployments for log rolling e.g --log-opt max-size=10m
For example if we ran something like this directly using docker docker run -it --log-opt max-size=10m --log-opt max-file=2 image-name We can use docker inspect to see those options added to the LogConfig e.g "LogConfig": { "Type": "json-file", "Config": { "max-file": "2", "max-size": "10m" } }, Here is what we have defined in our deployment: containers: - image: ourlocalrepo/deployments/our_pod:latest command: - java - -Djava.security.egd=file:/dev/./urandom - -Dlog4j.configurationFile=/etc/logs-config/log4j2.xml - -Xms128m - -Xmx256m - -jar env: - name: POD_NAME valueFrom: fieldRef: fieldPath: metadata.name - name: POD_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace imagePullPolicy: Always name: "our_pod" ports: - containerPort: 80 protocol: TCP args: - "--log-opt max-size=10m" - "--log-opt max-file=2" But when this deployment is run and the pod comes up on a node i can use docker inspect and see that these args are added to Cmd: "Cmd": [ "--log-opt max-size=10m", "--log-opt max-file=2" ], Instead of the LogConfig section as they should be - it still looks like this : "LogConfig": { "Type": "json-file", "Config": {} }, Can anyone point me the right direction to get the kubernetes deployment to add these log options? thanks!! -- You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group. To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscr...@googlegroups.com. To post to this group, send email to kubernetes-users@googlegroups.com. Visit this group at https://groups.google.com/group/kubernetes-users. For more options, visit https://groups.google.com/d/optout.