From e9938e6be605e16de6898e0171dba57b5bd1aefe Mon Sep 17 00:00:00 2001 From: huo-yuan-ja <88533506+huo-yuan-ja@users.noreply.github.com> Date: Thu, 29 Feb 2024 17:20:43 +0800 Subject: [PATCH] Update log-container-sidecarset.md --- docs/best-practices/log-container-sidecarset.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/best-practices/log-container-sidecarset.md b/docs/best-practices/log-container-sidecarset.md index 6b0c167597..ce8e4fa1b8 100644 --- a/docs/best-practices/log-container-sidecarset.md +++ b/docs/best-practices/log-container-sidecarset.md @@ -106,7 +106,7 @@ spec: valueFrom: fieldRef: apiVersion: v1 - fieldPath: metadata.namespace + fieldPath: metadata.namespace image: docker.elastic.co/beats/filebeat:7.16.2 livenessProbe: exec: @@ -138,12 +138,13 @@ spec: # Share log directory with app container via volumeMount - mountPath: /var/log name: log - volumes: - - configMap: - name: filebeat-config +#hzj change + volumes: + - configMap: name: filebeat-config - - name: log - emptyDir: {} + name: filebeat-config + - name: log + emptyDir: {} ``` **For the scenario where machine resources are not sufficient, in order to reduce Pod resource requests, you can set sidecar container request.cpu=0. In this case, the Qos of Pod will be [Burstable](https://kubernetes.io/docs/tasks/configure-pod-container/quality-service-pod/#create-a-pod-that-gets-assigned-a-qos-class-of-burstable).**