There are very few instances when it's OK to fold K/K.
The
odds of getting someone having A/A when you have K/K is about 220/1. That is,
there is less than a half-percent chance. It would take a massive read to figure out that someone had A/A.
In a ring game it's almost never appropriate.
Maybe if you see two rocks making big moves against each other you can get away from that hand, but otherwise no.
In a tournament setting, you might fold if you're a micro stack, on the bubble, and several big stacks seem to be duking it out.
Now, post flop, running into aces sucks. They call K/K "Ace Magnets" for a reason.
I'll usually make a continuation bet if I'm first to act, but fold to any challenge (because I should have bet enough early that I'm not going to be called by a hand that I can now beat).