elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.65k stars 8.23k forks source link

Index Patterns can not be created via Loadbalancer in Kubernetes #29058

Open christiancloudical opened 5 years ago

christiancloudical commented 5 years ago

Kibana version: image: docker.elastic.co/kibana/kibana-oss:6.5.4 Elasticsearch version: docker.elastic.co/elasticsearch/elasticsearch-oss:6.5.4 Server OS version: CentOS-7 Browser version: Firefox / Chromium Original install method (e.g. download page, yum, from source, etc.): Kubectl Describe the bug:

We created a Kubernetes-Cluster with 6 Worker-Nodes. Kibana is running as single pod on one Host ES is running as three-node-cluster on three nodes Logshipper is fluentd Version: fluent/fluentd-kubernetes-daemonset:v1.3-debian-elasticsearch

When I access Kibana via external LoadBalancer or Ingress-Controller ( Endpoint is any Host in Cluster, access is managed by Kubernetes ) I am able to work with Kibana ( searching a.s.o.) but I can not create new index patterns unless the correct host is recieved via round-robbin-loadbalancer.

If I only add that special host to LoadBalancer, index patterns are created instantly.

I access Kibana from another Port, 5601 is just running internal in the container

It seems, that index pattern is created, but is not getting the "fields" section :

POST .kibana/_search
      {
        "_index" : ".kibana_2",
        "_type" : "doc",
        "_id" : "index-pattern:26f4bce0-1b14-11e9-bb22-03b5ccf9323c",
        "_score" : 1.0,
        "_source" : {
          "index-pattern" : {
            "title" : "logstash-*",
          },
          "type" : "index-pattern",
          "updated_at" : "2019-01-18T11:28:20.414Z"
        }
      },
      {
        "_index" : ".kibana_2",
        "_type" : "doc",
        "_id" : "index-pattern:8bad3460-1d89-11e9-a451-354973d0565f",
        "_score" : 1.0,
        "_source" : {
          "index-pattern" : {
            "title" : "logs*",

If I can provide you any more logs, let me know,

Thanks so far :D

christiancloudical commented 5 years ago
kibana.yaml -
apiVersion: v1
kind: Service
metadata:
  name: kibana
  namespace: kube-logging
  labels:
    app: kibana
spec:
  ports:
  - port: 5601
    name: "http"
  selector:
    app: kibana
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: kibana
  namespace: kube-logging
  labels:
    app: kibana
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kibana
  template:
    metadata:
      labels:
        app: kibana
    spec:
      containers:
      - name: kibana
        image: docker.elastic.co/kibana/kibana-oss:6.5.4
        resources:
          limits:
            cpu: 1000m
          requests:
            cpu: 100m
        env:
          - name: ELASTICSEARCH_URL
            value: http://elasticsearch:9200
        ports:
          - containerPort: 5601
ingress.yaml -
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  namespace: kube-logging
  name: kibana
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/rewrite-target: /
    kubernetes.io/ingress.global-static-ip-name: <ext-ip>
spec:
  backend:
    serviceName: kibana
    servicePort: 5601
elasticmachine commented 5 years ago

Pinging @elastic/kibana-operations

christiancloudical commented 5 years ago

Maybe - as info - I get following error at UI

KFetchError@http:///bundles/commons.bundle.js:1:603812 kfetch//</promise</</</<@http://<Floating-IP/bundles/commons.bundle.js:1:300157 step@http:///bundles/vendors.bundle.js:35:4010 verb/<@http:///bundles/vendors.bundle.js:35:3275 fulfilled@http:///bundles/vendors.bundle.js:35:2659 run@http:///bundles/vendors.bundle.js:42:276386 notify/<@http:///bundles/vendors.bundle.js:42:276673 flush@http:///bundles/vendors.bundle.js:83:58594

tylersmalley commented 5 years ago

Are you creating the index patterns from the UI? Is there anything in the Elasticsearch logs when attempting to create the index pattern?

christiancloudical commented 5 years ago

Yes I am creating the index pattern via UI, I hadn't founbd any information in elastic-logs but unforunatly... after running some days now... problem is solved by itself oO