kubectl: kubectl describe hpa not working with v1.13.0

Is this a request for help? no.

What keywords did you search in Kubernetes issues before filing this one? “hpa”


Is this a BUG REPORT or FEATURE REQUEST? : Bug report

Kubernetes version

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.0", GitCommit:"ddf47ac13c1a9483ea035a79cd7c10005ff21a6d", GitTreeState:"clean", BuildDate:"2018-12-03T21:04:45Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"10+", GitVersion:"v1.10.11-eks", GitCommit:"6bf27214b7e3e1e47dce27dcbd73ee1b27adadd0", GitTreeState:"clean", BuildDate:"2018-12-04T13:33:10Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

I installed using instructions from https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl - i.e. in my Ubuntu Desktop:

sudo apt-get update && sudo apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl

Environment:

  • Cloud provider or hardware configuration: AWS EKS

What happened:

When using kubectl v1.13.0 I cannot describe hpa:

$ kubectl describe hpa my-hpa
Error from server (NotFound): the server could not find the requested resource

I tried kubectl describe HorizontalPodAutoscaler talentdesk as well, same issue.

What you expected to happen:

Before I upgraded kubectl to v1.13 , I had v1.10 and it worked ok.

$ kubectl describe hpa my-hpa
Name:                                                  my-hpa
Namespace:                                             default
Labels:                                                <none>
Annotations:                                           kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"autoscaling/v2beta1","kind":"HorizontalPodAutoscaler","metadata":{"annotations":{},"name":"my-hpa","namespace":"default"},"spec":{"...
...

Anything else we need to know:

My HPA manifests use apiVersion: autoscaling/v2beta1:

apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
...

I noticed the hpa documentation mentions v2beta2 but I’m using v2beta1 - I tried to upgrade my manifest but kubernetes v1.10 doesn’t support v2beta2 - this is the error I get:

$ kubectl apply -f my-hpa.yaml
error: unable to recognize "my-hpa.yaml": no matches for kind "HorizontalPodAutoscaler" in version "autoscaling/v2beta2"

I’m stuck on kubernetes v1.10 for now because AWS EKS doesn’t yet allow upgrades.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 4
  • Comments: 34 (18 by maintainers)

Most upvoted comments

Any chance we can bump the priority on this? There’s breakage in a vital feature of kubectl.

Thanks for re-opening this issue, Yes, I confirm the issue still occurs for me too:

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.1", GitCommit:"eec55b9ba98609a46fee712359c7b5b365bdd920", GitTreeState:"clean", BuildDate:"2018-12-13T10:39:04Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.5-eks-6bad6d", GitCommit:"6bad6d9c768dc0864dab48a11653aa53b5a47043", GitTreeState:"clean", BuildDate:"2018-12-06T23:13:14Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}

$ k describe hpa my-hpa
Error from server (NotFound): the server could not find the requested resource

The workaround of downgrading kubectl to 1.12 is still needed.

/reopen

cc @mars1024, is right WIP on this. will see a pull soon 🐛

kubectl should use autoscaling/v1 to describe HPA (or fall back to v1 if v2beta1 isn’t available)

https://github.com/kubernetes/community/blob/master/contributors/design-proposals/release/versioning.md#supported-releases-and-component-skew

For example, a v1.3 master should work with v1.1, v1.2, and v1.3 nodes, and should work with v1.2, v1.3, and v1.4 clients.

server 1.13’s describe cmd is actually relying on v2beta2 hpa api which doesn’t exist on 1.10 server. for a backward-compatibility we should downgrade the hpa describer to v2beta1 (i suppose?)