I'm pretty sure they never did. Kazakhstan was a part of the "Great Game" - a contest for influence in central Asia between the Russian and British Empires in the 19th century - but it was Russia who came to dominate and eventually annex the region.
Where did you hear the claim that Britain invaded Kazakhstan?