Advanced configurations
Now it's time to explore more advanced configurations that you can use to configure your K3s cluster at the edge.
Using external MySQL storage for K3s
K3s supports MySQL and SQLite, instead of etcd
, as a data storage for your K3s cluster information. You can install MySQL in another node, a cloud instance, or a managed service on the cloud such as AWS Aurora or Google Cloud SQL. For example, let's attempt it with a cloud instance using DigitalOcean. However, you can do it on any cloud that you wish. So, let's get started with the following steps:
- Log in to your cloud instance:
$ ssh root@IP_DATASTORE
- Install Docker with the following commands:
$ apt-get update $ apt-get install docker.io -y $ docker run -d --name mysql -e MYSQL_ROOT_PASSWORD=k3s123- \ -e MYSQL_DATABASE="k8s" -e MYSQL_USER="k3sadm" \ -e MYSQL_PASSWORD="k3s456-" \ -p 3306:3306 \ -v /opt/mysql:/var/lib/mysql \ mysql:5.7
- Log out using...