Being an astronaut is permissible both for men and women.
The points to consider are the same as in other occupations for Muslims:
– A man and a woman who are not lawfully forbidden to marry each other (who are namahram) must not be alone indoors where there is not the possibility of a third person to get in.
– One woman is allowed to be together with a group of men, even all of whom may be namahram.
– Rulings of hijab must be observed in any case.
Since we do not have more information about the life in a space shuttle, this is all we can say.