Do you follow THE ORVILLE? This TV series begins as an affectionate parody of STAR TREK (even the uniforms look similar) but—as far as I can tell from reading about it and watching the first few episodes—gradually becomes more serious. One alien officer, who lives on board with his mate, belongs to an all-male species. In the second episode, he lays an egg, which hatches in the third episode. I'm not sure why he refuses to take a break from brooding the egg; doesn't his mate help? And what about an artificial incubator? Anyway, the baby turns out to be female, a rare abnormality in this species, for which the standard remedy is an immediate sex-change operation. The serious ramifications of this problem mesh incongruously with the premise of an all-male, oviparous species, which the writers apparently introduced in accordance with what the TV Tropes site calls "the Rule of Funny." In fact, an all-male species that reproduces by itself couldn't exist. The sex that produces ova is, by definition, female. To lay eggs, people of the species portrayed in THE ORVILLE would have to be either female (reproducing by parthenogenesis) or hermaphroditic. Members of an all-male species would have to breed with females of some closely related species (as some all-female types of fish can be fertilized by males of different but not too dissimilar species).
The vintage sitcom MORK AND MINDY gets away with the pregnant alien male motif by presenting it in a funny context with no attempt at a biological rationale. Mork not only becomes pregnant, he gives birth to a "baby" who looks like an old man and, conforming to the life cycle of Mork's species, ages backward.
Octavia Butler described her classic work "Bloodchild" as her "pregnant man story." Technically, the human men don't get pregnant, though. They serve as hosts for the eggs of the centipede-like aliens who've allowed the Terran colonists to settle on their planet. When the larvae hatch, the mother removes them from the host's body before they start to eat their way out—usually.
The TV program ALIEN NATION offers a serious portrayal of how a seahorse-like humanoid male pregnancy could work. The Newcomer aliens have three sexes, including a variant type of male who penetrates the female to catalyze her fertility in some unspecified process before the father inseminates her in the "usual" way. The embryo begins to develop in the female's uterus. Part-way through the pregnancy, the fetus is transferred (in a pool of water) from the female to the male, where it grows in a pouch on the man's abdomen. The baby comes out when the pouch splits open in the course of labor.
Here's a page of speculation about how a single-sex species (female) could work in terms of Earth biology:Single-Sex Species
In Joanna Russ's classic story "When It Changed," members of the all-female population reproduce by combining ova from two different women.
In isogamy, displayed by some life-forms such as algae and fungi, all gametes have the same size and morphology and so can be considered of the "same sex," which can't technically be labeled either male or female:Isogamy
Some Earth organisms switch reproductive methods in alternate generations between sexual and asexual reproduction (e.g., budding).
The heroine of Megan Lindholm's CLOVEN HOOVES falls in love with a satyr she thinks of as Pan. This highly unusual novel starts out as, apparently, fantasy, in which at first we can't even be sure the paranormal encounters are happening outside the heroine's mind. Eventually, however, the story becomes SF, when the satyr reveals that he belongs to an all-male species whose members reproduce by implanting clones of themselves into human women through sexual intercourse. Thus, when the heroine gives birth to her satyr baby son, he isn't biologically related to her at all.
The occasional birth of females among the alien race on THE ORVILLE suggests a possibility for the evolution of their alleged all-male species. Maybe they once reproduced alternately sexually (through ordinary mating between male and female) and asexually (by cloning). Maybe some genetic disorder caused the conception of females to cease except in rare cases. Asexual reproduction became the only remaining viable means of perpetuating the species and came to be considered the only normal way. So when the male character in that series lays an egg, he's producing a clone of himself.
Margaret L. CarterCarter's Crypt