Skip to content
Browse files

ci: sudo microk8s.$command

Apparently microk8s commands now require `sudo` to run [1]. Even
`kubectl`. It's a bit annoying to have to do this, but without it all of
our builds are blocked.

According to microk8s itself, we could try a different approach:

Insufficient permissions to access MicroK8s.
You can either try again with sudo or add the user travis to the 'microk8s' group:
    sudo usermod -a -G microk8s travis
The new group will be available on the user's next login.

Although that would require a new login during a CI run, which I'm also
not a fan of.

[1] ubuntu/microk8s#640
  • Loading branch information...
juliogreff committed Sep 12, 2019
1 parent d44aab1 commit f18b24d7414e66995e8b1805374ffa86681a9f35
Showing with 5 additions and 4 deletions.
  1. +5 −4 .travis.yml
@@ -7,13 +7,14 @@ services:
- docker
- sudo snap install microk8s --classic --channel=1.14/stable
- sudo snap alias microk8s.kubectl kubectl
- curl -L > $(go env GOPATH)/bin/kubectl
- chmod +x $(go env GOPATH)/bin/kubectl
- mkdir ~/.kube
- microk8s.config > ~/.kube/config
- sudo microk8s.config > ~/.kube/config
- curl -sfL |
sh -s -- -b $(go env GOPATH)/bin v1.17.1
- microk8s.status --wait-ready
- microk8s.enable registry
- sudo microk8s.status --wait-ready
- sudo microk8s.enable registry
install: true
- "./ci/ && ./ci/ && ./ci/"

0 comments on commit f18b24d

Please sign in to comment.
You can’t perform that action at this time.