ECK Filebeat Association backend for kibana is not configured

When I start my filebeat, an error occurs Association backend for kibana is not configured
Association backend for Elasticsearch is not configured
kibana yaml file

apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
  annotations:
    association.k8s.elastic.co/es-conf: '{"authSecretName":"kibana-two-kibana-user","authSecretKey":"default-kibana-two-kibana-user","caCertProvided":true,"caSecretName":"kibana-two-kb-es-ca","url":"https://demo-es-http.default.svc:9200","version":"7.16.1"}'
    common.k8s.elastic.co/controller-version: 1.9.0
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"kibana.k8s.elastic.co/v1","kind":"Kibana","metadata":{"annotations":{},"name":"kibana-two","namespace":"default"},"spec":{"config":{"i18n.locale":"zh-CN","monitoring.ui.container.elasticsearch.enabled":true,"server.publicBaseUrl":"https://172.16.66.94:30651","xpack.fleet.agents.elasticsearch.host":"https://demo-es-http.default.svc:9200","xpack.fleet.agents.fleet_server.hosts":["https://fleet-server-agent-http.default.svc:8220"],"xpack.reporting.roles.enabled":"false","xpack.security.session.idleTimeout":0,"xpack.security.session.lifespan":0},"count":1,"elasticsearchRef":{"name":"demo"},"http":{"service":{"spec":{"ports":[{"name":"http","nodePort":30651,"port":5601,"protocol":"TCP","targetPort":5601}],"type":"NodePort"}}},"podTemplate":{"spec":{"containers":[{"env":[{"name":"NODE_OPTIONS","value":"--max-old-space-size=2048"}],"name":"kibana","resources":{"limits":{"cpu":1,"memory":"1Gi"},"requests":{"cpu":0.5,"memory":"0.2Gi"}}}]}},"version":"7.16.1"}}
  creationTimestamp: "2021-12-16T07:09:47Z"
  generation: 5
  name: kibana-two
  namespace: default
  resourceVersion: "44796722"
  selfLink: /apis/kibana.k8s.elastic.co/v1/namespaces/default/kibanas/kibana-two
  uid: 155cdffa-9359-4355-9816-3d16caf2236f
spec:
  config:
    i18n.locale: zh-CN
    monitoring.ui.container.elasticsearch.enabled: true
    server.publicBaseUrl: https://172.16.66.94:30651
    xpack.fleet.agents.elasticsearch.host: https://demo-es-http.default.svc:9200
    xpack.fleet.agents.fleet_server.hosts:
    - https://fleet-server-agent-http.default.svc:8220
    xpack.reporting.roles.enabled: "false"
    xpack.security.session.idleTimeout: 0
    xpack.security.session.lifespan: 0
  count: 1
  elasticsearchRef:
    name: demo
  enterpriseSearchRef:
    name: ""
  http:
    service:
      metadata: {}
      spec:
        ports:
        - name: http
          nodePort: 30651
          port: 5601
          protocol: TCP
          targetPort: 5601
        type: NodePort
    tls:
      certificate: {}
  monitoring:
    logs: {}
    metrics: {}
  podTemplate:
    metadata:
      creationTimestamp: null
    spec:
      containers:
      - env:
        - name: NODE_OPTIONS
          value: --max-old-space-size=2048
        name: kibana
        resources:
          limits:
            cpu: 1
            memory: 1Gi
          requests:
            cpu: 0.5
            memory: 0.2Gi
  version: 7.16.1
status:
  associationStatus: Established
  availableNodes: 1
  count: 1
  elasticsearchAssociationStatus: Established
  health: green
  selector: common.k8s.elastic.co/type=kibana,kibana.k8s.elastic.co/name=kibana-two
  version: 7.16.1

filebeat yaml file

kind: Beat
metadata:
  annotations:
    association.k8s.elastic.co/es-conf: '{"authSecretName":"filebeat-beat-user","authSecretKey":"default-filebeat-beat-user","caCertProvided":true,"caSecretName":"filebeat-beat-es-ca","url":"https://demo-es-http.default.svc:9200","version":"7.16.1"}'
    common.k8s.elastic.co/controller-version: 1.9.0
  creationTimestamp: "2021-12-17T02:24:27Z"
  generation: 2
  name: filebeat
  namespace: default
  resourceVersion: "45022890"
  selfLink: /apis/beat.k8s.elastic.co/v1beta1/namespaces/default/beats/filebeat
  uid: b88dab9d-14a1-4ccc-b403-5cd2ef3071dd
spec:
  config:
    filebeat:
      autodiscover:
        providers:
        - hints:
            default_config:
              paths:
              - /var/log/containers/*${data.kubernetes.container.id}.log
              type: container
            enabled: true
          node: ${NODE_NAME}
          type: kubernetes
    logging.json: true
    processors:
    - add_cloud_metadata: {}
    - add_host_metadata: {}
  daemonSet:
    podTemplate:
      metadata:
        creationTimestamp: null
      spec:
        automountServiceAccountToken: true
        containers:
        - env:
          - name: NODE_NAME
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
          name: filebeat
          resources: {}
          volumeMounts:
          - mountPath: /var/log/containers
            name: varlogcontainers
          - mountPath: /var/log/pods
            name: varlogpods
          - mountPath: /var/lib/docker/containers
            name: varlibdockercontainers
        dnsPolicy: ClusterFirstWithHostNet
        hostNetwork: true
        securityContext:
          runAsUser: 0
        serviceAccountName: filebeat
        terminationGracePeriodSeconds: 30
        volumes:
        - hostPath:
            path: /var/log/containers
          name: varlogcontainers
        - hostPath:
            path: /var/log/pods
          name: varlogpods
        - hostPath:
            path: /var/lib/docker/containers
          name: varlibdockercontainers
    updateStrategy: {}
  elasticsearchRef:
    name: demo
  kibanaRef:
    name: kibana-two
  type: filebeat
  version: 7.16.1
status:
  elasticsearchAssociationStatus: Established
  kibanaAssociationStatus: Pending
kubectl get event  --field-selector involvedObject.name=filebeat
LAST SEEN   TYPE      REASON                    OBJECT          MESSAGE
34m         Warning   AssociationError          beat/filebeat   Association backend for kibana is not configured
7m13s       Warning   AssociationError          beat/filebeat   Association backend for elasticsearch is not configured
7m13s       Normal    AssociationStatusChange   beat/filebeat   Association status changed from [] to [Pending]
7m13s       Warning   AssociationError          beat/filebeat   Association backend for kibana is not configured
7m13s       Normal    AssociationStatusChange   beat/filebeat   Association status changed from [] to [Established]

Found the answer, the name of the kibana service is defined as http, but in fact it should be https.
This is the log I saw from elastic-operator-0. thx

{"log.level":"error","@timestamp":"2021-12-17T02:46:16.934Z","log.logger":"manager.eck-operator.controller.beat-kibana-association-controller","message":"Reconciler error","service.version":"1.9.0+ab86a2b7","service.type":"eck","ecs.version":"1.4.0","name":"filebeat","namespace":"default","error":"no port named [https] in service [default/kibana-two-kb-http]","errorCauses":[{"error":"no port named [https] in service [default/kibana-two-kb-http]"}],"error.stack_trace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.6/pkg/internal/controller/controller.go:253\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.6/pkg/internal/controller/controller.go:214"}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.