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

Cannot set autoscale when upgrade kubernetes to 1.7.0 version #9

Open
Cryptophobia opened this issue Mar 20, 2018 · 3 comments
Open

Comments

@Cryptophobia
Copy link
Member

From @chaintng on July 21, 2017 4:49

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+'"}

Copied from original issue: deis/workflow#841

@Cryptophobia
Copy link
Member Author

From @gemoya on August 5, 2017 2:58

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.

@Cryptophobia
Copy link
Member Author

From @chaintng on August 9, 2017 4:50

after upgrade to 1.7.2, it's also work 😕

@Cryptophobia
Copy link
Member Author

From @n0n0x on September 6, 2017 19:11

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

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

1 participant