Both a former prosecutor & public defender
The governor appoints justices from a list submitted by the Kansas Supreme Court Nominating Commission, which consists of representatives from each congressional district. Justices serve a one-year term and then face a retention election to secure a full six-year term. Subsequent retention elections occur in the next even-year general election after their six-year term ends.
Selection method sources:
Ballotpedia, Judicial Election Methods By State; Brennan Center for Justice, Judicial Selection: An Interactive Map