Unable to delete the scaled object deployed in Azure AKS and Namespace in terminating state #5131
-
ReportUnable to delete the scaled object deployed in Azure AKS and Namespace in terminating state Expected BehaviorAs we tried deleting the namespace its in terminating state because of the above scaled object in that namespace Actual BehaviorNamesapce should be deleted after the scaled object is deleted Steps to Reproduce the ProblemLogs from KEDA operator
KEDA Version2.11.1 Kubernetes Version1.25 PlatformMicrosoft Azure Scaler DetailsNo response Anything else?No response |
Beta Was this translation helpful? Give feedback.
Replies: 12 comments 2 replies
-
I tried removing the finalizer but still I am unable to remove the Scaled object the finalizer is not getting removed from the scaled object |
Beta Was this translation helpful? Give feedback.
-
Could you provide the events of scaledobject or logs of keda-operator? |
Beta Was this translation helpful? Give feedback.
-
Do you have KEDA operator up and running? |
Beta Was this translation helpful? Give feedback.
-
@zroubalik we have keda operator running running in the cluster.But other applications are also using this same Keda |
Beta Was this translation helpful? Give feedback.
-
So try to remove these scaledobjects first, then namespace |
Beta Was this translation helpful? Give feedback.
-
@zroubalik this is keda namespace .Could you please clarify. Or do we need to delete this |
Beta Was this translation helpful? Give feedback.
-
just delete all scaledobjects in the namespace you are about to remote: k delete scaledobject --all -n YOUR_NAMESPACE And also check keda-operator pod logs to see if there are any errors or anything |
Beta Was this translation helpful? Give feedback.
-
@zroubalik I tried deleting the same and is stuck like this |
Beta Was this translation helpful? Give feedback.
-
@zroubalik I could see some errors in the keda operator log related to this namespace which we are trying to delete 2023-10-19T03:28:51Z ERROR scale_handler error getting metric for scaler {"scaledObject.Namespace": "autozoning-live-ibr-34", "scaledObject.Name": "recognitionicr-autoscaler", "scaler": "azureServiceBusScaler", "error": "scaler with id 2 not found, len = 0, cache has been probably already invalidated"} |
Beta Was this translation helpful? Give feedback.
-
@zroubalik any update |
Beta Was this translation helpful? Give feedback.
-
Hi Team, Is there any update on the issue. |
Beta Was this translation helpful? Give feedback.
-
Manually remove the finalizer from scaledobjects is not a solution. |
Beta Was this translation helpful? Give feedback.
To delete the ScaledObject, KEDA operator must be alive to remove the finalizer. Is the operator alive when you delete the ScaledObject?
You can manually edit the ScaledObject and remove the finalizer to remove the ScaledObject, despite the operator pod is down