Determine the polynomial
$$f(x) = x^k + a_{k-1} x^{k-1}+\cdots +a_1 x +a_0 $$
of smallest degree such that $a_i \in \{-1,0,1\}$ for $0\leq i \leq k-1$ and $f(n)$ is divisible by $30$ for all positive integers $n$.
To determine the polynomial \( f(x) = x^k + a_{k-1} x^{k-1} + \cdots + a_1 x + a_0 \) of smallest degree such that \( a_i \in \{-1,0,1\} \) for \( 0 \leq i \leq k-1 \) and \( f(n) \) is divisible by \( 30 \) for all positive integers \( n \), we need to consider the following steps:

1. **Understand the Divisibility Condition:**
   - Since \( 30 = 2 \times 3 \times 5 \), \( f(n) \) must be divisible by \( 2 \), \( 3 \), and \( 5 \) for all positive integers \( n \).

2. **Polynomial Roots Modulo Primes:**
   - A polynomial of degree \( d \) with integer coefficients can have at most \( d \) non-congruent roots modulo any prime \( p \). This is a consequence of the fact that a polynomial of degree \( d \) can have at most \( d \) roots in any field, including the finite field \( \mathbb{Z}/p\mathbb{Z} \).

3. **Determine the Minimum Degree:**
   - To ensure \( f(n) \) is divisible by \( 2 \), \( 3 \), and \( 5 \) for all \( n \), \( f(x) \) must have roots modulo \( 2 \), \( 3 \), and \( 5 \). Specifically, \( f(x) \) must have roots modulo \( 2 \) (2 roots), modulo \( 3 \) (3 roots), and modulo \( 5 \) (5 roots).
   - Therefore, \( f(x) \) must have at least \( 2 + 3 + 5 = 10 \) roots modulo \( 30 \).

4. **Construct the Polynomial:**
   - The polynomial must be of degree at least \( 10 \) to have at least \( 10 \) roots modulo \( 30 \). We can construct such a polynomial by ensuring it has roots at \( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 \) modulo \( 30 \).

5. **Example Polynomial:**
   - One possible polynomial of degree \( 10 \) that satisfies these conditions is:
     \[
     f(x) = x(x-1)(x-2)(x-3)(x-4)(x-5)(x-6)(x-7)(x-8)(x-9)
     \]
   - This polynomial has roots at \( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 \) and thus is divisible by \( 30 \) for all positive integers \( n \).

Conclusion:
\[
\boxed{f(x) = x(x-1)(x-2)(x-3)(x-4)(x-5)(x-6)(x-7)(x-8)(x-9)}
\]