【发布时间】:2021-02-16 05:00:14
【问题描述】:
我正在尝试通过使用以下代码 sn-ps 来旋转 kubernetes 内的日志:
containers:
- name: logrotate
image: docker.io/kicm/logrotate
securityContext:
runAsUser: 0
volumeMounts:
- name: logrotate-conf
mountPath: /etc/logrotate.d
volumes:
- name: logrotate-conf
configMap:
name: logrotation-config
- name: app-logs
persistentVolumeClaim:
claimName: my-var-pvc
restartPolicy: OnFailure
在pod运行阶段,我遇到了如下错误:
Potentially dangerous mode on /etc/logrotate.conf: 0664
error: Ignoring /etc/logrotate.conf because it is writable by group or others.
Reading state from file: /tmp/logrotate.status
Allocating hash table for state file, size 64 entries
Handling 0 logs
请告诉我如何解决这个问题,谢谢。
【问题讨论】:
标签: kubernetes logrotate