Like its overachieving predecessors, full of doctorates and service medals, the newest class of NASA astronauts has its share of decorated military officers and esteemed scientists — even a Navy SEAL who got his medical degree from Harvard. Previous classes may have had John Glenn, Neil Armstrong and Sally Ride. But the class of 2020 has Jonny Kim, who “could kill you and bring you back to life. And do it in space,” as Sen. Ted Cruz (R-Tex.) said earlier this year at a graduation ceremony.

Chosen from a pool of 18,000 applicants, the most ever in NASA’s history, Kim’s class has opportunities unlike any before it — the ability to fly on two new commercially developed spacecraft designed to go to the International Space Station, as well as a third capsule intended to take astronauts to the moon.

It is a significant change from the previous decade, when, after the space shuttle was retired in 2011, the only way to space was by hitching a ride on a Russian rocket that blasted off from a desolate launchpad in Kazakhstan — so far away that many Americans didn’t realize NASA’s astronauts were still flying to space routinely.

Now there is an array of flying options coming to fruition, all launching from Cape Canaveral, that could provide astronauts a variety of flight opportunities not seen in decades. There’s SpaceX’s Dragon spacecraft, which in May became the first spacecraft to launch NASA astronauts from United States soil in nearly a decade. Boeing is also working to get its Starliner capsule ready, with a first crewed flight set for sometime next year. And NASA hopes Lockheed Martin’s Orion spacecraft will fly astronauts on a trip around the moon by 2023.

All of which means it’s an exciting time to be an astronaut, especially as the highly coveted assignments for the 48-member NASA astronaut corps in Houston are being handed out. It’s also a chance for NASA to showcase its astronauts and attempt to rekindle the national enthusiasm they once inspired. In the decades since Apollo, when astronauts were household names and revered as heroes, they are now largely anonymous.

Jim Bridenstine, the NASA administrator and a former member of Congress, has led a campaign of sorts to highlight this new generation of astronauts. He’s pushed for astronauts to be able to appear in commercials, even on cereal boxes. That, in turn, would not only raise the agency’s profile in popular culture, but also in Congress at a time when NASA is lobbying reluctant members for the money it needs to return humans to the moon.

“I’d like to see kids growing up, instead of maybe wanting to be like a professional sports star, I’d like to see them grow up wanting to be a NASA astronaut, or a NASA scientist,” Bridenstine said in 2018.

The last few months have seen a flurry of activity. In May, NASA astronauts Bob Behnken and Doug Hurley became the first Americans to fly to orbit from United States soil since the space shuttle was retired in 2011. That test flight of SpaceX’s Dragon spacecraft opened the door for the first operational mission, scheduled for next month. That flight will feature a crew of four, NASA astronauts Victor Glover, Shannon Walker, Michael Hopkins and Japanese astronaut Soichi Noguchi.

In August, shortly after the return of SpaceX’s Dragon capsule, NASA announced that Megan McArthur and Shane Kimbrough were assigned to SpaceX’s second operational mission, sometime next year. Then a few weeks later, Jeanette Epps was tapped to fly on Boeing’s yet-to-be-flown Starliner. Still to come, in the biggest assignment since Apollo: the crews for the first flights to the moon in about 50 years.

But how the assignments get made remains a mysterious process, cloaked in secrecy. As it has from the days of Mercury and Apollo, the astronaut office doesn’t talk much about how it decides who gets to fly or why. When it comes to crew assignments, NASA acts more like the NSA — the National Security Agency, the clandestine intelligence agency that some say stands for “Never Say Anything.”

“The process is mysterious on the inside, too,” Leroy Chiao, a former NASA astronaut, said in an interview. “In the astronaut office we used to say that the only thing more mysterious than being selected to a crew was how you got selected to be an astronaut in the first place.”

No one knows that better than Epps, who had been selected to fly on the Russian Soyuz in a mission that would have made her the first African American to spend an extended period of time on the International Space Station, though six have visited the orbiting laboratory.

But in 2018, Epps was suddenly pulled from the mission and replaced by Serena Auñón-Chancellor, a fellow astronaut. Rumors swirled — was it because Epps was Black? Was there a conflict with her Russian counterparts? Even Epps, a former technical intelligence officer at the CIA, was baffled about the move, saying months later, “I’m not sure of the reasons myself.”

“A number of factors are considered when making flight assignments,” a spokesperson for NASA said at the time. “These decisions are personnel matters for which NASA doesn’t provide information.”

But Epps is getting a second shot, this time on Boeing’s Starliner spacecraft, which still needs to be certified by NASA for human flight. Again, there was no explanation for the decision when it was announced last month. Just a terse news release from the Johnson Space Center in Houston that she would join NASA astronauts Sunita Williams and Josh Cassada on the mission.

“They keep it very close hold,” said Janet Kavandi, who flew three space shuttle missions as a NASA astronaut and now heads Sierra Nevada Corp.’s space systems business. “You usually have no idea you’re being considered for a mission.”

