You asked
Should I switch from the pentax k 5 ii to mirrorless?
Whether to switch depends mostly on what the K-5 II isn't doing for you. The site's first camera guide says most people should start with a mirrorless camera, mainly because the viewfinder shows the exposure before you shoot and autofocus can find and follow eyes. If those are the things you're missing, a switch makes sense.
The bigger cost is lenses. The K-5 II's catalogue page lists a wide range, including fast options such as the Pentax HD D FA* 85mm f/1.4 and the Sigma 35mm f/1.4 DG HSM Art. Moving to a new mount means buying those lenses again or finding adapters, and the guide puts its money on lenses, not bodies. Old manual K lenses fit the K-5 II directly, so your existing glass has value.
The K-5 II also has in-body stabilisation, which helps steady the camera but does nothing for moving subjects. For dim light and action, a fast lens and a larger sensor matter more, and the lenses guide explains why a wide aperture is so useful there.
This site's pages I can draw on don't name a specific mirrorless body, so I can't say which one would suit you best. If your photography is working well, keep the K-5 II and spend on a lens. If autofocus tracking or the live exposure preview is what frustrates you, a mirrorless system is the right next step.
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}.