Rudyard Kipling’s Gentlemen-Rankers first appeared in Barrack-Room Ballads and refers to young men of the privileged classes who may have suffered the indignity of bankruptcy or scandal, and joined the "rank-and-file" of the British Army as privates.
The term Gentlemen-ranker refers to a former office, either by education or social station, who has somehow disgraced himself and been turned to a common soldier. Kipling writes this poem for these soldiers and gives many allusions as to the hardship they face fighting in distant lands for the British Empire.
The song has an unusual structure, one ably delivered by the narrator. If you are interested in the life of soldiers in the British Army of Kipling's time, you should find this poem enlightening and enjoyable.