The selection usually comes as a sudden, and joyous, surprise: “It can be anywhere anytime,” Kavandi said.

In the late 1990s, Kavandi was speaking at an elementary school and “knee-deep in kindergartners” when suddenly she was summoned to the principal’s office to take an urgent phone call from the head of the astronaut office. Filled with dread, she knew this could not be good and girded herself for what was to come.

“I just wanted you to know you’ve been assigned to the mission,” she was told.

When former NASA astronaut Mike Massimino was chosen for his first flight assignment, a mission to the Hubble Space Telescope in 2002, Steve Smith, the deputy chief astronaut, knew the Friday before but was sworn to secrecy until Monday. The pair were friends and neighbors, with kids the same age, and they spent the weekend together.

Saturday was Massimino’s birthday, but still Smith couldn’t say a word. So Monday morning at 7:30 a.m., Smith showed up on his neighbor’s front door “and handed me an illustrated children’s book about the Hubble Space Telescope.”

“What the heck is this for?” Massimino said, according to his memoir, “Spaceman.”

“I think you better read up on this,” Smith said. “Because you’re going to Hubble.”

Massimino’s next mission assignment was just as surprising. He and a fellow astronaut were meeting with Steve Lindsey, then the newly appointed head of the astronaut office, to discuss another upcoming mission to the Hubble telescope. The astronauts looked confused as he talked about the particulars, so he stopped and said, “You do know you’re on it, right?”

There are a few reasons the astronaut office remains so mum about the flight assignments. It’s a personnel decision, and a highly public one, with big egos on the line. But there are also lots of outside influences that would like to exert force over the astronaut office — including Capitol Hill.

The reticence stems in part “to avoid politics influencing the selection process,” said Robert Pearlman, a space historian and journalist who edits the website “It could be an opportunity for senators wanting to see their home state astronauts fly.”

There also have been rivalries between the branches of the military that have sent officers to the astronaut corps. And the astronaut office prizes teamwork over individuality. The leadership in Houston strives to remain evenhanded and fair among a few dozen of the most ambitious individuals on the planet.

“They want to avoid rivalry within the astronaut office itself, which would not be healthy for what is supposed to be a team working together to achieve a common goal,” Pearlman said.

Capabilities matter, and so does experience. And the chief astronaut, who is primarily responsible for the decision, looks at a variety of factors, the most important of which is: “What is going to make the mission most successful,” said Peggy Whitson, who was chief astronaut from 2009 to 2012, a position now held by Pat Forrester.

The International Space Station is a sort of flying Gilligan’s Island, where everyone has to get along and bring their own individual expertise. If the mission calls for a lot of repairs, you want good space walkers. If there is a lot of science to be done, you want astronauts adept at, say, researching rodents or growing human tissue.

“It gets very complex,” Whitson said. “There are other factors as well: When’s the last time the person flew? Whose turn is it to fly? Because you want to spread the wealth as much as possible.”

When it came to the inaugural flight of SpaceX’s Crew Dragon, NASA chose two of its best, Behnken and Hurley. Both are veteran astronauts and former military pilots, whom the agency knew would stay cool in case anything went awry. For future missions, it’s assembling more diverse teams, pairing rookies with seasoned astronauts, scientists with military pilots to give crews a broad expertise.

NASA has long looked for a “mix of specialties and backgrounds so that everyone would educate each other with the best of what they knew,” said Michael Cassutt, who has written biographies of Deke Slayton and George Abbey, both NASA legends who spent years selecting astronauts for missions.

The evaluation is rigorous, the training intense and the stakes are high because NASA is “about to give you responsibility for a multibillion-dollar vehicle where errors can be fatal.”

Bridenstine has said that the agency would send the “next man and the first woman” to walk on the moon by 2024, an accelerated timeline dictated by the White House. It appears unlikely that the agency will be able to meet that deadline, but it is pressing ahead and plans to send astronauts on a trip to orbit the moon by 2023, as part of its Artemis program.

That has had a public relations benefit as well that Bridenstine, in his quest to sell Congress on the White House’s moon plan, has used to woo members, especially Democrats. When he pitched Rep. Anna G. Eshoo (D-Calif.) and House Speaker Nancy Pelosi (D-Calif.) at an event last year, he got this reaction: “I look forward to a woman astronaut landing on the moon,” Eshoo said.

“As far as having a woman step foot on the moon, our hopes are riding on you, Jim.”

The selection of the astronauts for those missions would be the most anticipated crew assignments since the Apollo-era 50 years ago. But it will be different in one key respect, Bridenstine said: He would like to see the missions showcase an astronaut corps that is far more diverse than those of the 1960s and ’70s.

“When we do select the corps of astronauts that will be flying, they must be reflective of the nation as a whole,” he said in an interview. “It’s about inspiration. We want every single person to be able to see themselves doing what these American heroes are doing.”