I think you went wrong pretty early in the hand. Preflop raise is of course fine. After the flop, you're really playing a draw to the nuts and your KK is much diminished in value.
On the flop your opponent bets 4/5 the pot or so and I think your call here is justified with the nut draw as your implied odds are significant. Without a spade I would abandon the hand. Raising here is too optimistic; you allow yourself to get check-raised off your draw with what is now not likely the best hand. If he's semi-bluffing at you, you want him to come along with his draw to get stacked, and of course a made hand like a flush or set aren't going to go away. Not only do you raise here, but you min-raise which is a weak play in general and wrong for all the above reasons.
On the turn similar situation, except of course your odds of making the flush by the river have diminished. I would probably abandon the hand here to a 1/2 pot raise or greater, calling about 1/3 of the time with the draw. If he checks I check behind. Of course here your opponent teaches you why you don't want the bet reopened, as now you should toss your hand. I don't like the call, he's bet at you every opportunity since the flop and is representing something like a weak flush or a set. If he's bluffing there are better spots to catch him than something that doesn't beat top pair…
Cheers,
- HJ