Michael Pineda has been changing the narrative. You know, the one about not knowing which Pineda — the good one or the bad one — is going to show up for any given start.

After throwing a dud in his first start, he has been giving the Yankees something they have craved from him — a semblance of consistency.

The 28-year-old righthander has allowed three or fewer earned runs in eight straight starts, his longest streak of that nature since a nine-start run in 2014.

Pineda faced the Royals on Monday night for the second straight start after beating them last Wednesday in Kansas City. This time he earned a 4-2 win at Yankee Stadium, yielding two runs, six hits and a walk and striking out six in 6 1⁄3 innings.

So after going 6-12 with a 4.82 ERA in 2016, Pineda is up to 5-2 and his ERA is down to 3.35 in this walk year. His strikeout-versus-walk numbers are rather impressive with 61 Ks and nine walks in 53 2⁄3 innings.

“I think it’s the ability to get big outs when he needs to get them,” Joe Girardi said about the difference. “A lot of times, that’s really what it comes down [to] for pitchers . . . I think for Mike, he probably learned a lot from last year.”

advertisement | advertise on newsday

The first two innings were as easy as 1-2-3. Then Jorge Bonifacio opened the third by depositing a 93-mph fastball into the leftfield seats. That marked the 11th homer off Pineda, nine of them solo shots.

Kansas City wasn’t done with him in that inning. Whit Merrifield reached on an infield hit, a ball that deflected off Pineda. Alcides Escobar followed by ripping an RBI double into the leftfield corner. But Pineda stranded Escobar at third.

“Whatever the situation that happens in the game, I just have to calm myself down and execute my pitches,” he said.

Eric Hosmer led off the fourth with a double. Then Pineda won a 12-pitch at-bat with Salvador Perez, inducing a pop to first.

“He really [defended] home plate, but I’m fighting and making my best pitch, just down,” said Pineda, who finished off the inning by fanning Brandon Moss and Bonifacio.

Yankees videos

A walk and a wild pitch gave the Royals a runner at second with none out in the fifth, but Pineda left him there.

“With the kind of stuff that Mike has, good fastball, good off-speed pitches, kind of really work off of that, that’s what he can do,” Aaron Judge said. “He’s got to keep doing that. Just keep going out there relaxed, attacking the strike zone, attacking hitters, [and] good things will happen.”