Charmed MySQL K8s How to | Deploy on MicroK8s

Deploy on MicroK8s

This guide assumes you have a running Juju and MicroK8s environment.

For a detailed walkthrough of setting up an environment and deploying the charm on MicroK8s, refer to the Tutorial.


Bootstrap a juju controller and create a model if you haven’t already:

juju bootstrap microk8s <controller name>
juju add-model <model name>

Deploy MySQL:

juju deploy mysql-k8s --channel 8.0/stable --trust

:warning: The --trust flag is necessary to create some K8s resources.

See the juju deploy documentation for all available options at deploy time.

See the Configurations tab for specific MySQL parameters.

Sample output of juju status --watch 1s:

Model   Controller  Cloud/Region        Version  SLA          Timestamp
mysql   overlord    microk8s/localhost  2.9.38   unsupported  22:48:57+01:00

App        Version    Status  Scale  Charm      Channel     Rev  Address         Exposed  Message
mysql-k8s  8.0.31     active      1  mysql-k8s  8.0/stable  75   10.152.183.234  no       

Unit          Workload  Agent  Address      Ports  Message
mysql-k8s/0*  active    idle   10.1.84.74          Primary