Some endolithic microbes, such as aerobic green algae and anaerobic bacteria, can synthesize nutrients in their coral host’s skeleton that the host relies on. Previous studies have found that the endolithic microbial constitution of a single coral species can have biogeographical diversity. However, the potential environmental factors related to the endolithic microbes remain unclear. In this study, we used both amplicon sequence variants (ASV) and a kmer-based taxonomic unit (KTU) to characterize the endolithic bacterial constitution of Isopora spp. located in the western Pacific Ocean—where it is subjected to the Kuroshio Current (in Okinawa, Japan and Green Island, Taiwan)—and the South China Sea (Dongsha Atoll). The endolithic bacterial community compositions showed a significant difference across geologies, and we suggest that the ocean current and primary productivity are the most essential environmental factors influencing the bacterial communities in the skeleton of Isopora spp. In addition, our results showed that, technically, compared to ASV, bacterial composition based on KTU avoids extreme data, making it a suitable tool for explaining the relationship between microbes and environmental factors.