Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubectl describe ingress not working (1.15.0 against 1.12.7 server) #675

Closed
dustin-decker opened this issue Jul 9, 2019 · 22 comments
Closed

Comments

@dustin-decker
Copy link

$ k get ingress some-app
NAME          HOSTS                       ADDRESS   PORTS     AGE
some-app   some-app.domain.com            80, 443   4m58s

$ k describe ingress some-app
Error from server (NotFound): the server could not find the requested resource
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-19T16:40:16Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"12+", GitVersion:"v1.12.7-gke.25", GitCommit:"d4c79083ab6dea5d26ef4ed8d50b145268349bc3", GitTreeState:"clean", BuildDate:"2019-06-22T16:10:31Z", GoVersion:"go1.10.8b4", Compiler:"gc", Platform:"linux/amd64"}

It works if I downgrade kubectl to 1.12.7

@dustin-decker
Copy link
Author

dustin-decker commented Jul 9, 2019

kubernetes/kubernetes#74057 seems to be related.

kube-apiserver logs indicate that get uses the extensions/v1beta1 api, and describe uses the networking.k8s.io/v1beta1 api:

I0709 01:37:46.517128       1 wrap.go:47] GET /apis/extensions/v1beta1/namespaces/some-namespace/ingresses/some-app: (5.16454ms) 200 [kubectl/v1.15.0 (linux/amd64) kubernetes/e8462b5 52.11.64.245:51960]
I0709 01:37:46.569519       1 wrap.go:47] GET /apis/networking.k8s.io/v1beta1/namespaces/some-namespace/ingresses/some-app: (576.366µs) 404 [kubectl/v1.15.0 (linux/amd64) kubernetes/e8462b5 52.11.64.245:51960]

@dustin-decker
Copy link
Author

This is the yaml output of the resource (using the deprecated ingress):

$ k get ingress some-app -o yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
  creationTimestamp: "2019-07-09T01:32:45Z"
  generation: 1
  labels:
    heritage: isopod
  name: some-app
  namespace: some-namespace
  resourceVersion: "148136283"
  selfLink: /apis/extensions/v1beta1/namespaces/some-namespace/ingresses/some-app
  uid: 73a301b6-a1e9-11e9-87fe-42010ad40009
spec:
  rules:
  - host: some-app.domain.com
    http:
      paths:
      - backend:
          serviceName: some-app
          servicePort: 8200
        path: /
  tls:
  - hosts:
    - some-app.domain.com
status:
  loadBalancer:
    ingress:
    - {}

@mirzakhalov
Copy link

Same problem! Version 1.12.7 works fine.

@ironmike-au
Copy link

I also encountered this problem running client 1.15.0 against a 1.13.7-gke.8 server:

Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-20T04:49:16Z", GoVersion:"go1.12.6", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.7-gke.8", GitCommit:"7d3d6f113e933ed1b44b78dff4baf649258415e5", GitTreeState:"clean", BuildDate:"2019-06-19T16:37:16Z", GoVersion:"go1.11.5b4", Compiler:"gc", Platform:"linux/amd64"}

Downgrading to client 1.14.3 solved it:

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/fcb6cce3bdd37db3c53c2fcbdf9a47671a592c96/Formula/kubernetes-cli.rb

@seans3
Copy link
Contributor

seans3 commented Jul 16, 2019

Please note that Kubernetes version skew policy is to provide a kubectl that is guaranteed to work against an API Server that is +/- 1 version. So for the initial scenario of a 1.12 API Server, kubectl version 1.11, 1.12, and 1.13 are guaranteed to work. Closing this issue.

/close

@k8s-ci-robot
Copy link
Contributor

@seans3: Closing this issue.

In response to this:

Please note that Kubernetes version skew policy is to provide a kubectl that is guaranteed to work against an API Server that is +/- 1 version. So for the initial scenario of a 1.12 API Server, kubectl version 1.11, 1.12, and 1.13 are guaranteed to work. Closing this issue.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@clehene
Copy link

clehene commented Jul 20, 2019

@seans3 perhaps a version compatibility warning would be useful to avoid time spent troubleshooting this..

@Prakashreddy134
Copy link

@seans3: Closing this issue.

Hi,
I'm getting "Error from server (NotFound): the server could not find the requested resource" while running describe ingress command . Client and server versions is v1.15.0 ,v1.13.6
Please help me.

@Prakashreddy134
Copy link

Hi,
I'm getting "Error from server (NotFound): the server could not find the requested resource" while running describe ingress command . Client and server versions is v1.15.0 ,v1.13.6
Please help me.

@demisx
Copy link

demisx commented Aug 2, 2019

@Prakashreddy134 Try matching your kubectl version to your server version.

@BenjaminSchiborr
Copy link

@demisx, how would you best handle multiple Kubernetes clusters on different versions if you have to match kubectl client to the server version?

@ebn-rec
Copy link

ebn-rec commented Aug 2, 2019

@demisx I think you should reopen this. Users are likely going to have the most recent kubectl version and maintaining old version is not a viable solution.

@demisx
Copy link

demisx commented Aug 2, 2019

