Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Cannot set autoscale when upgrade kubernetes to 1.7.0 version #841

Open
chaintng opened this issue Jul 21, 2017 · 4 comments
Open

Cannot set autoscale when upgrade kubernetes to 1.7.0 version #841

chaintng opened this issue Jul 21, 2017 · 4 comments

Comments

@chaintng
Copy link

I use google container engine and recently upgrade the kubernetes cluster to 1.7.0
However, i got this error when i try to set autoscale to my application

> deis autoscale:set web --min=15 --max=50 --cpu=60 -a MY-APP
Applying autoscale settings for process type web on MY-APP... Error: Unknown Error (400): {"detail":"Invalid version: '1.7+'"}
@gemoya
Copy link

gemoya commented Aug 5, 2017

I had the same problem because some custom deployments of Kubernetes add the '+' to the minor version and the version() function in deis controller takes the complete minor including the '+' so when the HPA resource checks the api version you get the error because it compares with "1.3.0"

So I deployed a custom controller with scheduler's version function modified by me taking only the first element of the minor's string. Is not a good solution since the development side but you can bypass this situation while the people include cases like that in the controller main line.

@chaintng
Copy link
Author

chaintng commented Aug 9, 2017

after upgrade to 1.7.2, it's also work 😕

@n0n0x
Copy link
Contributor

n0n0x commented Sep 6, 2017

can confirm this works on 1.7.2:

$ deis autoscale:set web --min=1 --max=3 --cpu=60
Applying autoscale settings for process type web on test-app... done

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.3", GitCommit:"2c2fe6e8278a5db2d15a013987b53968c743f2a1", GitTreeState:"clean", BuildDate:"2017-08-12T22:24:26Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.2", GitCommit:"922a86cfcd65915a9b2f69f3f193b8907d741d9c", GitTreeState:"clean", BuildDate:"2017-07-21T08:08:00Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}

$ kubectl -n test-app get hpa
NAME           REFERENCE                 TARGETS           MINPODS   MAXPODS   REPLICAS   AGE
test-app-web   Deployment/test-app-web   <unknown> / 60%   1         3         1          1m

as well as on version 1.7.5:

$ deis autoscale:set web --min=1 --max=3 --cpu=60
Applying autoscale settings for process type web on test-app... done

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.5", GitCommit:"17d7182a7ccbb167074be7a87f0a68bd00d58d97", GitTreeState:"clean", BuildDate:"2017-08-31T19:32:26Z", GoVersion:"go1.9", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.5", GitCommit:"17d7182a7ccbb167074be7a87f0a68bd00d58d97", GitTreeState:"clean", BuildDate:"2017-08-31T08:56:23Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}

$ kubectl -n test-app get hpa
NAME           REFERENCE                 TARGETS           MINPODS   MAXPODS   REPLICAS   AGE
test-app-web   Deployment/test-app-web   <unknown> / 60%   1         3         1          2m

@Cryptophobia
Copy link

This issue was moved to teamhephy/workflow#9

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

No branches or pull requests

4 participants