Operator for deploying KEDA controller on OpenShift or any Kubernetes cluster with Operator Lifecycle Manager framework installed.
Please note that you can not run both KEDA v1 and v2 on the same Kubernetes cluster. You need to uninstall KEDA v1 first, in order to install and use KEDA v2. Don't forget to uninstall KEDA v1 CRDs as well, to ensure that, please run:
kubectl delete crd scaledobjects.keda.k8s.io
kubectl delete crd triggerauthentications.keda.k8s.io
- On Operator Hub Marketplace locate and install
KEDAoperator - Create
KedaControllerresource inkedanamespace
The following will install KEDA and configure it appropriately for your cluster, please run these commands:
make deploy # deploy KEDA OLM Operator
kubectl apply -n keda -f config/samples/keda_v1alpha1_kedacontroller.yaml # install KEDATo be clear, the operator will be deployed in the keda namespace,
and then it will install KEDA into this namespace.
The installation of KEDA is triggered by the creation of
a KedaController custom resource.
Only custom resource named keda in namespace keda will trigger the installation,
reconfiguration, or removal of the KEDA Controller resources.
There could be only one KEDA Controller in the cluster.
apiVersion: keda.k8s.io/v1alpha1
kind: KedaController
metadata:
name: keda
namespace: keda
spec:
###
# THERE SHOULD BE ONLY ONE INSTANCE OF THIS RESOURCE PER CLUSTER
# with Name set to 'keda' created in namespace 'keda'
###
## Namespace that should be watched by KEDA Controller,
# omit or set empty to watch all namespaces (default setting)
watchNamespace: ""
## Logging level for KEDA Operator
# allowed values: 'debug', 'info', 'error', or an integer value greater than 0, specified as string
# default value: info
logLevel: info
## Logging format for KEDA Operator
# allowed values are json and console
# default value: console
logEncoder: console
## Logging level for Metrics Server
# allowed values: "0" for info, "4" for debug, or an integer value greater than 0, specified as string
# default value: "0"
logLevelMetrics: "0"
Locate installed KEDA Operator in keda namespace and then remove created KedaController resoure or simply delete the KedaController resource:
kubectl delete -n keda -f config/samples/keda_v1alpha1_kedacontroller.yamlTo remove KEDA OLM Operator from your cluster, on Operator Hub locate and uninstall KEDA operator.
In case of manual installation, run these commands:
make undeployThis operator was created using the operator-sdk. And uses Operator Lifecycle Manager to describe deployment metadata.
It can be convenient to run the operator outside of the cluster to test changes. The following command will build the operator and use your current "kube config" to connect to the cluster:
make install # install KedaController CRD in the cluster
make run # run operator locallyTo build the operator:
make build