Charmed MySQL K8s
- Canonical
- Databases
Channel | Revision | Published | Runs on |
---|---|---|---|
8.0/stable | 180 | 02 Sep 2024 | |
8.0/stable | 181 | 02 Sep 2024 | |
8.0/candidate | 180 | 26 Aug 2024 | |
8.0/candidate | 181 | 26 Aug 2024 | |
8.0/beta | 207 | 15 Nov 2024 | |
8.0/beta | 206 | 15 Nov 2024 | |
8.0/edge | 207 | 09 Oct 2024 | |
8.0/edge | 206 | 09 Oct 2024 |
juju deploy mysql-k8s --channel 8.0/stable
Deploy Kubernetes operators easily with Juju, the Universal Operator Lifecycle Manager. Need a Kubernetes cluster? Install MicroK8s to create a full CNCF-certified Kubernetes system in under 60 seconds.
Platform:
Charmed MySQL K8s Tutorial > 1. Set up your environment
Set up your environment
In this first step, you will set up a development environment with the required components for deploying Charmed MySQL K8s.
Before you start, make sure your machine meets the minimum system requirements.
Summary
Set up Multipass
Multipass is a quick and easy way to launch virtual machines running Ubuntu. It uses the cloud-init standard to install and configure all the necessary parts automatically.
Install Multipass from the snap store:
sudo snap install multipass
Launch a new VM using the charm-dev
cloud-init config:
multipass launch --cpus 4 --memory 8G --disk 30G --name my-vm charm-dev
All
multipass launch
params are described in the Multipass documentation.
The list of Multipass commands is short and self-explanatory. For example, to show all running VMs, just run multipass list
.
As soon as new VM has started, access it with the following command:
multipass shell my-vm
If at any point you’d like to leave Multipass VM, enter
Ctrl+D
or typeexit
.
All necessary components have been pre-installed inside VM already, like MicroK8s and Juju. The files /var/log/cloud-init.log
and /var/log/cloud-init-output.log
contain all low-level installation details.
Set up Juju
Let’s bootstrap Juju to use the local MicroK8s controller. We will call it “overlord”, but you can give it any name you’d like.
juju bootstrap microk8s overlord
The controller can work with different Juju models. Set up a specific model for Charmed MySQL named ‘tutorial’:
juju add-model tutorial
You can now view the model you created above by entering the command juju status
into the command line. You should see something similar to the following output:
Model Controller Cloud/Region Version SLA Timestamp
tutorial overlord microk8s/localhost 3.5.2 unsupported 23:20:53+01:00
Model "admin/tutorial" is empty.
Next step: 2. Deploy MySQL