Former Defense Secretary Robert Gates says he has no regrets about anything he wrote in his upcoming memoir that is critical of President Obama's handling of the war in Afghanistan, saying it's an "honest account" of the administration's foreign policy.

"Look, people gave me a lot of credit when I was in office for being blunt and candid about what I felt about things. I could hardly be any less in writing a book," Gates told CBS in an interview that aired on its "Sunday Morning" program.

Gates writes in his book Duty: Memoirs of a Secretary at War, that he "never doubted Obama’s support for the troops, only his support for their mission." The book is set for public release this week.

Capitol Hill lawmakers of both parties have criticized Gates for the timing of his criticisms, saying he should've waited until after Obama left office before releasing a "tell-all" style memoir.

"Frankly, I might have, if I had given him advice, I would have waited" to release it, Sen. John McCain, R-Ariz., told CNN's "State of the Union" Sunday.

Sen. Marco Rubio, R-Fla., told CBS's "Face the Nation" Sunday that former administration officials should refrain from "writing those sorts of things" until the president is out of office because "it undermines the ability to conduct foreign policy."

But Gates defended his action, saying he didn't see a compelling reason to wait two years until Obama's second term expires to release his book.

"You have to look at the entirety of the book and the fact that it deals with getting into wars, getting out of wars, and frankly it seemed to me that with the experience and perspective of working for eight presidents and having been [defense] secretary for four-and-a-half years, I didn't think that waiting until 2017 to weigh in on these issues —and in a comprehensive and thoughtful way — made any sense," he said.

Gates also pushed back at accusations he unfairly attacked Obama, saying that he and president often were in agreement on foreign policy issues.

"I make very explicit in the book that I agreed with all of the president's decisions on Afghanistan — the ones that he made in 2009 and subsequently," Gates said. "My one concern was, over the course of 2010 and early 2011, the president began to have to his own reservations about whether it would all work. And I think that's not an unfair thing to say."