Pure gaming, can't beat 8700k. But you need top end you and high refresh monitor to get the most out of it.
If you want to push the 8700k though you're potentially looking at delid and high end cooling.
2700x pretty much good to go out of the box.
Well, actually, quite the reverse. If you have a top end card and want to push high res, they're both so close you'd struggle to see much between them. It's at lower res with the GPU out of the equation that it becomes a little clearer.
The 8700k has the gaming win by a nose. It's such a small lead that:
Price
A regular home system with background tasks
Most people at this end of the scale on higher res
The graphics card you use
What games you play (are they good with multithread)
Other small uses of machine
Likely will make more of a difference for your purchase choice.
The 2700X is behind in gaming, it's by such a small amount as to not be worth caring about.

