The starting pay is pretty good, depending on experience. The jobs are hard to get, and a lot of people want them.

It's the job of an NASA astronaut. America is gearing up for a new era of human spaceflight -- with plans to try to reach beyond the moon and perhaps to Mars. There's a thriving commercial sector driven by companies like Boeing and Space X.

When NASA went looking for a new class of astronaut trainees, it got 18,300 applications. Only 12 were selected. They reported for duty last month for a grueling training program.

CNNMoney wanted to know more about an astronaut's job. We spoke with Donald Pettit, NASA's oldest active astronaut at age 62, and Greg Johnson, a former astronaut who is now the president of the Center for the Advancement of Science in Space.

How do you qualify for the job?

NASA stipulates that qualified applicants must have a bachelor's degree in a field of science, technology, engineering or math. Post-graduate study or work experience is also required. The space agency has trained astronauts with all sorts of backgrounds -- such as a medical doctor, oceanographer, even a veterinarian.

Physical demands can be onerous. Applicants need good eyesight, must stand between 5'2" and 6'3" and have good blood pressure ("not to exceed 140/90" in a sitting position).

Candidates also must pass a difficult endurance test and impress the NASA team during a series of interviews.

"It's a very special opportunity," Johnson said. He advised the next class of astronaut candidates to "take advantage of it" because "for each astronaut, there's 100 behind us equally qualified."

Then what?

Those who make the cut enter a two-year "training and evaluation" period.

"It's like getting a full four-year college degree compressed into two years," Pettit said. "There's no summer breaks."

Trainees learn skills that may come in handy if they're selected for an actual mission.

Among the tasks:

-- Swim laps in a 25-meter pool and tread water for 10 minutes while wearing a flight suit and tennis shoes.

-- Become SCUBA certified. (The underwater environment is actually quite similar to the vacuum of space.)

-- Ride up and down in a jet aircraft to mimic the zero-gravity environment in space. Trainees may take 40 of these rides in a single day.

-- Learn to speak some Russian. Astronauts need to be able to talk with cosmonauts at the space station and communicate during launch.

Since the United States retired the Space Shuttle program in 2011, Russian space vehicles have ferried American astronauts to and from the International Space Station.

Astronauts also have to get comfortable in the puffy white suits that astronauts wear when they go on space walks. And Pettit said it's nothing like you see in the movies.

"They're hot and uncomfortable, and when you get out of them, you kind of slither out of them like a worm...like a slimy creature that just crawled out of a chrysalis," Pettit joked.

When do they go to space?

Even after astronauts complete the program, they still have to complete specific training based on what they'll be doing in space. All that starts long before they reach the launch pad.

For example, if an astronaut is tapped to complete a six-month stint at the space station, it requires two to three years of extra training.

But while space is memorable, there's a lot of action back on Earth. "For every astronaut in space, there's 1,000 people on the ground doing the real work," Pettit said.

What do they do in space?

Astronauts' assignments during trips in space include performing experiments, conducting research or repairing hardware. Those tasks eat up most of their time.

Johnson flew on short-term orbital Space Shuttle missions, so his flight team worked almost constantly. For the little time he did have off, Johnson said he and his crewmates would snap photos, capture video and phone home to their families.

Johnson remembers one video chat with his wife and children, during which he was able to show them the Earth whisking by out the window. They got an aerial view of Michigan to Madagascar in 20 minutes.

Pettit has done more long-term missions. In total, he's lived aboard the International Space Station for more than six months. Still, he only had one day off per week.

"I don't like to do anything on orbit I can do on earth. I'll make like three phone calls in a six month period," Pettit said. "I spend my time taking advantage of what the space environment offers: incredible views, the ability to do amazing photography, and the science opportunity -- I would devise my own little science demonstrations."

Are there any inside jokes?

Pettit's class in 1996 was called the "sardines" -- because 44 trainees were packed into one class.

Johnson's class in 1998 was called the "penguins," a nod to the flightless bird and the fact that it would be eight years before any of them would fly in a mission. The 2017 class doesn't have a name yet.

What's the pay like?

It's a labor of love.

"Nobody gets rich," said Pettit, who has about two decades of astronaut experience under his belt.

NASA says annual salaries for astronaut candidates -- those first starting out -- range from $66,026 per year up to $144,566.

"The grade is determined in accordance with each individual's academic achievements and experience," NASA explains.

Full-fledged astronauts can make up to $150,063 per year based on 2017 rates, unless they come in through the military. Active duty members are paid based on military rates, which vary widely depending on their rank and years of experience.

NASA also places quite a few restrictions on astronauts to prevent to personal financial gain.

They can't earn royalties if they write a book or charge speaking fees. They also can't accept gifts from, say, an aerospace company that wants to treat them to a free round of golf.

"But, to be honest, we're so busy doing our day job -- Who has time to go off and play golf with some aerospace people?" Pettit laughed.