Knicks guard Ronnie Brewer had a left knee arthroscopy for a medial meniscus tear that had occurred during the past two weeks, the team announced yesterday.

He is expected to be out for approximately six weeks.

That means the former Bulls shooting guard will miss the first two weeks of training camp, which starts Oct. 2.

But Brewer tweeted he would play in the regular season opener.

“If y’all haven’t already heard I had successful meniscus surgery. Started rehab this morning. Minor setback for a major comeback,” he tweeted.

“I appreciate the prayers and get well soons from everyone. Much appreciated. Will for sure be 100 [percent] for season opener.”

The Knicks will open their regular season Nov. 1 against the Nets at the brand-new Barclays Center in Brooklyn.

Brewer was signed in August for depth while Iman Shumpert rehabs from a torn ACL. Shumpert is expected to miss the start of the season.

If Brewer is slow to recover, J.R. Smith could see an increase in minutes at the opening of the season.

Brewer, who will enter his seventh season in the league, played in all 66 games for the Bulls last season, starting 43 of them as the team dealt with injuries to Derrick Rose.