Let $P(x)=kx^3+2k^2x^2+k^3$.  Find the sum of all real numbers $k$ for which $x-2$ is a factor of $P(x)$.

$\textbf{(A) }-8\qquad\textbf{(B) }-4\qquad\textbf{(C) }0\qquad\textbf{(D) }5\qquad\textbf{(E) }8$
1. Given the polynomial \( P(x) = kx^3 + 2k^2x^2 + k^3 \), we need to find the sum of all real numbers \( k \) for which \( x-2 \) is a factor of \( P(x) \).

2. If \( x-2 \) is a factor of \( P(x) \), then \( P(2) = 0 \). We substitute \( x = 2 \) into \( P(x) \):
   \[
   P(2) = k(2)^3 + 2k^2(2)^2 + k^3 = 8k + 8k^2 + k^3
   \]

3. Setting \( P(2) = 0 \):
   \[
   8k + 8k^2 + k^3 = 0
   \]

4. Factor out \( k \) from the equation:
   \[
   k(k^2 + 8k + 8) = 0
   \]

5. This gives us two cases to consider:
   - \( k = 0 \)
   - \( k^2 + 8k + 8 = 0 \)

6. Solve the quadratic equation \( k^2 + 8k + 8 = 0 \) using the quadratic formula \( k = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \):
   \[
   k = \frac{-8 \pm \sqrt{8^2 - 4 \cdot 1 \cdot 8}}{2 \cdot 1} = \frac{-8 \pm \sqrt{64 - 32}}{2} = \frac{-8 \pm \sqrt{32}}{2} = \frac{-8 \pm 4\sqrt{2}}{2} = -4 \pm 2\sqrt{2}
   \]

7. The solutions to the quadratic equation are:
   \[
   k = -4 + 2\sqrt{2} \quad \text{and} \quad k = -4 - 2\sqrt{2}
   \]

8. The sum of all real numbers \( k \) is:
   \[
   0 + (-4 + 2\sqrt{2}) + (-4 - 2\sqrt{2}) = 0 - 4 + 2\sqrt{2} - 4 - 2\sqrt{2} = -8
   \]

The final answer is \(\boxed{-8}\).