CD8+CD161+ T cells markedly enriched in the liver coexpressed IL-17 with high levels of IFN-γ and/or IL-22 and offer protection against viral infections. Here, KLRB1 is linked to viral infectious disease.