Unable to apply from gitlab to microk8s

drone.yml

kind: pipeline
name: helm test
type: kubernetes

steps:
  - name: Apply template files
    image: alpine/k8s:latest
    commands:
    - kubectl apply -f ./persistentvolume.yml

Error log:

{"build.id":12,"build.number":12,"error":"Cannot transition status via :enqueue from :pending (Reason(s): Status cannot transition via \"enqueue\")","level":"warning","msg":"manager: cannot publish status","repo.id":1,"stage.id":12,"time":"2021-11-19T14:44:41Z"}
Apply template files: kubernetes has failed: container failed to start in timely manner: id=drone-l463mvex08xl0ybh4f0z image=docker.io/alpine/k8s:latest

After apply just get stuck on pending until timeout…
Any help would be greatly appreciated!

Fixed by checking Microk8s version

snap info microk8s

Match alpine/k8s version instead of latest

alpine/k8s:1.20.7