aws-workshop-for-kubernetes icon indicating copy to clipboard operation
aws-workshop-for-kubernetes copied to clipboard

[section 205] error with autoscaler

Open bhavin192 opened this issue 7 years ago • 0 comments

https://github.com/aws-samples/aws-workshop-for-kubernetes/blob/master/02-path-working-with-clusters/205-cluster-autoscaling/readme.adoc#deploy-worker-autoscaler

As cluster autoscaler version should be according to Kubernetes cluster version[1]. When 2-10-autoscaler.yaml is deployed it crashes with following error.

$ kubectl logs deployment/cluster-autoscaler --namespace=kube-system
I0723 11:26:21.944771       1 main.go:225] Cluster Autoscaler 0.6.0
F0723 11:26:21.956964       1 main.go:257] Failed to get nodes from apiserver: nodes is forbidden: User "system:serviceaccount:kube-system:default" cannot list nodes at the cluster scope
goroutine 1 [running]:
k8s.io/autoscaler/cluster-autoscaler/vendor/github.com/golang/glog.stacks(0xc420337e00, 0xc420683a40, 0xbb, 0x1bf)
        /gopath/src/k8s.io/autoscaler/cluster-autoscaler/vendor/github.com/golang/glog/glog.go:766 +0xa7
k8s.io/autoscaler/cluster-autoscaler/vendor/github.com/golang/glog.(*loggingT).output(0x39a6240, 0xc400000003, 0xc420165600, 0x390a66c, 0x7, 0x101, 0x0)
        /gopath/src/k8s.io/autoscaler/cluster-autoscaler/vendor/github.com/golang/glog/glog.go:717 +0x348
k8s.io/autoscaler/cluster-autoscaler/vendor/github.com/golang/glog.(*loggingT).printf(0x39a6240, 0x3, 0x26e7790, 0x26, 0xc4204e9e88, 0x1, 0x1)
        /gopath/src/k8s.io/autoscaler/cluster-autoscaler/vendor/github.com/golang/glog/glog.go:655 +0x14f
k8s.io/autoscaler/cluster-autoscaler/vendor/github.com/golang/glog.Fatalf(0x26e7790, 0x26, 0xc4204e9e88, 0x1, 0x1)
        /gopath/src/k8s.io/autoscaler/cluster-autoscaler/vendor/github.com/golang/glog/glog.go:1145 +0x67
main.main()
        /gopath/src/k8s.io/autoscaler/cluster-autoscaler/main.go:257 +0x48f
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-28T20:16:17Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.6", GitCommit:"9f8ebd171479bec0ada837d7ee641dec2f8c6dd1", GitTreeState:"clean", BuildDate:"2018-03-21T15:13:31Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

Using this yaml solves the issue.

[1] https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler#releases

bhavin192 avatar Jul 23 '18 11:07 bhavin192