Skip to content

Migration from KEDA to Kedify

This guide provides step-by-step instructions for migrating from the upstream KEDA project to Kedify, including how to handle HTTPScaledObjects migration.

Migrating from KEDA to Kedify is straightforward and requires minimal changes to your existing configuration. The process involves uninstalling KEDA components, migrating specific resource types, and installing Kedify.

Step 1: Uninstall KEDA and KEDA HTTP Add-on

Section titled “Step 1: Uninstall KEDA and KEDA HTTP Add-on”

Before installing Kedify, you need to remove the existing KEDA installation and KEDA HTTP Add-on (if installed) from your cluster.

If you have the KEDA HTTP Add-on installed, remove it first:

Terminal window
# If installed with Helm
helm uninstall keda-add-ons-http --namespace keda
# If installed with kubectl
kubectl delete -f https://github.com/kedacore/http-add-on/releases/latest/download/keda-add-ons-http.yaml

Remove the KEDA installation:

Terminal window
# If installed with Helm
helm uninstall keda --namespace keda
# If installed with kubectl (update the version appropriately)
kubectl delete -f https://github.com/kedacore/keda/releases/latest/download/keda-2.18.0.yaml

Good news! Any ScaledObjects that worked with KEDA will continue to work with Kedify without any modifications. No action is needed for existing ScaledObjects.

Kedify maintains full backward compatibility with KEDA ScaledObjects, so your existing autoscaling configurations will work seamlessly.

Step 3: Migrate HTTPScaledObjects to ScaledObjects

Section titled “Step 3: Migrate HTTPScaledObjects to ScaledObjects”

If you were using HTTPScaledObjects from the KEDA HTTP Add-on, you need to migrate them to ScaledObjects using the Kedify HTTP Scaler.

HTTPScaledObject vs ScaledObject Comparison

Section titled “HTTPScaledObject vs ScaledObject Comparison”

The HTTPScaledObject resource from KEDA HTTP Add-on needs to be converted to a ScaledObject with a kedify-http trigger. Here’s how the key fields map:

HTTPScaledObject FieldScaledObject EquivalentNotes
spec.hoststriggers[].metadata.hostsComma-separated string in ScaledObject
spec.pathPrefixestriggers[].metadata.pathPrefixesComma-separated string in ScaledObject
spec.scaleTargetRef.servicetriggers[].metadata.serviceService name
spec.scaleTargetRef.porttriggers[].metadata.portPort as string
spec.scaleTargetRef.portNametriggers[].metadata.portNamePort name
spec.scaleTargetRef.namespec.scaleTargetRef.nameDeployment name
spec.scaleTargetRef.kindspec.scaleTargetRef.kindResource kind
spec.scaleTargetRef.apiVersionspec.scaleTargetRef.apiVersionAPI version
spec.replicas.minspec.minReplicaCountMinimum replicas
spec.replicas.maxspec.maxReplicaCountMaximum replicas
spec.scaledownPeriodspec.cooldownPeriodCooldown period
spec.scalingMetric.concurrency.targetValuetriggers[].metadata.targetValue + scalingMetric: concurrencyConcurrency metric
spec.scalingMetric.requestRate.targetValuetriggers[].metadata.targetValue + scalingMetric: requestRateRequest rate metric
spec.scalingMetric.requestRate.windowtriggers[].metadata.windowTime window for rate calculation
spec.scalingMetric.requestRate.granularitytriggers[].metadata.granularityTime granularity

Here’s a practical example showing how to migrate an HTTPScaledObject to a ScaledObject:

Original HTTPScaledObject:

apiVersion: http.keda.sh/v1alpha1
kind: HTTPScaledObject
metadata:
name: http-demo
namespace: default
spec:
hosts:
- www.my-app.com
pathPrefixes:
- "/"
scaleTargetRef:
name: http-demo-deployment
apiVersion: apps/v1
kind: Deployment
service: http-demo-service
port: 8080
replicas:
min: 0
max: 10
scalingMetric:
requestRate:
targetValue: 10
window: 1m
granularity: 1s
scaledownPeriod: 300

Migrated ScaledObject:

apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: http-demo-scaledobject
namespace: default
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: http-demo-deployment
minReplicaCount: 0
maxReplicaCount: 10
cooldownPeriod: 300
triggers:
- type: kedify-http
metadata:
hosts: www.my-app.com
pathPrefixes: "/"
service: http-demo-service
port: "8080"
scalingMetric: requestRate
targetValue: "10"
window: "1m"
granularity: "1s"
  1. Hosts and Path Prefixes: Convert arrays to comma-separated strings
  2. Port Values: Convert numeric ports to strings
  3. Scaling Metrics: Specify the metric type explicitly (requestRate or concurrency)
  4. Target Values: Convert to strings
  5. Trigger Type: Use kedify-http as the trigger type

After removing KEDA and migrating your HTTPScaledObjects, install Kedify following the installation guide.

After completing the migration:

  1. Verify Kedify Components: Check that all Kedify components are running:

    Terminal window
    kubectl get pods -n keda
  2. Verify ScaledObjects: Ensure your ScaledObjects are ready:

    Terminal window
    kubectl get scaledobjects
  3. Test Scaling: Verify that your applications scale correctly with the new configuration.

If you encounter issues during migration:

The migration from KEDA to Kedify is designed to be smooth and minimize disruption to your applications while providing enhanced functionality and support.