Kubernetes Autoscaler Deployment not working

Hello together, I am trying to deploy the kubernetes cluster autoscaler via juju into my kubernetes cluster, but the status always shows “waiting” with a message “Container Not Ready”.

App                    Version         Status   Scale  Charm                  Channel  Rev  Exposed  Message
kubernetes-autoscaler  Ready to Scale  waiting      1  kubernetes-autoscaler  stable    33  no       Container Not Ready

Unit                      Workload  Agent  Machine  Public address  Ports  Message
kubernetes-autoscaler/3*  waiting   idle   3        192.168.22.162         Container Not Ready

There is no pod being created and running juju debug-log only gives the following result:

unit-kubernetes-autoscaler-3: 10:54:47 INFO juju.worker.uniter.operation ran "leader-elected" hook (via hook dispatching script: dispatch)
unit-kubernetes-autoscaler-3: 10:54:48 INFO unit.kubernetes-autoscaler/3.juju-log Missing juju-scale config
unit-kubernetes-autoscaler-3: 10:54:48 INFO juju.worker.uniter.operation ran "config-changed" hook (via hook dispatching script: dispatch)
unit-kubernetes-autoscaler-3: 10:54:48 INFO juju.worker.uniter found queued "start" hook
unit-kubernetes-autoscaler-3: 10:54:49 INFO unit.kubernetes-autoscaler/3.juju-log Running legacy hooks/start.
unit-kubernetes-autoscaler-3: 10:54:49 INFO juju.worker.uniter.operation ran "start" hook (via hook dispatching script: dispatch)
unit-kubernetes-autoscaler-3: 10:55:08 INFO unit.kubernetes-autoscaler/3.juju-log Missing juju-scale config
unit-kubernetes-autoscaler-3: 10:55:08 INFO juju.worker.uniter.operation ran "config-changed" hook (via hook dispatching script: dispatch)
unit-kubernetes-autoscaler-3: 10:55:37 INFO unit.kubernetes-autoscaler/3.juju-log Missing juju-scale config
unit-kubernetes-autoscaler-3: 10:55:37 INFO juju.worker.uniter.operation ran "config-changed" hook (via hook dispatching script: dispatch)
machine-3: 10:54:36 INFO juju.worker.kvmprovisioner machine-3 does not support kvm container
unit-kubernetes-autoscaler-3: 10:54:45 INFO juju.worker.uniter hooks are retried true
unit-kubernetes-autoscaler-3: 10:54:45 INFO juju.worker.uniter.storage initial storage attachments ready
unit-kubernetes-autoscaler-3: 10:54:45 INFO juju.worker.uniter found queued "install" hook
unit-kubernetes-autoscaler-3: 10:54:46 INFO unit.kubernetes-autoscaler/3.juju-log Running legacy hooks/install.
unit-kubernetes-autoscaler-3: 10:54:46 INFO unit.kubernetes-autoscaler/3.juju-log Missing juju-scale config
unit-kubernetes-autoscaler-3: 10:54:47 INFO juju.worker.uniter.operation ran "install" hook (via hook dispatching script: dispatch)
unit-kubernetes-autoscaler-3: 10:54:47 INFO juju.worker.uniter found queued "leader-elected" hook
unit-kubernetes-autoscaler-3: 10:55:51 INFO juju.worker.uniter.operation ran "config-changed" hook (via hook dispatching script: dispatch)

I don’t see any errors, so I have no idea how to debug this. Can anyone help please?

Thank you in advance!

For further information, my cluster is running on Openstack and includes the openstack-integrator charm, I don’t know if this is relevant.

With juju add-unit ... for example I am able to add more worker nodes to my cluster at least, and also removing nodes is possible. The only missing thing is the cluster autoscaler.

hey @amrap03093 , i’m glad you discovered this charm, but the bad news i’m about to provide you is that this charm is under-served and likely not going to get much attention from my end at the moment.

I will say this charm is pretty much locked to juju 2.9 deployments – it won’t work in any later versions of juju.

Secondly, it must be deployed into a model on a kubernetes cloud – not a machine cloud. You should see the deployment notes at Charmhub | Deploy Kubernetes Autoscaler using Charmhub - The Open Operator Collection.

You have a “machine model” which contains your charmed-kubernetes units (kubernetes-control-plane and kubernetes-worker)

if you pull the kubeconfig from those unit

juju run -u kubernetes-control-plane/leader -- cat /home/ubuntu/config

you can use juju add-k8s with this kubeconfig then finally add a model to this k8s cloud where the charm can deploy from

The integration tests on the charm go through this process of standing up a charmed-kuberetes, adding the k8s cloud, adding a k8s model, then deploying the charm.

Thank you @addyess , I have now managed to make it work. However, the only thing that worked for me was adding the version 1.27 into my kubernetes cluster in version 1.28.

What about the future of this charm if it won’t be maintained at the moment?

The autoscaler workload that runs on the kubernetes control-plane nodes are bound to a juju controller version via the juju go API. In order to keep this charm alive, the go libraries would have to be migrated to support the juju 3 controllers. I’m not sure there’s enough community demand for the continued work?