<p>I am trying to find a way to disable <code>--basic-auth-file</code> on my cluster.</p>
<p>Can someone help me?</p>

<p>Based on your comments your are using kops to deploy a cluster. In kops case, you need to add the following lines to disable the --basic-auth-file flag. </p>

<pre><code>kops edit cluster --name &lt;clustername&gt; --state &lt;state_path&gt;

spec:
  kubeAPIServer:
    disableBasicAuth: true
</code></pre>

<p><em>spec</em> and <em>kubeAPIServer</em> is probably already present in your cluster config</p>

<p>To apply the change, you need to run</p>

<pre><code>kops update cluster --name &lt;clustername&gt; --state &lt;state_path&gt; &lt;--yes&gt;
</code></pre>

<p>and do a rolling upgrade</p>

<pre><code>kops update cluster --name &lt;clustername&gt; --state &lt;state_path&gt; &lt;--yes&gt;
</code></pre>

<p>If you run the commands without <em>--yes</em>, it will basically shows you what it is going to do, with <em>--yes</em> it will apply the changes/roll the cluster.</p>

<p>Sadly KOPS is a bit lacking documentation on what are the options you can use in the cluster config yaml, the best I could find is their API definition: 
<a href="https://github.com/kubernetes/kops/blob/master/pkg/apis/kops/componentconfig.go#L246" rel="nofollow noreferrer">https://github.com/kubernetes/kops/blob/master/pkg/apis/kops/componentconfig.go#L246</a></p>
