Elastic Agent show `Error dialing x509: certificate signed by unknown authority` but it is healthy in fleet

There are two way to specify CA path

The first one is to follow this instruction: Configure SSL/TLS for self-managed Fleet Servers | Fleet and Elastic Agent Guide [8.7] | Elastic, and add ssl.certificate_authorities: ["/usr/share/elastic-agent/certs/ca/ca.crt"] to Advanced YAML configuration

The second one is to configure elastic-agent.yml directly, you can find ssl.certificate_authorities
in this * SSL/TLS.

Note: this settings seems to be dynamic, Configuring Elasticsearch | Elasticsearch Guide [8.7] | Elastic