Former UN Secretary-General Ban Ki-Moon is worried about America's image when it comes to establishing credibility in its upcoming talks with North Korea.

President Donald Trump's recent decision to withdraw from the Iranian Nuclear Deal does not set a good precedent for reliability and that will matter to North Korea President Kim Jong Un during upcoming nuclear talks, the South Korean diplomat told CNBC's Nancy Hungerford on Wednesday.

"I personally believe that it has given a very problematic message in terms of credibility, and trust and confidence in (the) U.S. What kind of message North Korea will get from this?" Ban asked.

"Can I trust the U.S. president? This may be the first question by North Korea's leader."

Trump on May 8 announced America's withdrawal from the Iran deal, formally called the Joint Comprehensive Plan of Action (JCPOA), signed in 2015 with China, France, Russia, the U.K. and Germany. The landmark agreement lifted economic sanctions on Iran in exchange for restrictions on its nuclear program, and the International Atomic Energy Agency regularly reported that Iran was in compliance with its rules.

Trump, however, vocally derided it, calling it the "worst deal ever" and pledging to do away with it as he has done with a number of policy actions by the Barack Obama administration.

With the stated aim of denuclearizing the Korean Peninsula, the Trump administration has scheduled talks with North Korea's Kim. Planned to take place in Singapore on June 12, the meeting would be the first ever between a sitting U.S. president and a North Korean head of state.