How is liberation achieved? If the path leads to liberation then liberation should be conditioned and impermanent. But nirvana is beyond extremes so the path cannot lead to nirvana. How does it work then?
The eightfold path is said to be conditioned, as follows:

To whatever extent there are phenomena that are conditioned, the noble eightfold path is declared the foremost among them. AN 4.34

Where as Nirvana is said to be unconditioned:

There is, bhikkhus, a not-born, a not-brought-to-being, a not-made, a not-conditioned. If, bhikkhus, there were no not-born, not-brought-to-being, not-made, not-conditioned, no escape would be discerned from what is born, brought-to-being, made, conditioned. But since there is a not-born, a not-brought-to-being, a not-made, a not-conditioned, therefore an escape is discerned from what is born, brought-to-being, made, conditioned. Ud 8.3

What is plainly obvious is the liberation of an arahant (from suffering) is permanent (until the ending of the life of the arahant).

Tassata sā vimutti sacce ṭhitā akuppā hoti.Tañhi, bhikkhu, musā yaṃ mosadhammaṃmosa taṃ saccaṃ yaṃ amosadhammaṃ nibbānaṃ
His release (liberation), being founded on truth, does not fluctuate, for whatever is deceptive is false; Nirvana — the undeceptive — is true. MN 140

Therefore, liberation (from suffering) must be unconditioned, just as Nirvana is unconditioned.
In summary, the eightfold path does not create or condition Nirvana. Instead, the eightfold only removes the obscurations to Nirvana (which was always there but unknown due to obscurations).

It is just as if a man, traveling along a wilderness track, were to see an ancient path, an ancient road, traveled by people of former times. He would follow it. Following it, he would see an ancient city, an ancient capital inhabited by people of former times, complete with parks, groves &amp; ponds, walled, delightful.
In the same way I saw an ancient path, an ancient road, traveled by the Rightly Self-awakened Ones of former times. And what is that ancient path, that ancient road, traveled by the Rightly Self-awakened Ones of former times? Just this noble eightfold path: right view, right aspiration, right speech, right action, right livelihood, right effort, right mindfulness, right concentration.
I followed that path. Following it, I came to direct knowledge of... cessation...
Nagara Sutta: The City