If function \( f \) is continuous at point \( x = \pi \) and
\[
f(x) =
\begin{cases}
kx + 1, & x \le \pi \\
\cos x, & x>\pi
\end{cases}
\]
then the value of \( k \) is ______
Show Hint
For piecewise functions, always equate LHL and RHL at the boundary point.