簡體   English   中英

在 Azure Kubernetes 服務上部署時出現 Filebeat Demonset 錯誤

[英]Filebeat Demonset error while deploying on Azure Kubernetes services

我正在嘗試在 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": ""
}

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

根據您提供的鏈接中的 YAML 文件,似乎daemonset文件中的守護程序filebeat-daemonset.yaml取決於服務帳戶filebeat 因此,您需要在部署filebeat之前部署服務帳戶daemonset

在此處輸入圖像描述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM