Rancher入门到精通-2.0 自定义filebeat.yml Exiting: error loading config file: open filebeat.yml: permission d

Exiting: error loading config file: open filebeat.yml: permission denied

先修改路径

进入容器发现

Rancher入门到精通-2.0 自定义filebeat.yml Exiting: error loading config file: open filebeat.yml: permission d_第1张图片

猜测configmap 是root 用户copy进 容器的,filebeat用户没有权限访问

但是使用如下k8s 脚本创建filebeats

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: filebeat-config
  namespace: kube-system
  labels:
    k8s-app: filebeat
data:
  filebeat.yml: |-
    filebeat.inputs:
    - type: container
      paths:
        - /ltzx/docker/containers/*.log
      processors:
        - add_kubernetes_metadata:
            host: ${NODE_NAME}
            matchers:
            - logs_path:
                logs_path: "/var/log/containers/"

    # To ena

你可能感兴趣的:(Rancher入门到精通)