@BenjaminSchiborr Perhaps, via different docker containers?

@ebn-rec I can't reopen this issue, since I am neither the author, not a member of this project with sufficient rights to do so. I just ran into this issue myself today and matching kubectl version to the server version fixed the problem.

@vrobert78
Copy link

We have clusters on GKE in the last stable version v1.13.7-gke.19.

Our workstation are on Ubuntu 18.04.3 LTS, we use the repo "deb http://packages.cloud.google.com/apt cloud-sdk-bionic main" for gcloud and kubectl.
Kubectl is in v1.15.3.

Could you re-open this issue please ?

@noeljackson
Copy link

Same situation. Details below:

$ kubectl describe ingresses.extensions 
Error from server (NotFound): the server could not find the requested resource

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.2", GitCommit:"f6278300bebbb750328ac16ee6dd3aa7d3549568", GitTreeState:"clean", BuildDate:"2019-08-05T09:23:26Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"12+", GitVersion:"v1.12.8-gke.10", GitCommit:"f53039cc1e5295eed20969a4f10fb6ad99461e37", GitTreeState:"clean", BuildDate:"2019-06-19T20:48:40Z", GoVersion:"go1.10.8b4", Compiler:"gc", Platform:"linux/amd64"}

@lindhe
Copy link

lindhe commented Aug 28, 2019

Why not display a warning, if the client and server versions don't match?

@seans3
Copy link
Contributor

seans3 commented Aug 28, 2019

Adding a warning for violating the support window is a great suggestion. I suggest we move this discussion over to this new issue: #709

@advissor
Copy link

Will leave it here for those who might struggle :

  1. Verify client & server versions of kubectl by
    kubectl version
  2. Check the skew policy and select appropriate client binary for download
    https://kubernetes.io/docs/tasks/tools/install-kubectl/
  3. Download the binary with curl for example > chmod > move
    Like here : https://kubernetes.io/docs/tasks/tools/install-kubectl/

@gbenmansour
Copy link

I have the same problem. Below the output of kubectl version:

[root@nxdh-cloud] app # kubectl version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.3", GitCommit:"2d3c76f9091b6bec110a5e63777c332469e0cba2", GitTreeState:"clean", BuildDate:"2019-08-19T11:13:54Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"12+", GitVersion:"v1.12.10-eks-825e5d", GitCommit:"825e5de08cb05714f9b224cd6c47d9514df1d1a7", GitTreeState:"clean", BuildDate:"2019-08-18T03:58:32Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}

Why the issue is closed ?

@advissor
Copy link

advissor commented Sep 2, 2019

I have the same problem. Below the output of kubectl version:

[root@nxdh-cloud] app # kubectl version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.3", GitCommit:"2d3c76f9091b6bec110a5e63777c332469e0cba2", GitTreeState:"clean", BuildDate:"2019-08-19T11:13:54Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"12+", GitVersion:"v1.12.10-eks-825e5d", GitCommit:"825e5de08cb05714f9b224cd6c47d9514df1d1a7", GitTreeState:"clean", BuildDate:"2019-08-18T03:58:32Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}

Why the issue is closed ?

Issue is closed , because there is no bug.
This suppose to work like this and compatible client<>server versions are mentioned in skew policy
In your case Client v1.15.3 -> Server v1.12.10-eks-825e5d
Basically, this is out of compatibility. What you can do in order to fix the issue is to downgrade the client to v1.13.10 for example. This should work

@vrobert78
Copy link

Hi,

is there a way to install via apt-get an old version of kubectl ?

I've tried to install the 1.13.7, but it doesn't work:

apt-get install kubectl=1.13.7-00
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
E: La version « 1.13.7-00 » de « kubectl » n'a pu être trouvée
apt-cache policy kubectl
kubectl:
  Installé : 1.15.3-00
  Candidat : 1.15.3-00
 Table de version :
 *** 1.15.3-00 500
        500 http://packages.cloud.google.com/apt cloud-sdk-bionic/main amd64 Packages
        100 /var/lib/dpkg/status

Do you know how to contact a person in charge of packages.cloud.google.com/apt ?
It could be very interesting that they maintain multiple version.

@advissor
Copy link

advissor commented Sep 3, 2019

Hi,

is there a way to install via apt-get an old version of kubectl ?

I've tried to install the 1.13.7, but it doesn't work:

apt-get install kubectl=1.13.7-00
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
E: La version « 1.13.7-00 » de « kubectl » n'a pu être trouvée
apt-cache policy kubectl
kubectl:
  Installé : 1.15.3-00
  Candidat : 1.15.3-00
 Table de version :
 *** 1.15.3-00 500
        500 http://packages.cloud.google.com/apt cloud-sdk-bionic/main amd64 Packages
        100 /var/lib/dpkg/status

Do you know how to contact a person in charge of packages.cloud.google.com/apt ?
It could be very interesting that they maintain multiple version.

Just give it a try in a way mentioned in official page:
https://kubernetes.io/docs/tasks/tools/install-kubectl/

For example:

curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.13.10/bin/linux/amd64/kubectl

Where in v1.13.10 you need to substitute specific client version you need

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests