public List<String> getClusterMembers(int expectedClusterSize) {
Matcher podTemplateMatcher = getHostnameComponents();
int ourPodId = Integer.parseInt(podTemplateMatcher.group("podId"));
Preconditions.checkArgument(ourPodId < expectedClusterSize,
"Current Pod ID %s indicates a cluster size greater than the expected %s.",
ourPodId,
expectedClusterSize);
String serviceName = podTemplateMatcher.group("service");
String namespace = podTemplateMatcher.group("namespace");
return IntStream.range(0, expectedClusterSize)
.mapToObj(podId -> getPodHostname(serviceName, podId, namespace))
.collect(Collectors.toList());
}