Microk8s sudo requirements

A recent change to microk8s requires the explicit use of sudo for commands that require elevated privileges.

My CircleCI job installs microk8s via snap, however in order to be able to run the microk8s commands the circleci account needs to be a member of the microk8s group, in normal circumstances this would occur if i logged out and logged back in again, however this isn’t possible in a circleci job.

Has anyone come across this type of problem before, there are some solutions to this problem listed here, but i would rather avoid them if possible.