Skip to content

Kedify Agent

The Kedify Agent is responsible for establishing a secure connection between your Kubernetes cluster and the Kedify platform. It handles the installation and lifecycle management of KEDA and the HTTP Scaler on your clusters, providing robust scaling capabilities and telemetry insights. The Kedify Agent can manage a large number of installations across multiple clusters using secure gRPC connections to communicate with the Kedify Dashboard, ensuring the seamless collection and display of telemetry data.

Key functionalities of the Kedify Agent include:

  • Installation Management: The agent manages the installation and versioning of KEDA and the HTTP Scaler using the Helm package manager. It ensures that the correct versions of these components are deployed and maintained across your clusters.

  • Telemetry Collection: The agent includes a telemetry collector that scrapes metrics from both KEDA and the HTTP Scaler. This telemetry data provides users with valuable insights into their configurations and scaling behaviors, which are displayed in the Kedify Dashboard.

  • Secure Communication: The Kedify Agent establishes a secure, outbound gRPC connection to the Kedify Service, ensuring that all data transmitted between your clusters and the Kedify platform is secure.

  • Custom Resource Management: The agent manages Kedify custom resources, providing autowiring and comprehensive management of the HTTP Scaler. For more information on custom resources, refer to the Kedify Custom Resource Definitions.

The Kedify Agent is installed and configured using a single, unique kubectl apply command generated and provided by Kedify via the dashboard. This command sets up the agent with all necessary configurations to connect to the Kedify platform and manage your KEDA and HTTP Scaler installations efficiently.

The Kedify Agent relies on the Helm package manager to manage and install versioned KEDA images.

Environment Variables

The Kedify Agent Deployment supports several environment variables that can be configured to customize its behavior:

  • HTTP_HEALTHCHECK_DEBOUNCER_SECONDS: The default value is 5. This variable sets the fallback mechanism for HTTP Scaler Traffic Autowiring. For more details, see the HTTP Scaler Traffic Autowiring documentation.

  • KEDIFY_PROXY_CLUSTER_WIDE: Enables the cluster-wide deployment of kedify-proxy, shared across all namespaces in the cluster. This variable should be set to true to configure a single instance of kedify-proxy in the KEDA installation namespace for centralized scaling. The cluster-wide setup is supported only for configurations using Istio’s VirtualService. For more details, see Kedify Proxy.

  • KEDIFY_PROXY_DEFAULT_REPLICA_COUNT: Configures the default number of replicas for each kedify-proxy deployment. This variable should be set to a valid integer N to specify the desired replica count for kedify-proxy. This setting is useful for improving performance or redundancy across namespaces. For more information, see Kedify Proxy.

  • KEDIFY_PROXY_LOG_FORMAT: The kedify-proxy logs in plaintext format by default, this allows configuring JSON formatted logs instead by setting the value to json.

  • PRP_ENABLED: If enabled, the controller for PodResourceProfile is also started by Kedify Agent. The feature is further described on its own docs. By default, it is false.

  • PRP_REQUIRES_ANNOTATED_PODS: If enabled, the controller for PodResourceProfile requires the target pods (where container resources should be modified) to have annotation prp.kedify.io/reconcile=true on them. This is a performance optimization so that more pod events can be ignored by the controller. Default: true.

  • NO_COLOR: If set to true, Kedify Agent’s log will not contain the ANSI escape characters that make the log colorful. By default, logs have colors.

  • NO_BANNER: If set to true, Kedify Agent’s log will not print the ASCII logo of Kedify. By default, the logo is printed.

API Key

The Kedify Agent uses an API key to authenticate with the Kedify platform. This key is generated by the Kedify platform and provided to the agent during installation.

The API key can be rotated in the Kedify Dashboard in the Organization -> API Keys section. When rotated, it is the responsibility of the user to update the API key in the Kedify Agent configuration. The key is stored in a Kubernetes Secret as a base64 encoded string.

First, run the new API key through the base64 function:

Terminal window
key="kfy_971fac53610186bc26891e08b73076c297552073f57c4c6fa6c563c6821d4384"
echo -n "$key" | base64 -w 0 ; echo ""
a2Z5Xzk3MWZhYzUzNjEwMTg2YmMyNjg5MWUwOGI3MzA3NmMyOTc1NTIwNzNmNTdjNGM2ZmE2YzU2M2M2ODIxZDQzODQ=

Then, update the API key in the Secret. Either in your gitops repository or directly in the cluster:

Terminal window
kubectl edit secret kedify-agent -n keda
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: kedify-agent
namespace: keda
data:
apikey: a2Z5Xzk3MWZhYzUzNjEwMTg2YmMyNjg5MWUwOGI3MzA3NmMyOTc1NTIwNzNmNTdjNGM2ZmE2YzU2M2M2ODIxZDQzODQ=