<p>I have successfully set up a kubernetes cluster on AWS using <code>kops</code> and the following commands:</p>

<pre><code>$ kops create cluster --name=&lt;my_cluster_name&gt; --state=s3://&lt;my-state-bucket&gt; --zones=eu-west-1a --node-count=2 --node-size=t2.micro --master-size=t2.small --dns-zone=&lt;my-cluster-dns&gt;

$ kops update cluster &lt;my-cluster-name&gt; --yes
</code></pre>

<p>When accessing the dashboard, I am prompted to either enter a token or </p>

<blockquote>
  <p>Please select the kubeconfig file that you have created to configure access to the cluster.</p>
</blockquote>

<p>When creating the cluster, <code>~/.kube/config</code> was created that has the following form:</p>

<pre><code>apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: 
    &lt;some_key_or_token_here&gt;
    server: https://api.&lt;my_cluster_url&gt;
  name: &lt;my_cluster_name&gt;
contexts:
- context:
    cluster: &lt;my_cluster_name&gt;
    user: &lt;my_cluster_name&gt;
  name: &lt;my_cluster_name&gt;
current-context: &lt;my_cluster_name&gt;
kind: Config
preferences: {}
users:
- name: &lt;my_cluster_name&gt;
  user:
    as-user-extra: {}
    client-certificate-data:
    &lt;some_key_or_certificate&gt;
    client-key-data:
    &lt;some_key_or_certificate&gt;
    password: &lt;password&gt;
    username: admin
- name:&lt;my-cluster-url&gt;-basic-auth
  user:
    as-user-extra: {}
    password: &lt;password&gt;
    username: admin
</code></pre>

<p>Why when pointing the kubernetes ui to the above file, I get </p>

<blockquote>
  <p>Authentication failed. Please try again. </p>
</blockquote>

<p>I tried the same and had the same problem. It turns out that kops creates a certificate based authentication. Certificate based authentication can't be used on the web UI interface. Instead, I tried using the token based authentication. Next question, where do you find the token?</p>

<pre><code>kubectl describe secret
</code></pre>

<p>This will show you the default token for the cluster. I assume this is very bad security practice but if you're using the UI to improve your learning and understanding then it will get you moving in the right direction.</p>

<p><a href="https://github.com/kubernetes/dashboard/wiki/Access-control" rel="noreferrer">This Dashboard wiki page is about authentication.</a> That's where I discovered how to do it.</p>
