joe2310
joe2310

Reputation: 63

OpenWhisk cannot be installed in Microk8s due to error: serviceaccount "default" not found

I have a single node Kubernetes cluster, with Microk8s (1.26/stable) installed with snap, on Linuxmint (Ubuntu derivation).

I have installed helm too, more precisely helm 3.7/stable. Installed with snap command.

Using helm, I have tried to install OpenWhisk on this single node using this yaml for the helm command:

helm install owdev openwhisk/openwhisk -n openwhisk --create-namespace -f whisk.yaml

The whisk.yaml file contents is:

whisk:
  ingress:
    type: NodePort
    apiHostName: localhost
    apiHostPort: 31001
    useInternally: false

nginx:
  httpsNodePort: 31001

# disable affinity
affinity:
  enabled: false
toleration:
  enabled: false
invoker:
  options: "-Dwhisk.kubernetes.user-pod-node-affinity.enabled=false"
  # must use KCF as kind uses containerd as its container runtime
  containerFactory:
    impl: "kubernetes"

Once the command is executed, I get the following error:

Error: INSTALLATION FAILED: pods "owdev-wskadmin" is forbidden: error looking up service account openwhisk/default: serviceaccount "default" not found

Any idea of what I made wrong?

The following command is executed to get the secrets:

microk8s kubectl get secrets --all-namespaces
NAMESPACE     NAME                              TYPE                                  DATA   AGE
kube-system   kubernetes-dashboard-certs        Opaque                                0      24h
kube-system   microk8s-dashboard-token          kubernetes.io/service-account-token   3      24h
kube-system   kubernetes-dashboard-csrf         Opaque                                1      24h
kube-system   kubernetes-dashboard-key-holder   Opaque                                2      24h
default       lithops-regcred                   kubernetes.io/dockerconfigjson        1      18h
openwhisk     owdev-whisk.auth                  Opaque                                2      17m
openwhisk     owdev-db.auth                     Opaque                                2      17m
openwhisk     sh.helm.release.v1.owdev.v1       helm.sh/release.v1                    1      17m

Upvotes: 0

Views: 154

Answers (1)

joe2310
joe2310

Reputation: 63

It was missing the ingress addon on microk8s. Removing using helm openWhisk, adding ingress addon on microk8s, and re executing the openWhisk command:

helm install owdev openwhisk/openwhisk -n openwhisk --create-namespace -f whisk.yaml

OpenWhisk get installed.

Upvotes: 0

Related Questions