AK is always tricky. I think in tournaments, esp deep stacked or close to the bubble it's ok to fold them pre to all in shoves.
I think in cash games they play differently. AK suited is obviously a bit better than AK off due to more possibilities. You have to consider the ranges of those shoving, many times it does mean AA or KK but you'd be amazed how often you see these crazy out of position pre flop shoves with any pocket pair.
Case in point yesterday alone I got dealt AKs one hand and AKo the next hand:
I'm on button in both cases (two different tables). I raise up the AKs and get one all in shove followed by a second all in shove, so I'm facing two all in full stacks pre flop. I fold thinking someone has AA there, they got to. KK was the first stack all in, JJ was the second stack all in. The flop was 4 to the flush for me with an Ace. My AK would have won Aces with K kicker. But against two all in stacks in cash I didn't feel like that was a good spot at all. Against one all in cash I'm generally doing it unless I know the person only shoves AA and I'm not suited up.
Second one: AKo on button. I raise it up again, get one all in shove. They had something like QQ and I lost my stack. Still felt that was a good call just didn't pan out for me that one time.
TLDR: I think it's good to fold AK preflop early or mid position in tournaments to all in shoves close to the bubble or deep. I also think it's a good idea to fold in cash games against 2 or more all in shoves at any stage of the hand unless you know for sure the shovers do that without AA or KK. If your gut says its AA or KK behind that shove and you have no other information on the person, I assume that is exactly what I'm facing. If it's already on the flop, I'm considering they got a set and thinking carefully.