8. As shown in Figure 2, point $A$ is on the positive $y$-axis, point $B$ is on the positive $x$-axis, $S_{\triangle A O B}=9$, segment $A B$ intersects the graph of the inverse proportion function $y=\frac{k}{x}$ at points $C$ and $D$. If $C D=$ $\frac{1}{3} A B$, and $A C=B D$, then $k=$ $\qquad$ .
8. 4 .

Let point $A\left(0, y_{A}\right), B\left(x_{B}, 0\right)$.
Given $C D=\frac{1}{3} A B, A C=B D$, we know that $C$ and $D$ are the trisection points of segment $A B$.
Thus, $x_{C}=\frac{1}{3} x_{B}, y_{C}=\frac{2}{3} y_{A}$.
Therefore, $k=x_{C} y_{C}=\frac{2}{9} x_{B} y_{A}=\frac{4}{9} S_{\triangle A O B}=4$.