In case of using eureka (+ Spring Boot) you can reach special endpoint where list of currently registered instances can be found. E.g.:
Does Kubernetes service discovery have such endpoint or may be other mechanism to see all currently registered instances? UPD: Does kubernetes api have any possibilities to do this, may be via kubectl?
I managed to solve problem after a while.
kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: namespace: yours name: service-reader rules: - apiGroups: [""] # "" indicates the core API group resources: ["services"] verbs: ["get", "watch", "list"] apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: service-reader-pod subjects: - kind: ServiceAccount name: default namespace: yours roleRef: kind: ClusterRole name: service-reader apiGroup: rbac.authorization.k8s.io