xco-sk / eck-custom-resources

Kubernetes operator for Indices, Index Templates, Roles, Users and other Elasticsearch and Kibana related resources.
Apache License 2.0
36 stars 8 forks source link

ECK Custom Resource Issue - 401 unauthorized Issue #66

Open Esakki1211 opened 1 year ago

Esakki1211 commented 1 year ago

Hello Experts,

In our project we are using GKE Anthos On-Prem Kubernetes, where we have deployed ElasticSearch and Kibana version 8.9.1, and they are up and running without any problem..

  1. I have separate DNS for Elasticsearch and Kibana, something like this, https://elasticsearch.uat.mydomain.com https://kibana.uat.mydomain.com, and I have separate certs for these two URLs, and I have configured all required steps and everything is working.. (I haven't used ECK to install elastic and kibana, but I created .yaml files for those and created the deployments)
  2. Now the next requirement is to install/deploy custom resources , I have followed the steps mentioned in this doc to deploy/install IndexTemplate but it's not working.. https://github.com/xco-sk/eck-custom-resources/blob/main/README.md

image

More Details, Once I executed those two helm command in the given document, custom resource operator pod got created (and it's completely looks fine, I mean no pod restarts and no error logs) in the same K8s namespace where I have deployed elasticsearch and Kibana.. and in the values.yaml I have updated my elasticsearch and kibana URLs with correct certs and secrets details, after that I created the Elasticsearchinstance and Indextemplate yamls as per the doc, once I executed the Indextemplate.yaml file I can see that the CR operator pod started restarting, also I can see the pod logs with above attached 401 error.. I verified the secrets and URLs all are looks fine, but not sure why it's throwing 401..

and one more thing, normally when I do curl to my elastisearch url like this "curl https://elasticsearch.uat.mydomain.com" it will give unauthorized error, but when I pass with creds like this "curl -u elastic:password https://elasticsearch.uat.mydomain.com" then this working fine,, so I'm confused may be the secrets that I used is not taking or may be it's not properly updated to the URL?

Kindy do the needful, I'm struck in this issue for more than 4 days now.

Kind Regards, Esakki

Esakki1211 commented 1 year ago

Hi All,

Can someone suggest me the possible solution for the above issue?

Kind regards, Esakki

an-tex commented 3 weeks ago

i have the same issue