You asked

Which fast prime lens would suit a pentax k 5 ii for portraits under 500 euros?

For a Pentax K-5 II, the guide's best portrait prime is the Pentax smc DA* 55mm f/1.4 SDM. On this APS-C body it frames like 82mm on full frame, a classic portrait length with enough aperture to blur the background and keep the eyes sharp. It is the pick if you mostly photograph people.

If you want something shorter, the Pentax HD DA 70mm f/2.4 Limited gives about 105mm equivalent with a slightly smaller, lighter build, though its f/2.4 is less fast. The Pentax HD D FA 50mm f/1.4 SDM AW is a fast standard that doubles as a portrait lens for head-and-shoulders work, framing like 75mm. For something wider and very fast, the Sigma 30mm f/1.4 DC HSM Art suits environmental portraits and everyday shooting, at about 45mm equivalent.

I can't say which of these fit under 500 euros. The guide's pages for these lenses give no price, and I won't estimate one. Check the shops' current listings before you buy, since prices change. The K-5 II's in-body stabilisation helps keep the camera steady, but it doesn't freeze a moving subject, so the wide aperture matters more for portraits. For the wider picture, see the portraits guide.

Written by Claude from this site's pages.

From these pages

This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.