# Elasticsearch-Kibana- Deployment issues in Anthos on-prem K8s cluster

**URL:** <https://discuss.elastic.co/t/elasticsearch-kibana-deployment-issues-in-anthos-on-prem-k8s-cluster/343465>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Tags:** docker\
**Created:** [September 20, 2023, 1:44pm UTC](https://discuss.elastic.co/t/elasticsearch-kibana-deployment-issues-in-anthos-on-prem-k8s-cluster/343465 "2023-09-20T13:44:01Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![Sunile\_Manjee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunile_manjee/32/111461_2.png) [@Sunile\_Manjee](https://discuss.elastic.co/u/Sunile_Manjee)\
**Post date:** [October 11, 2023, 7:29pm UTC](https://discuss.elastic.co/t/elasticsearch-kibana-deployment-issues-in-anthos-on-prem-k8s-cluster/343465/21 "2023-10-11T19:29:12Z")

</div>

@Esakki just got back from my PTO. glad you got it working. did you use a different certs for ES and Kibana or do they use the same cert?

---

<div class="post-metadata">

**Author:** ![Sunile\_Manjee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunile_manjee/32/111461_2.png) [@Sunile\_Manjee](https://discuss.elastic.co/u/Sunile_Manjee)\
**Post date:** [October 11, 2023, 7:32pm UTC](https://discuss.elastic.co/t/elasticsearch-kibana-deployment-issues-in-anthos-on-prem-k8s-cluster/343465/22 "2023-10-11T19:32:57Z")

</div>

> [@Esakki](#):
>
> ), in browser the requests has been routed to either master or data nodes.

You can route search and ingest request to specific nodes via node affinity. I do that very thing via ElasticKonductor.

---

<div class="post-metadata">

**Author:** ![Esakki](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/esakki/32/126509_2.png) [@Esakki](https://discuss.elastic.co/u/Esakki)\
**Post date:** [October 12, 2023, 12:56pm UTC](https://discuss.elastic.co/t/elasticsearch-kibana-deployment-issues-in-anthos-on-prem-k8s-cluster/343465/23 "2023-10-12T12:56:12Z")

</div>

I raised different CSR for KIbana and elasticsearch erspectively and that resolved the issue.. and now all working..

The new requirement is to install ECK-CR IndexTemplate in my GKE on-prem k8s where I have my elasticsearch cluster..

I referred the below blogs/docs, I'm able to create the ECK-CR pod, and I created IndexTemplate yaml when I do kubectl create -f indextemplate.yaml, in my CR pod logs I can see that CR is unable to reach elasticsearch, and I'm getting 401 unauthorized error, I tried different ways but not working..

Note: My client don't want to create the indextemplate from Kibana (GUI) or using Elasticsearch API, they want it in a .yaml file... (From kibana GUI I'm able to create and using curl PUT cmd on the elastic API also working fine..

> <https://github.com/xco-sk/eck-custom-resources/blob/main/docs/cr_index_template.md>

> **[Managing Elasticsearch Resources in Kubernetes](https://betterprogramming.pub/managing-elasticsearch-resources-in-kubernetes-39b697908f4e)**
>
> How to deploy the Elasticsearch and Kibana in Kubernetes

---

<div class="post-metadata">

**Author:** ![Sunile\_Manjee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunile_manjee/32/111461_2.png) [@Sunile\_Manjee](https://discuss.elastic.co/u/Sunile_Manjee)\
**Post date:** [October 13, 2023, 4:35am UTC](https://discuss.elastic.co/t/elasticsearch-kibana-deployment-issues-in-anthos-on-prem-k8s-cluster/343465/24 "2023-10-13T04:35:07Z")

</div>

> [@Esakki](#):
>
> ent ways but not working..
> 
> Note: My client don't want to create the indextemplate from Kibana (GUI) or using Elasticsearch API, they want it in a .yaml file... (From kibana GUI I'm able to create and us

I'm not familiar with that CRD but it seems you need to `spec.targetInstance.name` based on the [Elasticsearch Instance](https://github.com/xco-sk/eck-custom-resources/blob/main/docs/cr_elasticsearch_instance.md) and [Kibana Instance](https://github.com/xco-sk/eck-custom-resources/blob/main/docs/cr_kibana_instance.md) CRDs.

---

<div class="post-metadata">

**Author:** ![Esakki](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/esakki/32/126509_2.png) [@Esakki](https://discuss.elastic.co/u/Esakki)\
**Post date:** [October 13, 2023, 9:51am UTC](https://discuss.elastic.co/t/elasticsearch-kibana-deployment-issues-in-anthos-on-prem-k8s-cluster/343465/25 "2023-10-13T09:51:45Z")

</div>

@Sunile_Manjee thank you , let me try this.

Kind Regards,  
Esakki

---

<div class="post-metadata">

**Author:** ![Esakki](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/esakki/32/126509_2.png) [@Esakki](https://discuss.elastic.co/u/Esakki)\
**Post date:** [October 13, 2023, 1:24pm UTC](https://discuss.elastic.co/t/elasticsearch-kibana-deployment-issues-in-anthos-on-prem-k8s-cluster/343465/26 "2023-10-13T13:24:36Z")

</div>

@Sunile_Manjee I tried that also not working.

Esakki Regards,  
Esakki

---

<div class="post-metadata">

**Author:** ![Sunile\_Manjee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunile_manjee/32/111461_2.png) [@Sunile\_Manjee](https://discuss.elastic.co/u/Sunile_Manjee)\
**Post date:** [October 13, 2023, 10:45pm UTC](https://discuss.elastic.co/t/elasticsearch-kibana-deployment-issues-in-anthos-on-prem-k8s-cluster/343465/27 "2023-10-13T22:45:04Z")

</div>

This is a 3rd party CRD. since it is not working based on following the docs, I recommend you open a issue the author here: [Issues · xco-sk/eck-custom-resources · GitHub](https://github.com/xco-sk/eck-custom-resources/issues)

---

<div class="post-metadata">

**Author:** ![Esakki](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/esakki/32/126509_2.png) [@Esakki](https://discuss.elastic.co/u/Esakki)\
**Post date:** [October 17, 2023, 4:35am UTC](https://discuss.elastic.co/t/elasticsearch-kibana-deployment-issues-in-anthos-on-prem-k8s-cluster/343465/28 "2023-10-17T04:35:34Z")

</div>

@Sunile_Manjee Yeah, raised, and waiting for their response..

> <https://github.com/xco-sk/eck-custom-resources/issues/66>
>
> Hello Experts, 
> 
> In our project we are using GKE Anthos On-Prem Kubernetes, wh…ere 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\](https://github.com/xco-sk/eck-custom-resources/assets/148078597/be4cb9c9-88e0-485e-a320-2792afdb4e67)
> 
> 
> 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

Is there any official doc that I can follow to achieve the same requirement?

I want to create custom resource to create Index-template(s) in my elasticsearch cluster.

Kind regards,  
Esakki

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 14, 2023, 4:36am UTC](https://discuss.elastic.co/t/elasticsearch-kibana-deployment-issues-in-anthos-on-prem-k8s-cluster/343465/29 "2023-11-14T04:36:00Z")

</div>

Closed on November 14, 2023, 4:36am UTC

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

[Previous page](https://discuss.elastic.co/t/elasticsearch-kibana-deployment-issues-in-anthos-on-prem-k8s-cluster/343465.md?page=1)
