The reigning champions held firm for the entire second period - 51 minutes in total - after Mose Masoe’s try just before the half-hour mark.
They won 20-18 and McDermott admitted: “They’re talking about the defence in the dressing room after.
“It’s a huge part of the game, and you can’t go anywhere without strong D.
“You can’t keep nicking games by a couple of points, but if you put it into context... you don’t come to Hull KR on a Sunday afternoon in a non-televised game and expect an easy game.”
After losing by just a point to Wigan Warriors and Hull FC in consecutive performances, it was a welcome win for Leeds.
On his side’s overall performance, McDermott said: “I’d say the same thing I’ve been saying for the last three weeks.
“It was really good in effort, and parts of our defence were outstanding, while some patches in offence were okay to good.
“But there’s lots of improvement in us, and this week, we come away with a tight win instead of a tight loss.
“We rarely come here and don’t sweat.
“There’s some hot periods during the game and there were some poor performances in the first half.
“But in the second half, to keep them try-less and manage everything else that was going on in the game was good,” he added.
Leeds, who move up to fifth, host Warrington Wolves on Friday night.