2. $I=\sum_{k=1}^{10}\left(\cos \frac{k \pi}{11}\right)^{8}=$
Let $z=\cos \frac{\pi}{11}+\mathrm{i} \sin \frac{\pi}{11}$. Then $z^{11}=-1, \cos \frac{k \pi}{11}=\frac{z^{k}+z^{-k}}{2}$.
By the properties of the roots of unity, we have
$$
\begin{array}{l}
z^{p}+z^{2 p}+\cdots+z^{10 p}=\left\{\begin{array}{ll}
-1, & p \neq 0, \\
10, & p=0 .
\end{array}\right. \\
\text { Therefore, } I=\sum_{k=1}^{10}\left(\frac{z^{k}+z^{-k}}{2}\right)^{8} \\
=\frac{1}{2^{8}} \sum_{k=1}^{10} \sum_{j=0}^{8} \mathrm{C}_{8}^{j} z^{k(8-2 j)} \\
=\frac{1}{2^{8}} \sum_{j=0}^{8} \mathrm{C}_{8}^{j}\left(\sum_{k=1}^{10} z^{k(8-2 j)}\right) \\
=\frac{1}{2^{8}}\left(-\mathrm{C}_{8}^{0}-\mathrm{C}_{8}^{1}-\mathrm{C}_{8}^{2}-\mathrm{C}_{8}^{3}+10 \mathrm{C}_{8}^{4}-\mathrm{C}_{8}^{5}-\right. \\
\left.\mathrm{C}_{8}^{6}-\mathrm{C}_{8}^{7}-\mathrm{C}_{8}^{8}\right) \\
=\frac{1}{2^{8}}\left(11 \mathrm{C}_{8}^{4}-2^{8}\right)=\frac{257}{128} .
\end{array}
$$