Only intranasal vaccination with DnaK could generate mucosal-associated IL-17-secreting CD4+ T cells, even in systemic CD4+-depleted mice, offering a potential new vaccine strategy against TB. Here, IL17A is linked to tuberculosis.