Coral reef health is tightly connected to the coral microbiome. Coral bleaching and disease outbreaks have caused an unprecedented loss in coral cover worldwide, particularly correlated to a warming ocean. Coping mechanisms of the coral holobiont under high temperatures are not completely described, but the associated microbial community is a potential source of acquired heat-tolerance. The relationship between stress and stability in the microbiome is key to understanding the role that the coral microbiome plays in thermal tolerance. According to the Anna Karenina Principle (AKP), stress or disease will increase instability and stochasticity among animal microbiomes. Here we investigate whether heat stress results in microbiomes that follow the AKP. We used shotgun metagenomics in an experimental setting to understand the dynamics of microbial taxa and genes in the surface mucous layer (SML) microbiome of the coral Pseudodiploria strigosa under heat treatment. The metagenomes of corals exposed to heat stress showed high similarity, indicating a deterministic and stable response of the coral microbiome to disturbance, in opposition to the AKP. We hypothesize that this stability is the result of a selective pressure towards a coral microbiome that is assisting the holobiont to withstand heat stress. The coral SML microbiome responded to heat stress with an increase in the relative abundance of taxa with probiotic potential, and functional genes for nitrogen and sulfur acquisition. These consistent and specific microbial taxa and gene functions that significantly increased in proportional abundance in corals exposed to heat are potentially beneficial to coral health and thermal resistance.