Unable to import kibana dashboard

I am trying to import a 1.3mb bashoard and am getting the following error

I set server.maxPayloadBytes to 8388608, here is my kibana manifest

apiVersion: kibana.k8s.elastic.co/v1beta1
kind: Kibana
metadata:
  name: kibana
spec:
  version: 7.4.1
  count: 1
  elasticsearchRef:
    name: "elastic"
  config:
    server.maxPayloadBytes: 8388608
  http:
    service:
      metadata:
        annotations:
          external-dns.alpha.kubernetes.io/hostname: kibana.prime.iad0.netskope.com
      spec:
        type: LoadBalancer # default is ClusterIP
    tls:
      selfSignedCertificate:
        disabled: true
  podTemplate:
    spec:
      volumes:
      - name: kibana-plugins
        emptyDir: {}
      - name: logtrail-configs
        configMap:
          name: log-trail
      containers:
      - name: kibana
        resources:
          limits:
            memory: 4Gi
        volumeMounts:
        - name: kibana-plugins
          mountPath: /usr/share/kibana/plugins
        - name: logtrail-configs
          mountPath: /usr/share/kibana/plugins/logtrail/logtrail.json
          subPath: logtrail.json
      initContainers:
      - name: install-plugins
        image: docker.elastic.co/kibana/kibana:7.4.1
        command:
        - sh
        - -c
        - bin/kibana-plugin install https://github.com/sivasamyk/logtrail/releases/download/v0.1.31/logtrail-7.4.1-0.1.31.zip
        volumeMounts:
        - name: kibana-plugins
          mountPath: /usr/share/kibana/plugins

what I think is odd is that once the pod spawns the value for maxPayLoadBytes seems to have been munged? is this perhaps what is causing my issue? it's set to maxPayloadBytes: 8.388608e+06 is this right?

kubectl exec -it kibana-kb-b865c898b-mzb72 -- cat config/kibana.yml 
elasticsearch:
  hosts: http://elastic-es-http.logging.svc:9200
  password: fgbvvrhw2xz2mh9smkmkl5qq
  ssl:
    certificateAuthorities: /usr/share/kibana/config/elasticsearch-certs/ca.crt
    verificationMode: certificate
  username: logging-kibana-kibana-user
server:
  host: "0"
  maxPayloadBytes: 8.388608e+06
  name: kibana
xpack:
  monitoring:
    ui:
      container:
        elasticsearch:
          enabled: true

Hi @jdambly, I tried to reproduce this with a collection of dashboards I exported that amounted to 1.2mb but could not reproduce the error your reported. I also tried to halve the default (so server.maxPayloadBytes: 524288) but was still able to import it.

I was able to reproduce that it converted the large int to scientific notation in the config though. I'm not sure this is an issue as at least in some cases, Kibana fails to start if it cannot parse that value successfully -- for instance if you make it into a string containing the number it fails with

FATAL Error: [server.maxPayload]: could not parse byte size value [8388608]. Value must be a safe positive integer.

So I'm not totally clear that it is failing to parse the scientific notation format.

I wonder if there's an issue with the dashboard that you are trying to import. There's a few things I can think of that might be useful to troubleshoot further.

I upgrade to kibana version 7.4.2 and that seems to have resolved the issue assuming I set the maxpayload, thanks for looking into this for me.