<p>I have Kubernetes running on a VM on my dev box.  I want to view the Kubernetes dashboard from the VM host.  When I run the following command:</p>

<pre><code>kubectl proxy --address 0.0.0.0 --accept-hosts ^/.*
</code></pre>

<p>When I try to access the dashboard I get an unauthorized error.  </p>

<p>What am I missing?</p>

<p>The --accept-hosts access control is for checking of the <em>hostname</em>, so it won't start with a / (slash). You need to do:</p>

<pre><code>kubectl proxy --address 0.0.0.0 --accept-hosts '.*'
</code></pre>

<p>(Make sure you shell escape the .* as it may match files in the current directory!)</p>

<p>More information at: <a href="https://kubernetes.io/docs/user-guide/kubectl/kubectl_proxy/" rel="noreferrer">https://kubernetes.io/docs/user-guide/kubectl/kubectl_proxy/</a></p>
