Example 2 Let $k \geqslant 9$. Solve the equation
$$
x^{3}+2 k x^{2}+k^{2} x+9 k+27=0 \text {. }
$$
【Analysis】Since the equation is a cubic equation, it is difficult to factorize, so this approach is hard. However, by changing the main variable, viewing $x$ as a parameter and $k$ as the main variable, it can be seen as a quadratic equation in $k$
$$
\begin{array}{l}
x k^{2}+\left(2 x^{2}+9\right) k+\left(x^{3}+27\right)=0 \\
\Rightarrow x k^{2}+\left(2 x^{2}+9\right) k+(x+3)\left(x^{2}-3 x+9\right)=0 \\
\Rightarrow\left(x k+x^{2}-3 x+9\right)(k+x+3)=0 \\
\Rightarrow x^{2}+(k-3) x+9=0 \text { or } k=-x-3 \\
\Rightarrow x=\frac{(3-k) \pm \sqrt{(k-9)(k+3)}}{2}(k \geqslant 9) \text { or } \\
\quad x=k+3 .
\end{array}
$$