Huge rocket ship carrying humans to a distant destination to resettle. The bridge of the craft is inaccessible except for a tube where food is sent up. The passengers revere "the tree".
The 1978 Doctor Who story "Underworld" features a generation ship, the P7E where most of the crew have been enslaved and provide food and fuel to the controlling entity on the bridge of the ship, which is accessed via a vertical shaft.
Most of the population live as slaves digging rock for fuel and sustenance, but they are culled and killed in rock collapses called Skyfalls. This situation is overseen by guards who are in turn responsible to two robots called Seers. In overall control is the Oracle, a powerful super-computer which has shaped the perverse society. Evidently the P7E became trapped in the planet millennia earlier and the entire basis of the mission was lost over time. The Doctor and Leela encounter Idas, a young man nearly killed in a Skyfall, learning how the local population is managed and terrorised. The Seers and Oracle exist in a protected Citadel at the heart of the planetoid (clearly the P7E) and the Doctor, Leela and Idas venture there, in the process rescuing Idas’ father Idmon who was due to be sacrificed to the Oracle. Other slaves are freed too, and flee to the R1C where Jackson makes them welcome. However, the crucial race banks remain in the control of the Oracle. The Doctor, Leela, and Idas venture to the Citadel again to get the precious cargo.
However, what does not quite match is the "tree" element.