<p>I have a problem with minikube
when I want to create deployment manifest files, I receive an error
when I write this code:
<code>minikube kubectl create -f .</code>
I got this Error:</p>
<p>Error: unknown shorthand flag: 'f' in -f
See 'minikube kubectl --help' for usage.</p>
<p>but not only this, I try to write another command but again same error happening</p>
<p><code>minikube kubectl delete daemonsets,replicasets,services,deployments,pods,rc,pvc --all </code>
Error: unknown flag: --all
See 'minikube kubectl --help' for usage.</p>
<p>please help me.
thanks</p>

<p>AFAIK, --all is not a valid flag. Valid flag is --all-namespaces or just -A.</p>
<p>However, &quot;kubectl delete&quot; does not take -A as it needs the resource name for deletion.</p>
<p>To accomplish what you are trying to do you will have to write a loop to delete the objects 1 by one using</p>
<pre><code>kubectl get daemonsets,replicasets,services,deployments,pods,rc,pvc -A --no-headers | while read line; do 
    namespace=$(echo $line | awk '{print $1}')
    resource=$(echo $line | awk '{print $2}')
    kubectl delete ${resource} -n ${namespace}
done
</code></pre>
<p><strong>Execution - BE extremely careful with this as it will delete all queried resources in all namespaces including those in kube-system namespace</strong>:</p>
<pre><code>controlplane $ kubectl get daemonsets,replicasets,services,deployments,pods,rc,pvc -A --no-headers | while read line; do 
&gt;     namespace=$(echo $line | awk '{print $1}')
&gt;     resource=$(echo $line | awk '{print $2}')
&gt;     kubectl delete ${resource} -n ${namespace}
&gt; done
daemonset.extensions &quot;kube-keepalived-vip&quot; deleted
daemonset.extensions &quot;kube-proxy&quot; deleted
daemonset.extensions &quot;weave-net&quot; deleted
replicaset.extensions &quot;coredns-fb8b8dccf&quot; deleted
replicaset.extensions &quot;katacoda-cloud-provider-d5cb9d656&quot; deleted
service &quot;kubernetes&quot; deleted
service &quot;kube-dns&quot; deleted
deployment.extensions &quot;coredns&quot; deleted
deployment.extensions &quot;katacoda-cloud-provider&quot; deleted
</code></pre>
