<p>I have deployed <strong>istio</strong> in my <strong>eks</strong> cluster with <strong>demo</strong> profile. <strong>demo</strong> has <strong>kiali</strong> deployment with it. The access secret for <strong>kiali dashboard</strong> is ( <strong>username:admin</strong>,<strong>password:admin</strong> ).I was able to access my dashboard with this credentials. Then I created my own secrets. </p>

<pre><code>$ echo shajaltest | base64
$ c2hhamFsdGVzdAo=
</code></pre>

<p>Deleted the secrets for kiali.</p>

<pre><code>$ kubectl delete secrets kiali -n istio-system
</code></pre>

<p>Deployed the secrets again with this <strong>yaml</strong></p>

<pre><code>apiVersion: v1
kind: Secret
metadata:
  name: kiali
  namespace: istio-system
  labels:
    app: kiali
type: Opaque
data:
  username: c2hhamFsdGVzdAo=
  passphrase: c2hhamFsdGVzdAo=
</code></pre>

<p>After all of that I deleted the pod of kiali.
After that I can not access my dashboard with this username and password. <strong>What should I do ?</strong> </p>

<p>I also checked the secrets of kiali. It has updated with recent secret value. </p>

<p>Here is the log of <strong>kiali pod</strong>.</p>

<pre><code>I0408 18:30:30.194890       1 kiali.go:66] Kiali: Version: v1.15.1, Commit: 
3263b7692bcc06ad40292bedea5a9213e04aa9db
I0408 18:30:30.195179       1 kiali.go:205] Using authentication strategy [login]
I0408 18:30:30.195205       1 kiali.go:87] Kiali: Console version: 1.15.0
I0408 18:30:30.195212       1 kiali.go:286] Updating base URL in index.html with [/kiali]
I0408 18:30:30.195376       1 kiali.go:267] Generating env.js from config
I0408 18:30:30.197274       1 server.go:57] Server endpoint will start at [:20001/kiali]
I0408 18:30:30.197285       1 server.go:58] Server endpoint will serve static content from [/opt/kiali/console]
I0408 18:30:30.197297       1 metrics_server.go:18] Starting Metrics Server on [:9090]
I0408 18:30:30.197367       1 kiali.go:137] Secret is now available.
</code></pre>

Shajal Ahamed
<p>Have you tried to follow the <a href="https://istio.io/docs/tasks/observability/kiali/#create-a-secret" rel="nofollow noreferrer">istio documentation</a> about changing the credentials in kiali?</p>

<hr>

<p>I made a reproduction of your issue with below steps and everything worked just fine.</p>

<blockquote>
  <p>Enter a <strong>Kiali username</strong> when prompted:</p>
</blockquote>

<pre><code>KIALI_USERNAME=$(read -p 'Kiali Username: ' uval &amp;&amp; echo -n $uval | base64)
</code></pre>

<blockquote>
  <p>Enter a <strong>Kiali passphrase</strong> when prompted:</p>
</blockquote>

<pre><code>KIALI_PASSPHRASE=$(read -sp 'Kiali Passphrase: ' pval &amp;&amp; echo -n $pval | base64)
</code></pre>

<blockquote>
  <p><strong>To create a secret</strong>, run the following commands:</p>
</blockquote>

<pre><code>NAMESPACE=istio-system
</code></pre>

<hr>

<pre><code>cat &lt;&lt;EOF | kubectl apply -f -
apiVersion: v1
kind: Secret
metadata:
  name: kiali
  namespace: $NAMESPACE
  labels:
    app: kiali
type: Opaque
data:
  username: $KIALI_USERNAME
  passphrase: $KIALI_PASSPHRASE
EOF
</code></pre>

<p>And simply recreate the kiali pod with</p>

<pre><code>kubectl delete pod &lt;name_of_the_kiali_pod&gt; -n istio-system
</code></pre>

<hr>

<p><strong>EDIT</strong></p>

<p>As @Shajal Ahamed mentioned in comments the problem was absence of <code>-n</code>, if you want to use just echo, then use.</p>

<pre><code>echo -n username | base64
echo -n passphrase | base64
</code></pre>
