Warning
You are currently viewing v"2.13" of the documentation and it is not the latest. For the most recent documentation, kindly click here.
Deploying KEDA Click here for latest
We provide a few approaches to deploy KEDA runtime in your Kubernetes clusters:
💡 NOTE: KEDA requires Kubernetes cluster version 1.24 and higher
Don’t see what you need? Feel free to create an issue on our GitHub repo.
Deploying KEDA with Helm is very simple:
Add Helm repo
helm repo add kedacore https://kedacore.github.io/charts
Update Helm repo
helm repo update
Install keda
Helm chart
Helm 3
helm install keda kedacore/keda --namespace keda --create-namespace
To deploy the CRDs separately from the Helm chart, use the keda-2.xx.x-crds.yaml
file provided on the GitHub releases page.
💡 NOTE: Are you upgrading to v2.2.1 or above? Make sure to read our troubleshooting guide to fix potential CRD issues.
If you want to remove KEDA from a cluster, you first need to remove any ScaledObjects and ScaledJobs that you have created. Once that is done, the Helm chart can be uninstalled:
kubectl delete $(kubectl get scaledobjects.keda.sh,scaledjobs.keda.sh -A \
-o jsonpath='{"-n "}{.items[*].metadata.namespace}{" "}{.items[*].kind}{"/"}{.items[*].metadata.name}{"\n"}')
helm uninstall keda -n keda
Note: if you uninstall the Helm chart without first deleting any ScaledObject or ScaledJob resources you have created, they will become orphaned. In this situation, you will need to patch the resources to remove their finalizers. Once this is done, they should automatically be removed:
for i in $(kubectl get scaledobjects -A \
-o jsonpath='{"-n "}{.items[*].metadata.namespace}{" "}{.items[*].kind}{"/"}{.items[*].metadata.name}{"\n"}');
do kubectl patch $i -p '{"metadata":{"finalizers":null}}' --type=merge
done
for i in $(kubectl get scaledjobs -A \
-o jsonpath='{"-n "}{.items[*].metadata.namespace}{" "}{.items[*].kind}{"/"}{.items[*].metadata.name}{"\n"}');
do kubectl patch $i -p '{"metadata":{"finalizers":null}}' --type=merge
done
keda
KedaController
resource named keda
in namespace keda
💡 NOTE: Further information on Operator Hub installation method can be found in the following repository.
Locate installed KEDA Operator in keda
namespace, then remove created KedaController
resource and uninstall KEDA operator.
If you want to try KEDA on Minikube or a different Kubernetes deployment without using Helm you can still deploy it with kubectl
.
keda-2.xx.x.yaml
that includes all features, including admission webhooks (recommended)keda-2.xx.x-core.yaml
that installs the minimal required KEDA components, without admission webhooksRun the following command (if needed, replace the version, in this case 2.13.1
, with the one you are using):
# Including admission webhooks
kubectl apply --server-side -f https://github.com/kedacore/keda/releases/download/v2.13.1/keda-2.13.1.yaml
# Without admission webhooks
kubectl apply --server-side -f https://github.com/kedacore/keda/releases/download/v2.13.1/keda-2.13.1-core.yaml
# Including admission webhooks
kubectl apply --server-side -f keda-2.13.1.yaml
# Without admission webhooks
kubectl apply --server-side -f keda-2.13.1-core.yaml
💡 NOTE:
--server-side
option is needed because the ScaledJob CRD is too long to process, see this issue for details.
/config
directory on our GitHub repo if you prefer to clone it.git clone https://github.com/kedacore/keda && cd keda
VERSION=2.13.1 make deploy
2.13.1
, with the one you are using):# Including admission webhooks
kubectl delete -f https://github.com/kedacore/keda/releases/download/v2.13.1/keda-2.13.1.yaml
# Without admission webhooks
kubectl delete -f https://github.com/kedacore/keda/releases/download/v2.13.1/keda-2.13.1-core.yaml
# Including admission webhooks
kubectl delete -f keda-2.13.1.yaml
# Without admission webhooks
kubectl delete -f keda-2.13.1-core.yaml
VERSION=2.13.1 make undeploy
If you want to try KEDA v2 on MicroK8s from 1.20
channel, KEDA is included into MicroK8s addons.
microk8s enable keda
To uninstall KEDA in MicroK8s, simply disable the addon as shown below.
microk8s disable keda