Kubernetes – how to install microk8s

  devops
# create an alias so that you use kubectl instead
sudo snap alias microk8s.kubectl kubectl

# give yourself permissions, then log out, log back in
sudo usermod -a -G microk8s ${USER}

# create a secret (source: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ )
 kubectl create secret docker-registry regcred --docker-server=registry.research.example.com --docker-username=xxxxxxxxxxxxx --docker-password=xxxxxxxxx --docker-email=xxxxxxxxxxxxxxx@gmail.com

# inspect the secret you made
kubectl get secret regcred --output=yaml

# decode it if you want to see your login/pass
kubectl get secret regcred --output="jsonpath={.data.\.dockerconfigjson}" | base64 --decode