ElasticFleet randomly missing logs

Elastic Agent Log:

Kibana Fleet setup failed: http POST request to http://kibana-kb-http.elasticsearch.svc:5601/api/fleet/setup fails: <nil>. Response: {"statusCode":401,"error":"Unauthorized","message":"[security_exception: [security_exception] Reason: unable to authenticate user [elasticsearch-elastic-agent-agent-kb-user] for REST request [/_security/_authenticate]]: unable to authenticate user [e... (truncated)
Kibana Fleet setup failed: http POST request to http://kibana-kb-http.elasticsearch.svc:5601/api/fleet/setup fails: <nil>. Response: {"statusCode":401,"error":"Unauthorized","message":"[security_exception: [security_exception] Reason: unable to authenticate user [elasticsearch-elastic-agent-agent-kb-user] for REST request [/_security/_authenticate]]: unable to authenticate user [e... (truncated)
Kibana Fleet setup failed: http POST request to http://kibana-kb-http.elasticsearch.svc:5601/api/fleet/setup fails: <nil>. Response: {"statusCode":401,"error":"Unauthorized","message":"[security_exception: [security_exception] Reason: unable to authenticate user [elasticsearch-elastic-agent-agent-kb-user] for REST request [/_security/_authenticate]]: unable to authenticate user [e... (truncated)
Kibana Fleet setup failed: http POST request to http://kibana-kb-http.elasticsearch.svc:5601/api/fleet/setup fails: <nil>. Response: {"statusCode":401,"error":"Unauthorized","message":"[security_exception: [security_exception] Reason: unable to authenticate user [elasticsearch-elastic-agent-agent-kb-user] for REST request [/_security/_authenticate]]: unable to authenticate user [e... (truncated)
Kibana Fleet setup failed: http POST request to http://kibana-kb-http.elasticsearch.svc:5601/api/fleet/setup fails: <nil>. Response: {"statusCode":500,"error":"Internal Server Error","message":"security_exception: [security_exception] Reason: unable to authenticate user [elasticsearch-elastic-agent-agent-kb-user] for REST request [/_component_template/.fleet_component_template-1]"... (truncated)
Kibana Fleet setup failed: http POST request to http://kibana-kb-http.elasticsearch.svc:5601/api/fleet/setup fails: <nil>. Response: {"statusCode":500,"error":"Internal Server Error","message":"security_exception: [security_exception] Reason: unable to authenticate user [elasticsearch-elastic-agent-agent-kb-user] for REST request [/_ingest/pipeline/.fleet_final_pipeline-1]"}
Kibana Fleet setup failed: http POST request to http://kibana-kb-http.elasticsearch.svc:5601/api/fleet/setup fails: <nil>. Response: {"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred"}
Kibana Fleet setup failed: http POST request to http://kibana-kb-http.elasticsearch.svc:5601/api/fleet/setup fails: <nil>. Response: {"statusCode":401,"error":"Unauthorized","message":"[security_exception: [security_exception] Reason: unable to authenticate user [elasticsearch-elastic-agent-agent-kb-user] for REST request [/_security/_authenticate]]: unable to authenticate user [e... (truncated)
Kibana Fleet setup failed: http POST request to http://kibana-kb-http.elasticsearch.svc:5601/api/fleet/setup fails: <nil>. Response: {"statusCode":401,"error":"Unauthorized","message":"[security_exception: [security_exception] Reason: unable to authenticate user [elasticsearch-elastic-agent-agent-kb-user] for REST request [/_security/_authenticate]]: unable to authenticate user [e... (truncated)
Kibana Fleet setup failed: http POST request to http://kibana-kb-http.elasticsearch.svc:5601/api/fleet/setup fails: <nil>. Response: {"statusCode":401,"error":"Unauthorized","message":"[security_exception: [security_exception] Reason: unable to authenticate user [elasticsearch-elastic-agent-agent-kb-user] for REST request [/_security/_authenticate]]: unable to authenticate user [e... (truncated)
Kibana Fleet setup failed: http POST request to http://kibana-kb-http.elasticsearch.svc:5601/api/fleet/setup fails: <nil>. Response: {"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred"}
Kibana Fleet setup failed: http POST request to http://kibana-kb-http.elasticsearch.svc:5601/api/fleet/setup fails: <nil>. Response: {"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred"}
Kibana Fleet setup failed: http POST request to http://kibana-kb-http.elasticsearch.svc:5601/api/fleet/setup fails: <nil>. Response: {"statusCode":500,"error":"Internal Server Error","message":"security_exception: [security_exception] Reason: unable to authenticate user [elasticsearch-elastic-agent-agent-kb-user] for REST request [/_component_template/.fleet_component_template-1]"... (truncated)
Kibana Fleet setup failed: http POST request to http://kibana-kb-http.elasticsearch.svc:5601/api/fleet/setup fails: <nil>. Response: {"statusCode":500,"error":"Internal Server Error","message":"security_exception: [security_exception] Reason: unable to authenticate user [elasticsearch-elastic-agent-agent-kb-user] for REST request [/_ingest/pipeline/.fleet_final_pipeline-1]"}
Kibana Fleet setup failed: http POST request to http://kibana-kb-http.elasticsearch.svc:5601/api/fleet/setup fails: <nil>. Response: {"statusCode":500,"error":"Internal Server Error","message":"security_exception: [security_exception] Reason: unable to authenticate user [elasticsearch-elastic-agent-agent-kb-user] for REST request [/_component_template/.fleet_component_template-1]"... (truncated)
Kibana Fleet setup failed: http POST request to http://kibana-kb-http.elasticsearch.svc:5601/api/fleet/setup fails: <nil>. Response: {"statusCode":500,"error":"Internal Server Error","message":"security_exception: [security_exception] Reason: unable to authenticate user [elasticsearch-elastic-agent-agent-kb-user] for REST request [/_ingest/pipeline/.fleet_final_pipeline-1]"}
Kibana Fleet setup failed: http POST request to http://kibana-kb-http.elasticsearch.svc:5601/api/fleet/setup fails: <nil>. Response: {"statusCode":500,"error":"Internal Server Error","message":"security_exception: [security_exception] Reason: unable to authenticate user [elasticsearch-elastic-agent-agent-kb-user] for REST request [/_component_template/.fleet_component_template-1]"... (truncated)
Kibana Fleet setup failed: http POST request to http://kibana-kb-http.elasticsearch.svc:5601/api/fleet/setup fails: <nil>. Response: {"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred"}
Kibana Fleet setup failed: http POST request to http://kibana-kb-http.elasticsearch.svc:5601/api/fleet/setup fails: <nil>. Response: {"statusCode":401,"error":"Unauthorized","message":"[security_exception: [security_exception] Reason: unable to authenticate user [elasticsearch-elastic-agent-agent-kb-user] for REST request [/_security/_authenticate]]: unable to authenticate user [e... (truncated)
Kibana Fleet setup failed: http POST request to http://kibana-kb-http.elasticsearch.svc:5601/api/fleet/setup fails: <nil>. Response: {"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred"}
Policy selected for enrollment:  970bba30-046c-11ec-83fd-5f899723f07b
2021-09-14T02:03:54.847Z	INFO	cmd/enroll_cmd.go:396	Starting enrollment to URL: https://fleet-server-agent-http.elasticsearch.svc:8220/
2021-09-14T02:03:55.638Z	INFO	cmd/enroll_cmd.go:232	Elastic Agent might not be running; unable to trigger restart
Successfully enrolled the Elastic Agent.
2021-09-14T02:03:55.639Z	INFO	cmd/enroll_cmd.go:234	Successfully triggered restart on running Elastic Agent.
2021-09-14T02:03:55.744Z	INFO	application/application.go:66	Detecting execution mode
2021-09-14T02:03:55.746Z	INFO	application/application.go:91	Agent is managed by Fleet
2021-09-14T02:03:55.746Z	INFO	capabilities/capabilities.go:59	capabilities file not found in /usr/share/elastic-agent/capabilities.yml
I0914 02:03:56.454668      19 leaderelection.go:243] attempting to acquire leader lease  elasticsearch/elastic-agent-cluster-leader...
2021-09-14T02:03:56.456Z	INFO	[composable.providers.kubernetes]	kubernetes/kubernetes.go:64	Kubernetes provider started with node scope
2021-09-14T02:03:56.456Z	INFO	[composable.providers.kubernetes]	kubernetes/util.go:114	kubernetes: Using pod name elastic-agent-agent-42gmr and namespace elasticsearch to discover kubernetes node
2021-09-14T02:03:56.535Z	INFO	[composable.providers.kubernetes]	kubernetes/util.go:120	kubernetes: Using node ip-172-32-0-185.ap-southeast-2.compute.internal discovered by in cluster pod node query
2021-09-14T02:03:56.736Z	INFO	[composable.providers.docker]	docker/docker.go:43	Docker provider skipped, unable to connect: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
2021-09-14T02:03:56.741Z	INFO	[api]	api/server.go:62	Starting stats endpoint