Mythman, your historical information is a bit off.  NK was created by the USSR following the end of WW II in 1945.  Mao and his Communists did not take over China until October 1, 1949.  The USSR was basically in control of North Korea and it supplied and advised NK when it invaded the South in June 1950.  The U.S.-led UN forces pushed NK troops back to the Yalu River.  Communist China did not order Kim to settle with the UN.  Instead, it entered the war in October 1950 when several hundred thousand Chinese soldiers crossed into NK to repel the UN forces.   NK and the Chicoms succeeded in pushing the UN forces back to near the 38th parallel where North and South were divided at the end of WW II.  A stalemate ensued for the next two and one-half years until July 27, 1953 when an armistice between the UN and the North Korean and Chicoms took effect.  China subsequently became NK's primary supporter.