1
dynatrace-operator running fine, but dynatrace-webhook pod logs showing error message.
how to find the OneAgentAPM ? and how to delete it ,manually ?Any help please.

kubectle logs -f pods/dynatrace-webhook-58975cf6bb-hgs4x

{"level":"info","ts":"2022-10-29T04:01:43.627Z","logger":"dynatrace-operator-version","msg":"dynatrace-operator","version":"v0.9.0","gitCommit":"99a1efbe21f7bf566be7412fe20d61a489d6333c","buildDate":"2022-09-28T13:57:47+00:00","goVersion":"go1.19.1","platform":"linux/amd64"}
{"level":"info","ts":"2022-10-29T04:01:44.243Z","logger":"main.controller-runtime.metrics","msg":"Metrics server is starting to listen","addr":":8383"}
{"level":"info","ts":"2022-10-29T04:01:44.282Z","logger":"main.controller-runtime.webhook","msg":"Registering webhook","path":"/label-ns"}
Error: OneAgentAPM object detected - the Dynatrace webhook will not inject until the deprecated OneAgent Operator has been fully uninstalled
Usage:
  dynatrace-operator webhook-server [flags]

Flags:
      --cert string        File name for the public certificate. (default "tls.crt")
      --cert-key string    File name for the private key. (default "tls.key")
      --certs-dir string   Directory to look certificates for. (default "/tmp/webhook/certs")
  -h, --help               help for webhook-server

{"level":"info","ts":"2022-10-29T04:01:44.845Z","logger":"main.events","msg":"Unsupported OneAgentAPM CRD still present in cluster, please remove to proceed","type":"Warning","object":{"kind":"Pod","namespace":"dynatrace","name":"dynatrace-webhook-58975cf6bb-hgs4x","uid":"008d0262-8df3-4410-94f0-fbb50167b6cd","apiVersion":"v1","resourceVersion":"92860179"},"reason":"IncompatibleCRDPresent"}
{"level":"info","ts":"2022-10-29T04:01:44.846Z","logger":"main","msg":"OneAgentAPM object detected - the Dynatrace webhook will not inject until the deprecated OneAgent Operator has been fully uninstalled"}

I trying to find the way to find the OneAgentAPM Object and delete it. We were using different version of operator and agent.

jpgrassi
  • 5,482
  • 2
  • 36
  • 55

2 Answers2

0

You probably have some old CRD that is causing the issue. Try to remove the operator, show all CRDs in the cluster and look for Dynatrace OneAgent CRDs. Just delete these CRDs and reinstall OneAgent operator. In my case, I had to delete these two: oneagents.dynatrace.com and oneagentapms.dynatrace.com

0

as Leonardo Cardoso mentioned, delete old CRD

kubectl delete crd oneagentapms.dynatrace.com
kubectl delete crd oneagents.dynatrace.com
JFK
  • 1
  • 2