<p>I was install kubectl by the official instruction, but when i've try <code>kubectl apply -f</code> i've get &quot; <code>Error from server (NotFound): the server could not find the requested resource </code>&quot; error.</p>
<p>The Internet says that it's because the Client and Server Version of kubectl is different.</p>
<p>I'll check the verision of kubectl:</p>
<p><code>Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;17&quot;, GitVersion:&quot;v1.17.2&quot;, GitCommit:&quot;59603c6e503c87169aea6106f57b9f242f64df89&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2020-01-18T23:30:10Z&quot;, GoVersion:&quot;go1.13.5&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;} </code></p>
<p><code>Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;6&quot;, GitVersion:&quot;v1.6.4&quot;, GitCommit:&quot;d6f433224538d4f9ca2f7ae19b252e6fcb66a3ae&quot;, GitTreeState:&quot;dirty&quot;, BuildDate:&quot;2017-06-22T04:31:09Z&quot;, GoVersion:&quot;go1.7.5&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;} </code></p>
<p>If it is official install, why version so different? And is it really problem of this error?</p>
<p>I also have docker, docker-compose and minikube.</p>
<p>OS Linux Mint</p>

<p>Posting Community Wiki as root cause was mentioned by @David Maze </p>

<p>As was pointed in the comments, your versions are very different. 
<a href="https://www.infoq.com/news/2017/07/kubernetes-1.7" rel="nofollow noreferrer">Kubernetes 1.7</a> was realesed ~ <strong>July 2017</strong>, when <a href="https://kubernetes.io/docs/setup/release/notes/" rel="nofollow noreferrer">Kubernetes 1.17</a> was released in <strong>Jan 2020</strong> (almost 2,5 year difference). Another thing is version of <code>Docker</code> and <code>Minikube</code> must support <code>kubernetes</code> version.</p>

<p>As Example, if you would like to run Kubernetes 1.6.3 on latest <code>Minikube</code> version, error occurs.</p>

<pre><code>minikube v1.7.3 on Ubuntu 16.04
✨  Using the none driver based on user configuration
⚠️  Specified Kubernetes version 1.6.4 is less than the oldest supported version: v1.11.10
💣  Sorry, Kubernetes 1.6.4 is not supported by this release of minikube
</code></pre>

<p>Also, there was huge change in <code>apiVersions</code> between version 1.15 and 1.16. More details can be found <a href="https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/" rel="nofollow noreferrer">here</a>.</p>

<p>In <a href="https://stackoverflow.com/questions/38230452/what-is-command-to-find-detailed-information-about-kubernetes-masters-using-ku">this Stackoverflow thread</a> was explained what is shown in <code>kubectl version</code>. </p>

<blockquote>
  <p>The second line ("Server Version") contains the apiserver version.</p>
</blockquote>

<p>As for example <code>Network Policy API</code> was introduced in Kubernetes 1.7, so if you would like to use it in 1.6, you will get error as API cannot recognize it.</p>

<p>I've reproduced your issue.</p>

<pre><code>minikube:~$ kubectl version
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.3", GitCommit:"06ad960bfd03b39c8310aaf92d1e7c12ce618213", GitTreeState:"clean", BuildDate:"2020-02-11T18:14:22Z", GoVersion:"go1.13.6", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.3", GitCommit:"0480917b552be33e2dba47386e51decb1a211df6", GitTreeState:"dirty", BuildDate:"2017-05-12T10:50:10Z", GoVersion:"go1.7", Compiler:"gc", Platform:"linux/amd64"}
minikube:~$ kubectl get pods
Error from server (NotAcceptable): the server was unable to respond with a content type that the client supports (get pods)
minikube:~$ kubectl get nodes
Error from server (NotAcceptable): the server was unable to respond with a content type that the client supports (get nodes)
minikube:~$ kubectl run nginx --image=nginx
WARNING: New generator "deployment/apps.v1" specified, but it isn't available. Falling back to "deployment/apps.v1beta1".
kubectl run --generator=deployment/apps.v1 is DEPRECATED and will be removed in a future version. Use kubectl run --generator=run-pod/v1 or kubectl create instead.
error: no matches for kind "Deployment" in version "apps/v1"
</code></pre>

<p>As I mentioned before, <code>Network Policy</code> was introduced in 1.7. When you will try apply <a href="https://kubernetes.io/docs/concepts/services-networking/network-policies/#networkpolicy-resource" rel="nofollow noreferrer">this config</a> from Official Kubernetes docs, it will show the same error you have.</p>

<pre><code>minikube:~$ kubectl apply -f network.yaml 
Error from server (NotFound): the server could not find the requested resource.
</code></pre>

<p>Most recommended way is to install newest versions of docker, kubernetes and minikube (security and newest features) based on <a href="https://docs.docker.com/install/linux/docker-ce/ubuntu/" rel="nofollow noreferrer">Docker docs</a> and <a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/" rel="nofollow noreferrer">Kubernetes kubectl docs</a> and <a href="https://minikube.sigs.k8s.io/docs/start/linux/" rel="nofollow noreferrer">Minikube</a>. </p>

<p>Another option is to downgrade all components.</p>
