For gaming, 8600k still takes the cake...
https://www.youtube.com/watch?v=V4Jsd0VuD4c
2600x is not far behind though.
It depends on your workload and some rationale. If you are just gaming, with a couple of Chrome tabs and maybe streaming 8600k should be good choice.
If you are doing anything more than that, 2600x can give you more headroom to play with.
Not to mention, 8600k is more expensive and comes without a cooler. But the flip side is for 2600x to perform close to it, it needs faster RAM.
So, overall the setup will cost you around the same range.
Ryzen has more longevity though, due to the extra threads.