Kubernetes - ScaledObject - Keda - RabbitMQ

3.2k Views Asked by At

i have created a ScaledObject and TriggerAuthentication using Keda, in order to horizontally autoscale my pods based on a RabbitMQ length.

but for some reason, when i try to query my ScaledObjects like this:

kubectl get ScaledObjects -n mynamespace

i am not getting anything. but when i am applying the yaml file which contains all of the information about the ScaledObject, the output is this:

scaledobject.keda.sh/rabbitmq-scaledobject unchanged

i am also able to edit this scaled object using this command:

kubectl edit scaledobject.keda.sh/rabbitmq-scaledobject -n mynamespace

but i am not sure why it is not listed when doing this command:

kubectl get ScaledObjects -n mynamespace

the autoscaler does work, i am just wondering why it is not listed..

Thanks in Advance, Yaniv

1

There are 1 best solutions below

0
On

This might be a case of having more than one Custom Resource defined with the same kind but a different apiVersion.

For example, these two versions of Keda create the ScaledObject with different apiVersion:

  • 1.4:
apiVersion: keda.k8s.io/v1alpha1
kind: ScaledObject
  • 2.0:
apiVersion: keda.sh/v1alpha1
kind: ScaledObject

So when you run kubectl get ScaledObjects -n mynamespace, it might be defaulting to the one you are not using.