I am deploying ECK on GKE in a private Kubernetes cluster. That cluster has the only service which will talk to Elasticsearch. So I don't need to have any https or user:password authentication. All I want is a simple clusterIP service which can be directly accessed by the service within the kubernetes cluster.
Please let me know how to do that.
TLS can be disabled as explained here: https://www.elastic.co/guide/en/cloud-on-k8s/0.9/k8s-accessing-elastic-services.html#k8s-disable-tls.
spec: http: tls: selfSignedCertificate: disabled: true
Basic authentication can be bypassed by enabling anonymous access: https://www.elastic.co/guide/en/elastic-stack-overview/7.4/anonymous-access.html.
spec: nodes: - nodeCount: 1 config: xpack.security.authc: anonymous: username: anonymous roles: superuser authz_exception: false
Even in a private cluster, we don't recommend to turn off these security layers.
Obviously, it is up to you to make the decision
How does this apply to Kibana? I've tried applying the settings above to my elasticsearch deployment, as well as the following on my Kibana deployment:
config: xpack.security.enabled: false
This causes the Kibana pods to get stuck on startup "Optimizing and caching bundled". Re-enabling xpack security causes them to be able to start up again.
Tried disabling TLS. It says:
Error from server (TLS cannot be disabled for Elasticsearch currently): error when creating "elasticsearch.yaml": admission webhook "validation.elasticsearch.elastic.co" denied the request: TLS cannot be disabled for Elasticsearch currently
Disabling xpack on Kibana forces replaying the optimization process responsible for generating JS bundles for all of the installed plugins.
This optimization process is very CPU/memory intensive and can take up to several minutes to complete depending on the underlying hardware.
I tested on my side and with the default Kibana resources, the Kibana pod is OOMKilled.
You can give more memory to your Kibana instance(s) to speed up this process. This is documented here: https://www.elastic.co/guide/en/cloud-on-k8s/master/k8s-managing-compute-resources.html#k8s-compute-resources-kibana-and-apm.
By increasing the memory limit to 4Gi, it took 83s for me.
apiVersion: kibana.k8s.elastic.co/v1beta1 kind: Kibana metadata: name: quickstart spec: version: 7.4.0 count: 1 elasticsearchRef: name: quickstart config: xpack.security.enabled: false podTemplate: spec: containers: - name: kibana resources: limits: memory: 4Gi