Mark Wahlberg knows that a part of his job is looking the part -- but it's not as easy as it looks.

The actor, who is set to star in Netflix's "Spenser Confidential," directed by Peter Berg, revealed in a recent interview with Entertainment Tonight that he was expected to be "ripped" for the role but was at a point in his life where he had been "eating what I want and drinking what I wanted."

Speaking to the outlet, Wahlberg confessed he went on a strict diet ahead of the film, resulting in him losing 10 pounds in just five days.

MARK WAHLBERG SHOWS OFF 6-MONTH BODY TRANSFORMATION — AND FANS ARE STUNNED: 'UNBELIEVABLE'

Mark Wahlberg attends the LA Premiere Of HBO's "McMillion$ at the Landmark Theater on January 30.

Mark Wahlberg attends the LA Premiere Of HBO's "McMillion$ at the Landmark Theater on January 30. (Gregg DeGuire/FilmMagic)

"We did 'Lone Survivor' right after '2 Guns' and before that I did 'Pain and Gain,' so I was really heavy and kinda bloated by the time we got to 'Lone Survivor,'" Wahlberg explained.

"And then we did 'Deepwater Horizon' where I was getting as heavy as possible drinking beer and fried food to play a guy who worked on an oil rig. Then we did 'Patriots' Day' where I was limping around, a cop who was kinda out of shape."

Wahlberg said he ate clean and "trained like a crazy person" for five months to meet Berg's needs. But he also saw dramatic results in less than a week after a liquid diet.

MARK WAHLBERG DROVE A TOW TRUCK BEFORE FAME

"I just did a bone broth and a fast and a cleanse and I literally lost 10 pounds in five days. I lost five percent body fat and I lost 20 points of visceral fat literally in five days," the "Ted" actor explained.

"Just bone broth and steamed vegetables after the first three days and then a little bit of protein at night and that was it," he continued.

MICHELLE WILLIAMS RECALLS BEING ‘PARALYZED’ BY NEWS MARK WAHLBERG WAS PAID MORE FOR 'ALL THE MONEY' RESHOOTS

Another big star who landed a role in the film is Post Malone. Wahlberg recalled what it took to get the "Circles" singer on board for his first-ever acting role.

CLICK HERE TO GET THE FOX NEWS APP

"This whole idea of putting him in a film started at my house, at my wife's 40th birthday. We were hanging out, having a couple of drinks, and he was like, 'You know, I really wanna be in a movie. I'd really wanna die in a movie,'" Wahlberg recalled. "I said, 'Well, I don't know if I can kill you off in the movie, but we'd like to put you in the movie and maybe we can have a fight. I can beat the crap out of you and you can stab me.' And he said, 'Absolutely.'"

"Spenser Confidential" is set to debut on Netflix on March 6.