As one of the other posters mentioned, you seem to be young. I say that not because you say anything in particular that gives it away, but that most of us old guys have gone through what you're going through many times before. Team lead is usually as much a political position as it is a technical position. Knowing how to deal with these issues and how to surf the chaos that can happen at the programmer/manager interface is a big part of the job.
I don't want to kick you while you're down, but it's important to realize that you have not succeeded in the political side of your job. It may very well be the case that you could not succeed, no matter what you did. That happens. However, you need to be quicker on the draw to either solve the problem or get out. It's way too late now (which is why the advice here is uniformly telling you to get out). In fact, understanding when not to take a team lead position is very important for your career.
When you have a failed project like this (and from your description, you can feel free to mentally label this project with a big red "failed" stamp), it is quite important to reflect upon what you could have done to save it. It's easy to say, "It was K's fault" or "Nobody listened to me", but if you were to save the project, it is entirely possible that it will require you to influence K in a certain way. Or perhaps you need to get more influence with people higher up in the project. The fact that your performance report was downgraded indicates a certain souring of the relationship with those above you. Rather than worrying about whether they can do this, you should be wondering, "Where did I screw up that relationship?"
My advice to you is to find a position with a very strong lead developer. When interviewing for a new position, make sure to seek out the lead you will be working for and choose a group where you will learn the skills that will enable you to be successful the next time you are in that role. I would advise you to avoid another lead position until you find that strong mentor (unless you are hard headed and don't mind the trial and error approach -- which is fine, but a bit taxing stress-wise ;-) ).
Good luck!