datadog-agent icon indicating copy to clipboard operation
datadog-agent copied to clipboard

API key is invalid when used in secret

Open salimuddin87 opened this issue 6 years ago • 2 comments

Output of the info page (if this is a bug)

(Paste the output of the info page here)

Describe what happened: I am running datadog on eks cluster and It's running fine. Below is the way I provided api key:

    - name:  DD_API_KEY
      value: <api-key>

Describe what you expected: When I am creating secret and referred to dd-agent as shown below. It's giving invalid key error.

         - name: DD_API_KEY
            valueFrom:
              secretKeyRef:
                name: datadog-secret
                key: api-key

Steps to reproduce the issue: create a secret for dd-agent api-key.

Additional environment details (Operating System, Cloud provider, etc): Amazon EKS, Kubernetes

salimuddin87 avatar Jun 15 '20 11:06 salimuddin87

Hey @salimuddin87

There's not much info here to work on but I can confirm that that approach does work. Generally, I would check these things:

  • make sure the API secret and Datadog agent are on the same namespace
  • the secret name is correct. you used datadog-secret while our templates has datadog-agent. Speaking of templates, you can find them here.
  • make sure that the value of api-key is the base64-encoded api key.

Lastly, just looking at the env config you posted at face value, it does not seem to be indented properly (valueFrom should be the same column as name).

Hope this helps. If the issue persists, you can open a support ticket by emailing: [email protected] to troubleshoot this further with our support team.

JM

JM-Lazaro avatar Jun 16 '20 01:06 JM-Lazaro

@JM-Lazaro , Thanks for the advice. I resolved all the issues.

salimuddin87 avatar Jun 16 '20 14:06 salimuddin87