# After K8s cluster was turned off for night Kibna "Username or password is incorrect"

**URL:** <https://discuss.elastic.co/t/after-k8s-cluster-was-turned-off-for-night-kibna-username-or-password-is-incorrect/337123>\
**Category:** Kibana\
**Tags:** elastic-stack-security\
**Created:** [June 28, 2023, 6:40pm UTC](https://discuss.elastic.co/t/after-k8s-cluster-was-turned-off-for-night-kibna-username-or-password-is-incorrect/337123 "2023-06-28T18:40:36Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bogdan\_Boyko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bogdan_boyko/32/122819_2.png) [@Bogdan\_Boyko](https://discuss.elastic.co/u/Bogdan_Boyko)\
**Post date:** [June 28, 2023, 6:40pm UTC](https://discuss.elastic.co/t/after-k8s-cluster-was-turned-off-for-night-kibna-username-or-password-is-incorrect/337123/1 "2023-06-28T18:40:36Z")

</div>

I have a problem with Kibana, when my Kubernetes cluster shuts down in the evening and turns back on in the morning, then I can't log in with the credentials that were valid yesterday. And when I delete the pod and it is rebuilt, the credentials are valid again, what's the problem?

Kibana is attached to Elasticsearch and to login to Kibana I use Elasticsearch login and password and they are present in the cluster even after shutting down and restarting the cluster. and at the same time, when logging in to Elasticsearch itself at localhost:9200, I get access correctly, with the same credentials that I tried before on Kiban.  
my log in kibana when I try vloginitis:  
// `{"log":"[2023-06-28T18:18:44.023+00:00][INFO][plugins.security.routes] Logging in with provider \"basic\" (basic)\n","stream":"stdout","time":"2023-06-28T18:18:44.024420008Z"}'`

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [June 28, 2023, 10:08pm UTC](https://discuss.elastic.co/t/after-k8s-cluster-was-turned-off-for-night-kibna-username-or-password-is-incorrect/337123/2 "2023-06-28T22:08:32Z")

</div>

> [@Bogdan\_Boyko](#):
>
> I have a problem with Kibana, when my Kubernetes cluster shuts down in the evening and turns back on in the morning, then I can't log in with the credentials that were valid yesterday. And when I delete the pod and it is rebuilt, the credentials are valid again, what's the problem?

How are you creating your cluster on Kubernetes? Does all your Elasticsearch nodes have persistent volume?

Also, how are you recreating it?

---

<div class="post-metadata">

**Author:** ![Bogdan\_Boyko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bogdan_boyko/32/122819_2.png) [@Bogdan\_Boyko](https://discuss.elastic.co/u/Bogdan_Boyko)\
**Post date:** [June 29, 2023, 12:26pm UTC](https://discuss.elastic.co/t/after-k8s-cluster-was-turned-off-for-night-kibna-username-or-password-is-incorrect/337123/3 "2023-06-29T12:26:31Z")

</div>

Kibana hasn't persistent volume but Elastic has it. For recreate i just delete the pod and when it is recreated I can login to Kibana

---

<div class="post-metadata">

**Author:** ![Bogdan\_Boyko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bogdan_boyko/32/122819_2.png) [@Bogdan\_Boyko](https://discuss.elastic.co/u/Bogdan_Boyko)\
**Post date:** [June 29, 2023, 12:27pm UTC](https://discuss.elastic.co/t/after-k8s-cluster-was-turned-off-for-night-kibna-username-or-password-is-incorrect/337123/4 "2023-06-29T12:27:03Z")

</div>

I use official helm chart of ELK stack

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [June 29, 2023, 12:38pm UTC](https://discuss.elastic.co/t/after-k8s-cluster-was-turned-off-for-night-kibna-username-or-password-is-incorrect/337123/5 "2023-06-29T12:38:08Z")

</div>

> [@Bogdan\_Boyko](#):
>
> I use official helm chart of ELK stack

Which version of the Stack are you using? Elastic does not public helm charts anymore.

Also, share the Elasticsearch logs when you start it and have this error.

---

<div class="post-metadata">

**Author:** ![Bogdan\_Boyko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bogdan_boyko/32/122819_2.png) [@Bogdan\_Boyko](https://discuss.elastic.co/u/Bogdan_Boyko)\
**Post date:** [June 29, 2023, 1:26pm UTC](https://discuss.elastic.co/t/after-k8s-cluster-was-turned-off-for-night-kibna-username-or-password-is-incorrect/337123/6 "2023-06-29T13:26:29Z")

</div>

artifacthub elasticsearch and kibana version 8.5.1

i have the same stack on another cluster but it is one without turning off at night and I don't have this problem.

I don't see any logs about this problem in the logs of Elasticsearch.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [June 29, 2023, 1:33pm UTC](https://discuss.elastic.co/t/after-k8s-cluster-was-turned-off-for-night-kibna-username-or-password-is-incorrect/337123/7 "2023-06-29T13:33:54Z")

</div>

> [@Bogdan\_Boyko](#):
>
> I don't see any logs about this problem in the logs of Elasticsearch.

Without any evidence it is pretty hard to troubleshoot it.

Next time you have this issue please get the logs for both Kibana and your Elasticsearch nodes.

If you can't login with the same credentials something change.

How are you configuring the credentials for your Kibana instance? You said you do not have a persistent volume for Kibana, but how will the new pod use the same credentials? I do not use k8s, so not sure how you would do that.

I would recommend that you set a persistent volume for Kibana as well.

---

<div class="post-metadata">

**Author:** ![Bogdan\_Boyko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bogdan_boyko/32/122819_2.png) [@Bogdan\_Boyko](https://discuss.elastic.co/u/Bogdan_Boyko)\
**Post date:** [June 29, 2023, 1:45pm UTC](https://discuss.elastic.co/t/after-k8s-cluster-was-turned-off-for-night-kibna-username-or-password-is-incorrect/337123/8 "2023-06-29T13:45:22Z")

</div>

Into values.yml of kibana helm chart is setted

''elasticsearchHosts: "elasticsearch-master:9200"  
elasticsearchCertificateSecret: elasticsearch-master-certs  
elasticsearchCertificateAuthoritiesFile: ca.crt  
elasticsearchCredentialSecret: elasticsearch-master-credentials''

and creds saved into secrets of k8s

---

<div class="post-metadata">

**Author:** ![Bogdan\_Boyko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bogdan_boyko/32/122819_2.png) [@Bogdan\_Boyko](https://discuss.elastic.co/u/Bogdan_Boyko)\
**Post date:** [June 29, 2023, 1:48pm UTC](https://discuss.elastic.co/t/after-k8s-cluster-was-turned-off-for-night-kibna-username-or-password-is-incorrect/337123/9 "2023-06-29T13:48:32Z")

</div>

And I don't have this issue today, but I had this issue for two latest months. I tried to fix it yesterday with chatGPT. Maybe something help to fix it. I will try tomorrow again. I let you know about it tomorrow.

---

<div class="post-metadata">

**Author:** ![Bogdan\_Boyko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bogdan_boyko/32/122819_2.png) [@Bogdan\_Boyko](https://discuss.elastic.co/u/Bogdan_Boyko)\
**Post date:** [July 17, 2023, 11:30am UTC](https://discuss.elastic.co/t/after-k8s-cluster-was-turned-off-for-night-kibna-username-or-password-is-incorrect/337123/10 "2023-07-17T11:30:23Z")

</div>

I cache this error again

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/c/6c475b247b177f49157d57789abd19b933b56f61.png)

I got just the next log Into logs Kibana when try to login:

```auto
[2023-07-17T11:25:55.363+00:00][INFO][plugins.security.routes] Logging in with provider "basic" (basic)

```

Into Elasticsearch logs, I don't see any logs which show trying to login

---

<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:** [August 14, 2023, 11:30am UTC](https://discuss.elastic.co/t/after-k8s-cluster-was-turned-off-for-night-kibna-username-or-password-is-incorrect/337123/11 "2023-08-14T11:30:39Z")

</div>

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