<p>I'd like to confirm information of the authenticated user and assigned role and assigned cluster role. How can I do it?</p>

kawty
<blockquote>
  <p>information of the authenticated user</p>
</blockquote>

<p>When you see <a href="https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#define-clusters-users-and-contexts" rel="nofollow noreferrer">Define clusters, users, and contexts</a>, you realize you need to get the information associated with a defined <em>context</em>.</p>

<pre><code>kubectl config --kubeconfig=config-demo use-context dev-frontend
kubectl config --kubeconfig=config-demo view --minify
</code></pre>

<blockquote>
  <p>The output shows configuration information associated with the dev-frontend context:</p>
</blockquote>

<pre><code>apiVersion: v1
clusters:
- cluster:
    certificate-authority: fake-ca-file
    server: https://1.2.3.4
  name: development
contexts:
- context:
    cluster: development
    namespace: frontend
    user: developer
  name: dev-frontend
current-context: dev-frontend
kind: Config
preferences: {}
users:
- name: developer
  user:
    client-certificate: fake-cert-file
    client-key: fake-key-file
</code></pre>

<blockquote>
  <p>assigned role and assigned cluster role. </p>
</blockquote>

<p>You can list roles for all users or clusters, but you still need to parse the result to get the one for <em>a</em> user or <em>a</em> cluster.<br>
Example: "<a href="https://stackoverflow.com/q/43186611/6309">kubectl and seeing (cluster)roles assigned to subjects</a>".</p>
