8. Let $A=\{1,2, \cdots, n\}(n>1, n \in \mathbf{N})$. Mapping

$f: A \rightarrow A$. Then the number of $f$ that satisfy
$$
f(1) \leqslant f(2) \leqslant \cdots \leqslant f(n),
$$

and whose image takes exactly $k(1<k \leqslant n)$ different values is
$\qquad$
8. $\mathrm{C}_{n}^{k} \mathrm{C}_{n-1}^{k-1}$.

First, select $k$ images, with a total of $\mathrm{C}_{n}^{k}$ ways to choose. Then, divide 1, $2, \cdots, n$ into $k$ segments using the partition method, which has a total of $\mathrm{C}_{n-1}^{k-1}$ ways. Finally, map them according to $f(1) \leqslant f(2) \leqslant \cdots \leqslant f(n)$. 
Therefore, the number of functions $f$ that meet the conditions is $\mathrm{C}_{n}^{k} \mathrm{C}_{n-1}^{k-1}$.