PokerStars No-Limit Hold'em, 0 Tournament, 15/30 Blinds (9 handed) - Poker-Stars Converter Tool from FlopTurnRiver.com

saw flop | saw showdown
UTG (t1630)
UTG+1 (t1430)
MP1 (t1730)
Hero (MP2) (t1520)
MP3 (t1330)
CO (t1470)
Button (t1460)
SB (t1450)
BB (t1480)
Hero's M: 33.78

Preflop: Hero is MP2 with K
, K
3 folds, Hero bets t60, 3 folds, SB raises to t211, 1 fold, Hero calls t151
Flop: (t452) K
, 7
, 2
(2 players)
SB bets t211, Hero raises to t870, SB calls t659
Turn: (t2192) J
(2 players)
SB bets t369 (All-In), Hero calls t369
River: (t2930) A
(2 players, 1 all-in)
Total pot: t2930
Main pot: t2930 between Hero and SB, won by SB
Results below:
SB had 10
, 10
(flush, Ace high).
Hero had K
, K
(three of a kind, Kings).
Outcome: SB won t2930
What action (if any) would have been correct? I surely did not want to fold my kings, then again I did not want to give away a free card to the villain. (I put him on some kind of pockets. so he could not have had a made flush. But once I make such a bet, and he calls, then I am committed anyway. Was this unavoidable, or was it a bad play? Also, I may have been tilted by losing the first hand in another, higher buy-in tournament, with AA to a QQ, who hit.