I have the Keurig 2.0 Machine.
I've tried some of the solutions mentioned above. From cleaning to rubber gaskets/ring replacements and the unit continues to randomly put grounds where they ought not be. I am using Peets (French Roast) Coffee Keurig Pods. The upper lid is slightly domed.
I insert the pod into it's chamber. Then gently press the upper lid to flatten it out. Having punctured the lower portion of the pod, this releases the internal pressure.
See if your unit behaves as I describe here:
At point of brew, I press the flashing start button. Normally I walk away to do other things while the coffee brews. Somewhere in this process, I get grounds in the coffee cup and randomly grounds spewing out the sides of the machine's head. I have noticed a slight movement in the "head" when the brewing process is active. Just a gentle up and down movement. It took a while for me to actually notice it.
Now, I press the flashing start button, and gently apply pressure to the silver rim, to restrict the "heads" up and down motion. From that discovery forward, I've had no coffee grounds in the coffee cup or spewing outside the machine.
It is a temporary work-a-round, to say the least, but better than having coffee grounds where they ought not be. Please try this and let us know if this works for you.