Install Kubernetes Agent (via helm)

George Alpizar
George Alpizar
  • Updated

Overview

You can use this document to learn how to install the Edge Delta agent as a DaemonSet on your Kubernetes cluster with Helm.

The agent is a daemon that analyzes logs and container metrics from a Kubernetes cluster, and then streams analytics to configured streaming destinations.

Edge Delta uses a Kubernetes-recommended, node-level log collecting architecture, also known as a DaemonSet architecture. The DaemonSet runs the agent pod on each node. Each agent pod analyzes logs from all other pods running on the same node.

Note

Before you deploy the agent, we recommend that you review the Review Agent Requirements document. 

Note

If you do not want to install the agent on your Kubernetes with Helm, then see Install the Agent for Kubernetes.


Create a Configuration and Install the Agent via Helm

  1. In the Edge Delta App, on the left-side navigation, click Data Pipeline, and then click Agent Settings.
  2. Click Create Configuration.
  3. Select Helm.
  4. Click Save.
  5. In the table, locate the newly created configuration, then click the corresponding vertical green ellipses, and then click Deploy Instructions.  
  6. Click Helm.
  7. In the window that appears, follow the on-screen instructions.
    • This window also displays your API key.
  8. To view helm-installed packages in the edgedelta namespace, run the following command:
    helm ls -n edgedelta

Configure Helm

  1. To provide API-KEY as clear text, set apiKey in values.yml:

    apiKey: "API-KEY"
  2. To provide API-KEY as a k8s secret, set secretApiKey in values.yml. (Note: Before you can run helm, this secret must be created.)

    secretApiKey:
      name: "ed-api-key"
      key: "ed-api-key"
    • Note

      You can also add environment variables or refer secrets as environment variables using commented samples in the values.yml file. For additional environment variables, you can download and edit https://edgedelta.github.io/k8s/edgedelta-agent.yml. To learn more, review the Environment Variables document, specially the Examples - Kubernetes (yml configuration) section.

  3. Review the following output:
    NAME: edgedelta
    LAST DEPLOYED: Fri Jul 17 17:49:42 2020
    NAMESPACE: edgedelta
    STATUS: deployed
    REVISION: 1
    TEST SUITE: None
    NOTES:
    1. Visit https://app.edgedelta.com
    2. Find the configuration with to check if agents are active
  4. In the same folder, add the Edge Delta Helm repository:
    helm repo add edgedelta https://edgedelta.github.io/charts
  5. In the same folder, install the helm chart using values.yml:
    helm install edgedelta edgedelta/edgedelta -n edgedelta --create-namespace -f values.yaml

Review values.yml Variables

Variables Description  Example Value 
apiKey

This variable pulls an agent's configuration details, which is generated via the Edge Delta App. 

If the secretApiKey is set, then do not specify this variable. 

0a3a6ca3-0df0-45f8-8ea2-d1329ee3de60
secretApiKey.name

This variable references the  Edge Delta Agent API key secret name in same namespace.

If the apiKey is set, then do not specify this variable.

"ed-api-key"
secretApiKey.key

This variable is the secret key inside the secretApiKey.name k8s secret.

"value"
storePort This variable uses a port number to expose agent metrics storage 6062
httpProxy

This variable uses proxy details to route the agent's outbound traffic through an HTTP internal proxy.

For more information on httpproxy, review this document from Golang

"http://127.0.0.1:3128"
httpsProxy

This variable uses proxy details to route the agent's outbound traffic through an HTTPS internal proxy.

For more information on httpproxy, review this document from Golang

"https://127.0.0.1:3128"
noProxy

This variable disables the proxy for requests that hit a specific destination. 

For more information on httpproxy, review this document from Golang

"https://your-endpoint.com"
edWorkflows

This variable uses a colon-separated list of workflow names to enable matching workflows. 

By default, all other workflow names are enabled when edWorkflows and edWorkflowPrefixes are not configured.

"billing-workflow:error-workflow"
edWorkflowPrefixes

This variable uses a colon-separated list of workflow prefixes to enable all matching workflows.

By default, all other workflow names are enabled when edWorkflows and edWorkflowPrefixes are not configured.

"billing:error"
persistingCursorProps.enabled

This variable enables or disables the persistent cursor feature.

false
persistingCursorProps.hostMountPath

This variable uses the host mount path to keep the persisting cursor state.

/var/lib/edgedelta
persistingCursorProps.containerMountPath This variable uses the container mount path to keep the persisting cursor state. /var/lib/edgedelta
resources.limits.cpu

This variable sets the maximum CPU usage limit for the agent pod. 

1000m
resources.limits.memory

This variable sets the maximum memory usage limit for the agent pod.

512Mi
resources.requests.cpu

This variable sets the minimum requested CPU for the agent pod.

200m
resources.requests.memory

This variable sets the minimum requested memory for the agent pod.

256Mi
image

This variable is the agent docker image.

edgedelta/agent
aggregatorProps.enabled

If you set this variable to true, then the aggregator agent is added to the deployment.

false
aggregatorProps.port

This variable specifies the port that the agents will use to communicate with the aggregator. 

9191

 


Upgrade the Agent

If your agent's image is set to agent:latest, then new agent instances will run on the latest agent version.

  • The original agent instance will run on the agent version that was available during agent deployment.

If your agent's image is set to a specified version, then new agent instances will run on the specified version, not the latest agent version. 

  • To upgrade all agents to the latest version, replace the previously configured version number with the latest agent version, such as agent:v0.1.15.
    • Review the following example: gcr.io/edgedelta/agent:v0.1.15
    • The latest version of the agent is listed in the Edge Delta Releases page.

Uninstall Helm Release

To uninstall the helm chart:

helm delete edgedelta -n edgedelta

Share this document