Refactor kube auth

Partially resolves #2302