i7 7700K, and purchase when it is on sale for the holiday season. You can significantly reduce the price compared to normal retail.
The i7 8700K is an option, however, for gaming there is no difference in performance between it and the 7700K, for the vast majority of games. Those games that do perform better with an i7 8700K are few and you will still get good performance from the 7700K.
The cost premium for the i7 8700K and motherboard are not worth it for gamers, except those that have a lot of money and do not care how much a computer costs.