【问题标题】:Filebeat Demonset error while deploying on Azure Kubernetes services在 Azure Kubernetes 服务上部署时出现 Filebeat Demonset 错误
【发布时间】:2021-08-25 05:17:06
【问题描述】:

我正在尝试在 Azure Kubernetes 服务上部署 Filebeat 演示

我的代码来自:https://github.com/elastic/beats/tree/master/deploy/kubernetes/filebeat

以下是我面临的错误,如果这里遗漏了什么,请告诉我

错误:

{
    "kind": "Event",
    "apiVersion": "v1",
    "metadata": {
        "name": "filebeat.1686897c8d8bxxxx",
        "namespace": "kube-system",
        "selfLink": "/api/v1/namespaces/kube-system/events/filebeat.1686897c8d8bxxxx",
        "uid": "5b94cf20-b432-4d77-b20b-f45fd91xxxxx",
        "resourceVersion": "708810xx",
        "creationTimestamp": "2021-06-08T07:04:43Z",
        "managedFields": [
            {
                "manager": "kube-controller-manager",
                "operation": "Update",
                "apiVersion": "v1",
                "time": "2021-06-08T07:04:45Z",
                "fieldsType": "FieldsV1",
                "fieldsV1": {
                    "f:count": {},
                    "f:firstTimestamp": {},
                    "f:involvedObject": {
                        "f:apiVersion": {},
                        "f:kind": {},
                        "f:name": {},
                        "f:namespace": {},
                        "f:resourceVersion": {},
                        "f:uid": {}
                    },
                    "f:lastTimestamp": {},
                    "f:message": {},
                    "f:reason": {},
                    "f:source": {
                        "f:component": {}
                    },
                    "f:type": {}
                }
            }
        ]
    },
    "involvedObject": {
        "kind": "DaemonSet",
        "namespace": "kube-system",
        "name": "filebeat",
        "uid": "80f770e5-2b8b-xxxx-bcea-2c2dfba5xxxx",
        "apiVersion": "apps/v1",
        "resourceVersion": "7088xxxx"
    },
    "reason": "FailedCreate",
    "message": "Error creating: pods \"filebeat-\" is forbidden: error looking up service account kube-system/filebeat: serviceaccount \"filebeat\" not found",
    "source": {
        "component": "daemonset-controller"
    },
    "firstTimestamp": "2021-06-08T07:04:43Z",
    "lastTimestamp": "2021-06-08T07:04:45Z",
    "count": 9,
    "type": "Warning",
    "eventTime": null,
    "reportingComponent": "",
    "reportingInstance": ""
}

【问题讨论】:

  • 关于这个问题的任何更新?它解决了你的问题吗?如果您有任何回应,请告诉我。

标签: azure elasticsearch kubernetes logstash filebeat


【解决方案1】:

Kubernetes 无法创建您的 pod,因为它引用了一个不存在的服务帐户。 请确保应用您提到的页面中的所有yaml文件:

https://github.com/elastic/beats/tree/master/deploy/kubernetes/filebeat

作为一个基本示例:

kubectl apply -f filebeat-configmap.yaml
kubectl apply -f filebeat-daemonset.yaml
kubectl apply -f filebeat-role-binding.yaml
kubectl apply -f filebeat-role.yaml
kubectl apply -f filebeat-service-account.yaml

【讨论】:

    【解决方案2】:

    根据您提供的链接中的 YAML 文件,YAML 文件 filebeat-daemonset.yaml 中的 daemonset 似乎取决于服务帐户 filebeat。所以在部署daemonset之前需要部署服务账号filebeat

    【讨论】:

      猜你喜欢
      • 2021-08-24
      • 2022-08-25
      • 2020-06-20
      • 2018-06-02
      • 2020-05-18
      • 2015-05-27
      • 1970-01-01
      • 1970-01-01
      • 2018-08-21
      相关资源
      最近更新 更多