<p>I want to enable anonymous authentication using <code>kops</code>, but it's default settings provides the <code>--anonymous-auth=false</code> options to <code>kube-apiserver</code>:</p>

<pre><code>/usr/local/bin/kube-apiserver --allow-privileged=true --anonymous-auth=false --apiserver-count=1 --authorization-mode=RBAC --basic-auth-file=/srv/kubernetes/basic_auth.csv --bind-address=0.0.0.0 --client-ca-file=/srv/kubernetes/ca.crt
</code></pre>

<p>How can I change this setting, either for my current cluster or by creating a new cluster?</p>

<p>You can ssh to master nodes and modify the <code>kube-apiserver.yaml</code> in <code>/etc/kubernetes/manifests</code> and add that flag.</p>

<pre><code>spec:
  containers:
  - command:
  - --anonymous-auth=true
</code></pre>

<p>Then you need to restart your kube-apiserver.</p>

<p>This could vary depending on what you are running in your masters. If something like docker you can do sudo systemctl restart docker or you might need to restart containerd if you are using it instead of docker systemctl restart containerd</p>

<p>Or if you want to just start the kube-apiserver you can do docker restart kube-apiserver or crictl stop kube-apiserver; crictl start kube-apiserver.</p>
