我正在尝试修改 kernel.core_pattern 但我无法修改它,因为它是只读的。
我努力了:
> echo 'kernel.core_pattern=/tmp/core-%e.%p.%h.%t' >> /etc/sysctl.conf
> Reload sysctl: sysctl --system
Applying /etc/sysctl.conf ... sysctl: setting key "kernel.core_pattern": Read-only file system cat /proc/sys/kernel/core_pattern
我也无法将其添加到 pod yaml 中:
spec:
securityContext:
sysctls:
- name: kernel.core_pattern
value: "/tmp/core-%e.%p.%h.%t"
我不断得到这个:SysctlForbidden
我还创建了一个 PodSecurityPolicy:
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: sysctl-psp
spec:
privileged: false # Don't allow privileged pods!
# The rest fills in some required fields.
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
runAsUser:
rule: RunAsAny
fsGroup:
rule: RunAsAny
allowedUnsafeSysctls:
- kernel.*
仍然没有运气。
有什么建议么?