The total surface area of the cube is $6r^2.$ The area shaded on one face is $\frac{\pi r^2}{4}$ so the total shaded area is $\frac{3\pi r^2}{4}.$
The fraction of the total surface area shaded is thus $\frac{3\pi r^2}{4}$ divided by $6r^2$ which is: $$\frac{3\pi r^2}{4} \times\frac{1}{6r^2}= \frac{\pi}{8}$$