<p>The official documentation of kubernetes (<a href="https://kubernetes.io/docs/reference/access-authn-authz/authentication/" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/access-authn-authz/authentication/</a>) states at some point: &quot;3. Call Kubectl with --token being the id_token OR add tokens to .kube/config&quot; (just search for mentioned phrase in the provided doc url to get the context).</p>
<p><a href="https://i.stack.imgur.com/uANTH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uANTH.png" alt="kubernetes doc" /></a></p>
<p>Can anyone give me example where can I &quot;add tokens to .kube/config&quot; directly?</p>
<p>I am in a scenario, when it is needed for me, I can access my cluster with --token inline option but I need to go with adding it to .kube/config.</p>
<p>I am trying to do sth like this but doesn't work (still need to add --token inline option, doesn't work without it):</p>
<pre><code>users:
  - user:
      token: &gt;-
        ey...........
</code></pre>

supertramp
<p>Yeah... yellow duck works... 5 sec after posting question I noticed that the &quot;context&quot; stuff is the key factor here, so the user of clyster need to match the name of user in users (I was missing the &quot;name&quot; filed for my user, matching the correct cluster context...), e.g.:</p>
<pre><code>users:
  - name: shoot-x
    user:
      token: &gt;-
        ey
</code></pre>
