Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 1.71 KB

keda_crd_cleanup.md

File metadata and controls

48 lines (37 loc) · 1.71 KB

Install KEDA

# Ref: https://keda.sh/docs/2.0/deploy/
KEDA_VERSION=2.3.0

helm install keda kedacore/keda \
    --version ${KEDA_VERSION} \
    --set serviceAccount.create=false \
    --set serviceAccount.name=keda-operator \
    --set  podSecurityContext.fsGroup=1001 \
    --set podSecurityContext.runAsGroup=1001 \
    --set podSecurityContext.runAsUser=1001  \
    --namespace keda
helm list -A
kubectl get pods -n keda
kubectl describe pods keda-operator-7d697b9c5b-nvbmj -n keda | grep -i aws   # ensure IRSA annotation working.

Cleanup Kubernetes CRD(KEDA Resources) Deadlock

Initiate KEDA Deletion

You can refer to KEDA Docs 2

kubectl delete -f https://github.com/kedacore/keda/releases/download/v2.3.0/keda-2.3.0.yaml
kubectl delete -f https://raw.githubusercontent.com/kedacore/keda/v2.3.0/config/crd/bases/keda.sh_scaledobjects.yaml
kubectl delete -f https://raw.githubusercontent.com/kedacore/keda/v2.3.0/config/crd/bases/keda.sh_scaledjobs.yaml
kubectl delete -f https://raw.githubusercontent.com/kedacore/keda/v2.3.0/config/crd/bases/keda.sh_triggerauthentications.yaml
kubectl delete -f https://raw.githubusercontent.com/kedacore/keda/v2.3.0/config/crd/bases/keda.sh_clustertriggerauthentications.yaml

Try this if custom resources with finalizers can "deadlock"

  1. CRD Cleanup Github Issue: 1
# Example kubectl patch crd/MY_CRD_NAME -p '{"metadata":{"finalizers":[]}}' --type=merge
# https://github.com/kubernetes/kubernetes/issues/60538
kubectl patch customresourcedefinition.apiextensions.k8s.io/scaledobjects.keda.sh -p '{"metadata":{"finalizers":[]}}' --type=merge