Sign up for our special edition newsletter to get a daily update on the coronavirus pandemic.

It’s not all dried beans and packaged ramen — a Michelin-starred chef is serving up free lunch in cities ravaged by the coronavirus.

Chef José Andrés is transforming eight of his acclaimed restaurants in New York City and Washington, DC, into gourmet soup kitchens of sorts for those who are struggling to make ends meet in the midst of the coronavirus pandemic.

While the to-go only meals cost $7 for guests who can afford it, volunteers running the community kitchens will be flexible with patrons who may be out of work or financially constrained due to a near shutdown of daily life. There’s also an option to donate a meal to someone else who might need it.

“Those who cannot afford to pay we will welcome as well,” Andrés said in a statement, adding that many of his restaurants will otherwise be closed.

In New York City, where Mayor Bill de Blasio ordered all restaurants to offer only take-out or delivery, Andrés’ Little Spain’s Spanish Diner in Hudson Yards will operate as a community kitchen from its glass garage doors. The rest of the mercado will remain closed. Some of Andrés’ other restaurants in Washington, DC, will also be serving to-go food.

The community kitchen will be open from noon to 5 p.m. daily beginning Tuesday, March 17, offering only takeout service. Also, all his employees are getting paid leave for at least the first two weeks.

It’s among the measures restaurants around the world are forced to take to address the pandemic. In New York City, restaurants such as Osteria 57 in Greenwich Village are offering discounted menus with to-go service.

But many say they may not be able to weather the financial impact. Jeremy Merrin, who operates the city’s Havana Central chain of Cuban eateries, told The Post last week that his business has dropped 50 percent in recent weeks.

“I’ve lost over $100,000 in catering and events through August, business that I won’t make up again,” Merrin told The Post. “The biggest question right now is whether I stay open or close to preserve my cash.”