Most games won't take advantage of more than 4 cores and the 6 of the i5-8600k will probably be fine for the next few years at least. What they will take advantage of though is clock speed. That's why Intel CPUs consistently out perform AMD chips because they have the extra speed and are not so reliant on the extra cores that say a Ryzen chip will offer. Taking a lower speed clocked locked I7-8700 over an overclockable i5-8600k would be a bad move if you just want a PC for mainly gaming. That k in the chips name means it will overclock easily through its clock multiplier. The i5 with just the 6 real cores you need will most likely take a higher overclock than an I7 with 6 real + 6 hyperthreaded cores.
TLDR : If money is a deciding...