Failed to verify server certificate - APM Go Agent with ECK

Thank you so much @stephenb , that is a good catch!

Now my error becomes

{"level":"debug","time":"2021-08-08T17:00:09Z","message":"request failed: sending event request failed: Post "https://hm-apm-apm-http.elastic:8200/intake/v2/events\": x509: certificate signed by unknown authority (next request in ~36s)"}

As this is a self signed certificate, I found this answer: X509: certificate signed by unknown authority - #2 by jsoriano

As I am using Elastic Cloud on Kubernetes (ECK) way to install, I am not sure how to change the config.

I also tried to change to

ELASTIC_APM_VERIFY_SERVER_CERT: "false"

for my Go app. However, just like the doc says, if I am using ELASTIC_APM_SERVER_CERT, the ELASTIC_APM_VERIFY_SERVER_CERT will be ignored.

Any guide? Thanks!