Washington (CNN) Up and down Pentagon hallways, there is a sense of anxiety.

If President Donald Trump goes to the NATO summit in July and decides to cut back US involvement in the group, as some in the alliance believe he might, it will shake the US military to its core.

It will also open the door to the real possibility that Defense Secretary James Mattis -- a decades-long advocate of alliances -- may no longer be relevant in the Trump administration and might even have to go.

Those concerns are bubbling as Trump once again argued Wednesday for a better relationship with Russia amid his plans to meet President Vladimir Putin, just days after Mattis issued a stark warning that Putin aims to undermine NATO and the US itself.

A warmer relationship with Putin and Russia is "good for the world, it's good for us, it's good for everybody," Trump said Wednesday. But on Friday at the US Naval War College in Rhode Island, Mattis had been grim. "Putin seeks to shatter NATO. He aims to diminish the appeal of the Western democratic model and attempts to undermine America's moral authority," he said.

Anxiety within the Pentagon

The gap on Russia is just the latest example of differences in policy and approach between Trump and his defense secretary that are raising questions about whether a rift is developing between the two men.

Whether it's their starkly different assessments of Pyongyang's denuclearization, transgender troops or Trump's request for a military parade through downtown Washington, Mattis and the President have often appeared to be on different pages.

On other issues, including the US decision to leave the Iran nuclear deal and the nascent negotiations with North Korea, Mattis has appeared sidelined at times.

Their starkly different personalities underscore the growing list of policy differences. Mattis, known for his focus on precision and accuracy, is navigating a relationship with a President known not only for his misrepresentations and off-the-cuff exaggerations, but for his annoyance at being managed.

The apparent distance between Trump and his defense secretary is feeding anxiety within the Pentagon, but several analysts and former officials say it may simply be a matter of the President growing into the job. After frequently touting the value of his "generals" early in the presidency, Trump may feel he doesn't need to rely on them as much as he did in the early months of his term.

"I think that history is replete with examples of where there have been, shall I say, communication gaps between the White House and Pentagon," said James Clapper, the former Director of National Intelligence and a retired three star Air Force general.

JUST WATCHED Sciutto: Mattis contradicts Trump on Syria Replay More Videos ... MUST WATCH Sciutto: Mattis contradicts Trump on Syria 02:30

"It's a particularly acute issue here with President Trump, who I think as more time has elapsed in his tenure, feels more and more confident that, you know, he doesn't really need any advice from anybody and he's smarter than everybody else," Clapper said on CNN's New Day.

There's no indication Mattis is about to leave the administration.

In fact, Mattis is scheduled to attend the upcoming NATO summit with the President and Secretary of State Mike Pompeo, according to a senior administration official.

But other military men have been ejected from the Trump orbit. Former National Security Adviser Lt. General HR McMaster was pushed out, and there are a steady stream of news accounts about speculation that the White House chief of staff, retired Marine Corps General John Kelly, could be fired or might quit.

And there is growing list of examples where Mattis and the President differ, occasions when the President has made policy on the fly or offered assessments that don't fully reflect reality, leaving Mattis to clean up.

Trump last week said North Korea was proceeding with denuclearization. "They stopped everything that you would want them to stop, and they blew up sites where they test," Trump told a rally. Hours earlier, Mattis had said he wasn't aware of any progress on dismantling North Korea's nuclear program. "The detailed negotiations have not begun. I wouldn't expect that at this point."

'Snippets of the truth'

The same disconnect was on display after the US conducted military strikes in April to punish Syria for the use of chemical weapons. While Trump wanted a sustained campaign, Mattis urged caution.

Cedric Leighton, a retired Air Force intelligence officer and CNN military analyst, said Trump's comments reflect a "President of the United States who has gotten very political in many respects, has been able to take certain snippets of truth and convert them to things that suit his purposes."

"Secretary Mattis does not operate in that way," Leighton told CNN. "Secretary Mattis looks at things, either they are true or they are not true."

Some officials say Mattis' focus on precision and accuracy and his frequent need to clarify Trump's comments may aggravate the President's well known annoyance at feeling others are "handling" him and trying to manage his instincts.

On June 18, Trump suddenly announced he wanted to form a "Space Force" as a new, sixth branch of the military. Mattis was well aware of the proposal, but had never had made a public statement of strong support about it. After the President spoke, Mattis said it would take a while, with legislation and then congressional approval required.

James Mattis, US Secretary of Defense, speaks during the IISS Shangri-La Dialogue Asia Security Summit in Singapore, on Saturday, June 2, 2018. Mattis blasted Chinas deployment of military assets in the South China Sea, expanding the Trump administrations criticism of the country amid a continued dispute over trade. Photographer: Paul Miller/Bloomberg via Getty Images

Mattis has also had to find ways to support Trump's more out of the blue ideas, such as a military parade in Washington.

Technically, the Pentagon is still planning for it, but several defense officials say it's very much on the back burner for now. Pentagon concerns include the cost of a parade and the manpower required when the military is already stretched thin.

On other issues Mattis appears to have been at least partially sidelined from the President's decision-making process.

Perhaps the most significant example was Trump's unexpected effort to stop transgender persons from being in the military. Mattis once again stepped in and said it would have to be studied, and any final decision would await expected court rulings.

Mattis had told Congress he thought the Iran nuclear agreement was worth keeping at least for now. It's never been entirely clear how much in advance he knew Trump would opt out of the international pact.

Similarly, several official privately say Mattis did not know in well in advance of Trump's decision to suspend military exercises with South Korea as a concession to North Korea after the June 12 summit with Kim Jong Un.

"Secretary Mattis has to be very careful to read the signs, as much as he can, as to whether or not the President feels comfortable or continues to feel comfortable with his tutelage of the Pentagon," Leighton said.

Clapper said that he didn't think Mattis' patience would be infinite. "Even he, as dedicated as he is to this country and particularly to the men and women of the armed forces that he leads, even he would at some point I think would have a tipping point if he's completely cut out of things," Clapper said.

CORRECTION: This story has been updated to correct James Clapper's rank as a retired Air Force general.