<p>I am following a simple Kuberentes Minikube tutorial on Linux Mint 18.3, trying to to create a volume from the following get started tutorial :</p>

<p><a href="https://kubernetes.io/docs/tasks/run-application/run-single-instance-stateful-application/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/run-application/run-single-instance-stateful-application/</a></p>

<pre><code>minikube start --vm-driver=virtualbox
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Loading cached images from config file.

kubectl config use-context minikube
Switched to context "minikube"

kubectl create -f https://k8s.io/docs/tasks/run-application/mysql-pv.yaml
error: You must be logged in to the server (the server has asked for the client to provide credentials)
</code></pre>

<p>Why do I receive that error ? Searched thoroughly through the docs and github but could not find an answer.</p>

James Roeiter
<p>I could successfully try out the above example in minikube v0.23.0 with Kuberebtes version 1.8. But the reason for failing in v1.10 as I guess is the default Authentication and Authorization to Kubelet's API is not set properly. You should set legacy default values to the KubeletConfiguration to preserve the command line API. </p>

<p>This is the Kubernetes source snippet that sets up those legacy defaults.
<a href="https://github.com/kubernetes/kubernetes/blob/de8cc313554b7f7d41509ca620f71439cd8729eb/cmd/kubelet/app/options/options.go#L281-L293" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/blob/de8cc313554b7f7d41509ca620f71439cd8729eb/cmd/kubelet/app/options/options.go#L281-L293</a></p>

<p>Running the below command should set those values: </p>

<pre><code>minikube start --extra-config=kubelet.Authentication.Anonymous.Enabled=true 
    --extra-config=kubelet.Authentication.Webhook.Enabled=false 
    --extra-config=kubelet.Authorization.Mode=AlwaysAllow
</code></pre>
