Jelly, 6 bytes
ṗ@Ż€I%
A dyadic Link that accepts the length, \$k\$, on the left and the number of symbols, \$N\$ on the right and yields a list of lists of non-negative integers.
How?
ṗ@Ż€I% - Link: k, N
@ - with swapped arguments:
ṗ - [1..N] Cartesian product [1..k]
Ż€ - prefix a zero to each
I - incremental differences
% - modulo N