Error from server (NotFound): the server could not find the requested resource

2/25/2020

I tried to create a new pod:

kubectl apply -f first-pod.yaml

Facing an issue: enter image description here

I have installed new version of kubectl 1.17:

curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.17.0/bin/windows/amd64/kubectl.exe

Installed version check:

enter image description here

404 error with kubectl apply -f first-pod.yaml -v=8: img3

-- user10134261
kubernetes

2 Answers

2/25/2020

kubectl is supported within one minor version (older or newer) of kube-apiserver. Example:

  • kube-apiserver is at 1.15
  • kubectl is supported at 1.16, 1.15, and 1.14

Kubernetes versions are expressed as x.y.z, where x is the major version, y is the minor version, and z is the patch version.

Since your client is on version is 1.9.2 it's a huge version gap which can cause many issues.

This is the link to install the 1.15 kubectl version for Windows, Linux or MacOS.

If you need any further help just let me know!

-- willrof
Source: StackOverflow

2/26/2020

issue has resolved. The problem is due to the version 1.9 , unable to set a new version even if i download it. version 1.9 had installed along with docker installer very long back.

issue resolved by

  • upgrading docker
  • removed the path of docker
  • download new kubectl , setting the path of new version & installed minikube
  • set path of upgraded docker version.

Kubectl version

-- user10134261
Source: StackOverflow