Why deploying charts does not work in micrk8s controller?

Hello community, I am learning and even after reading documentation, I am feeling very lost.

  1. Question: deploying charts only works in LXD controller. In microk8s does not work. What can I do? Why is this happening?

Listing Controllers, there are two. A microk8s (the one already installed with Ubuntu 20.04) and the LXD Hypervisor for localhost (that I dont know perfectly what it is)

Controller        Model                   User   Access     Cloud/Region         Models  Nodes    HA  Version
lxd-staging*      lxd-staging-model       admin  superuser  localhost/localhost       3      1  none  2.8.7
microk8s-staging  microk8s-staging-model  admin  superuser  microk8s/localhost        2      1     -  2.8.7

Listing models, one for each controller

administrator@master-ubuntu:~$ juju models -c lxd-staging
Controller: lxd-staging

Model               Cloud/Region         Type  Status     Machines  Access  Last connection
controller          localhost/localhost  lxd   available         1  admin   just now
default             localhost/localhost  lxd   available         0  admin   3 minutes ago
lxd-staging-model*  localhost/localhost  lxd   available         0  admin   31 seconds ago

administrator@master-ubuntu:~$ juju models -c microk8s-staging
Controller: microk8s-staging

Model                    Cloud/Region        Type        Status     Access  Last connection
controller               microk8s/localhost  kubernetes  available  admin   just now
microk8s-staging-model*  microk8s/localhost  kubernetes  available  admin   never connected

Deploying in LXD, works as expected.

administrator@master-ubuntu:~$ juju models
Controller: lxd-staging

Model               Cloud/Region         Type  Status     Machines  Access  Last connection
controller          localhost/localhost  lxd   available         1  admin   just now
default             localhost/localhost  lxd   available         0  admin   10 minutes ago
lxd-staging-model*  localhost/localhost  lxd   available         0  admin   8 minutes ago

administrator@master-ubuntu:~$ juju deploy mysql mysqldb
Located charm "cs:mysql-58".
Deploying charm "cs:mysql-58".

Deploying in microk8s, error.

administrator@master-ubuntu:~$ juju models
Controller: microk8s-staging

Model                    Cloud/Region        Type        Status     Access  Last connection
controller               microk8s/localhost  kubernetes  available  admin   just now
microk8s-staging-model*  microk8s/localhost  kubernetes  available  admin   never connected

administrator@master-ubuntu:~$ juju deploy mysql mysqldb
ERROR series "xenial" in a kubernetes model not valid

How can I deploy charts in microk8s?

How can I work and list the pods deployed in LXD controller? Because of course, using microk8s commands does not work, and they do not appear.

Thanks all of you for your help.

Hi @sarony11
From the error message, you can see the series doesn’t match here.
k8s charms have the series set to kubernetes.

Here is a testing k8s charm you can try:

$ juju deploy cs:~juju/mariadb-k8s-3 -m microk8s-staging:microk8s-staging-model

Thanks for you replay. As you say, this works… then my next question would be… what needs a chart to have the tag kubernetes and be compatible with microk8s?

As far as I search in https://jaas.ai/ there are just a few and there is not an advance search to know what charts can I apply, is not?

Apart from documentation, do you know any tutorial or guide to create my own charts compatibles with microk8s?

Thanks a lot.

Hi @sarony11
https://github.com/canonical/operator/blob/master/README.md would be a good step to start.