Will it be a repeat of the Korean War, where the Chinese fight against the US? It is plausible. Make no mistake about it, China wants to be a superpower.
That's true that China wants to be a superpower, but it's a different world now that it was during the Korean War. We were fighting against the 'scourge of Communism' and all that propaganda. Today the weapons are economic, not military. The reason for this is because everyone knows that if a war escalates enough, someone's going to light off a nuke and THEN everyone dies, not just some people. Say North Korea does manage to build and launch a nuke, one of three things will happen.
1. NK launches nuke, the entire world mourns the loss of South Korea, but in the end takes no further action short of blockading. The US, being involved in two other wars already, can't do much more than send a strike group to hopefully destroy any more nukes that come shooting out of Chongjin.
2. NK launches nuke, the United States allied with whatever's left of South Korea (or Japan) invades and eventually succeeds against North Korea, and also against China, who is supporting their southern neighbor, at great loss of life and equipment on both sides. A completely pyrrhic victory that will hopefully cause the world to take nuclear disarmament seriously.
3. NK launches nuke, the entire world supports the complete destruction of North Korea, including China, whom the US graciously allows to fly their flag over Pyongyang rather than the US forces. Hopefully China and the US continue as allies and the Far East calms down a whole lot.
Unfortunately I think that second scenario is the most likely one.