I have deployed two Docker containers for elastic and kibana. Those two are talking to each other and working fine. I am now trying to deploy Fleet Server and have followed all the documentation and the Fleet Server and its integrations will not communicate with the elastic server. I am using self generated certs and I installed the Fleet server with --fleet-server-es-insecure to get the Fleet server to install as I was getting the x509 certificate signed by unknown error. I tried both the method where you don't supply certs for Fleet Server at install and I also used the Elastic utility to generate a new fleet crt and key file and installed that way as well. All installs require the --fleet-server-es-insecure option to work. I added other agents on completely separate hosts and when I look in the agent logs after install using the --insecure option I continue to get x509 errors. What am I missing that I should do for the fleet policy to work after a successful install. I looks like any agent I install will not communicate with the 172.18.0.2:9200 without x509 errors.
With certs:
./elastic-agent install --url=https://172.18.0.2:8220
--fleet-server-es-insecure
--fleet-server-es=https://172.18.0.2:9200
--fleet-server-service-token=AAEAAWVsYXN0aWMvZmxlZXQtc2VydmVyL3Rva2VuLTE2NjQ0OTczNzA1MjI6UXlZZ3Rqa3NTX2l2WVJUY2FHRFlIdw
--fleet-server-policy=fleet-server-policy
--certificate-authorities=/usr/share/elasticsearch/ca/ca.crt
--fleet-server-es-ca=/usr/share/elasticsearch/ca/ca.crt
--fleet-server-cert=/usr/share/elasticsearch/fleet-server/fleet-server.crt
--fleet-server-cert-key=/usr/share/elasticsearch/fleet-server/fleet-server.key
Without certs:
./elastic-agent install
--fleet-server-es-insecure
--fleet-server-es=https://172.18.0.2:9200
--fleet-server-service-token=AAEAAWVsYXN0aWMvZmxlZXQtc2VydmVyL3Rva2VuLTE2NjQ1MDkyNTcxNjE6SGNTdW9ueEVSQ2kyZWNPRDI4aUptZw
--fleet-server-policy=fleet-server-policy