Compass cannot connect to mongo replicaset in k8s

I have create a mongo replicaSet in k8s, and I give each Mongo an external ip: port to allow external DB administrators to manage their data through Mongo compass, as follows:
mongo-0: (primary)
mongo-1: (secondary)
mongo-2: (secondary)
replicaset name: rs0

It’s ok to only connect to the primary one with pasting the connection string to compass like:

but when I want to connect to all of them with the below connection string:

I always get this error:
getaddrinfo ENOTFOUND mongo-0.mongo-headless.svc.cluster.local

Could someone help me with this?