Unable to register Fleet server 7.15.0 with Elastic 7.15.0

Hi there:


I have my elastic stack applications 7.15.0 managed by elastic on k8s operator 1.8.0


I have my fleet server service and elastic service in k8s as 

fleet-server-quickstart-agent-http   ClusterIP   172.20.146.78    <none>        8220/TCP   57m
quickstart-es-http                   ClusterIP   172.20.25.71     <none>        9200/TCP   58m

In Kibana UI 
My fleet setting are 

Fleet hosts
https://fleet-server-quickstart-agent-http.log-server.svc:8220

Elastic hosts
https://quickstart-es-http.log-server.svc:9200


Still fleet server is not seen from Kibana UI

This used to work with elastic stack application 7.14.1

Any help to diagnose is highly appreciated


I also noticed many error logs in fleet server pod. 
E1007 23:38:19.170441      14 reflector.go:127] pkg/mod/k8s.io/client-go@v0.19.4/tools/cache/reflector.go:156: Failed to watch *v1.Node: failed to list *v1.Node: nodes "ip-10-250-68-153.us-east-2.compute.internal" is forbidden: User "system:serviceaccount:log-server:elastic-agent" cannot list resource "nodes" in API group "" at the cluster scope

fleet agent pod has warning
2021-10-07T23:29:42.276Z	WARN	cmd/enroll_cmd.go:443	Remote server is not ready to accept connections, will retry in a moment.
2021-10-07T23:39:42.278Z	INFO	cmd/enroll_cmd.go:450	Retrying enrollment to URL: https://fleet-server-monitoring-agent-http.log-server.svc:8220/

Hi @pingz, thanks for your question. There is a small bug in Agent in Fleet mode quickstart doc that is causing this. Please add - nodes in the role permissions for the Agent just as in the PR to fix this.

Thanks,
David