Tissue-resident immune cells are important for organ homeostasis and defense. The epithelium may contribute to these functions directly or by cross-talk with immune cells. We used single-cell RNA sequencing to resolve the spatiotemporal immune topology of the human kidney. We reveal anatomically defined expression patterns of immune genes within the epithelial compartment, with antimicrobial peptide transcripts evident in pelvic epithelium in the mature, but not fetal, kidney. A network of tissue-resident myeloid and lymphoid immune cells was evident in both fetal and mature kidney, with postnatal acquisition of transcriptional programs that promote infection-defense capabilities. Epithelial-immune cross-talk orchestrated localization of antibacterial macrophages and neutrophils to the regions of the kidney most susceptible to infection. Overall, our study provides a global overview of how the immune landscape of the human kidney is zonated to counter the dominant immunological challenge.