<p>I can access kubernetes dashboard when run <code>kubectl proxy --port=8001</code> and able to sign in with the token that ı recieved from secret.</p>

<p><a href="http://localhost:8001/api/v1/namespaces/prod/services/http:kubernetes-dashboard:http/proxy/#/about?namespace=default" rel="nofollow noreferrer">http://localhost:8001/api/v1/namespaces/prod/services/http:kubernetes-dashboard:http/proxy/#/about?namespace=default</a></p>

<p>But when I expose my application via ingress I can also access the UI but I can not sign in with the token that ı can sign in for local. I am struggling to resolve this issue any help will be appreciated.</p>

<pre><code>{
 "jweToken": "",
 "errors": [
  {
   "ErrStatus": {
    "metadata": {},
    "status": "Failure",
    "message": "MSG_LOGIN_UNAUTHORIZED_ERROR",
    "reason": "Unauthorized",
    "code": 401
   }
  }
 ]
}
</code></pre>

<p>curl -v <a href="http://..../" rel="nofollow noreferrer">http://..../</a> -H "" Output</p>

<pre><code>&lt; HTTP/1.1 200 OK
&lt; Accept-Ranges: bytes
&lt; Cache-Control: no-store
&lt; Content-Type: text/html; charset=utf-8
&lt; Date: Tue, 18 Feb 2020 14:28:28 GMT
&lt; Last-Modified: Fri, 07 Feb 2020 13:15:14 GMT
&lt; Vary: Accept-Encoding
&lt; Content-Length: 1262
&lt; 
&lt;!--
Copyright 2017 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--&gt;
</code></pre>

<p>ingress logs</p>

<pre><code>8T14:21:42Z"}
{"level":"warning","msg":"Endpoints not available for prod/kubernetes-dashboard","time":"2020-02-18T14:21:42Z"}
{"level":"warning","msg":"Endpoints not available for prod/kubernetes-dashboard","time":"2020-02-18T14:21:43Z"}
{"level":"warning","msg":"Endpoints not available for prod/kubernetes-
</code></pre>

semural
<blockquote>
  <p>When I expose my application via ingress I can also access the UI but I can not sign in with the token that I can sign in for local.</p>
</blockquote>

<p>According to <a href="https://github.com/kubernetes/dashboard/blob/master/docs/user/accessing-dashboard/1.7.x-and-above.md" rel="nofollow noreferrer">Kubernetes Dashboard</a> documentation, since version 1.7.x (2017) you can still access dashboard via HTTP the same way <a href="https://github.com/kubernetes/dashboard/blob/master/docs/user/accessing-dashboard/1.6.x-and-below.md" rel="nofollow noreferrer">older versions does</a> when doing with localhost.</p>

<p>But when you choose to expose it:</p>

<blockquote>
  <p>Dashboard should not be exposed publicly over HTTP. For domains accessed over HTTP it will not be possible to sign in. Nothing will happen after clicking Sign in button on login page.</p>
</blockquote>

<p>In order to expose your dashboard you need to configure HTTPS access.
You mentioned in the comments you are running Kubernetes On Premise and that you wish to access the dashboard via NodeIP.</p>

<p><strong>In this case follow: <a href="https://github.com/kubernetes/dashboard/blob/master/docs/user/accessing-dashboard/1.7.x-and-above.md#nodeport" rel="nofollow noreferrer">Accessing Dashboard via NodePort</a>.</strong></p>

<p>Remember that instead of accessing <code>https://&lt;master-ip&gt;:&lt;nodePort&gt;</code> you should access <code>https://&lt;node-ip&gt;:&lt;nodePort&gt;</code> of the node which dashboard is installed.</p>

<p>If you have any doubts let me know in the comments and I'll help you.</p>
