Reader small image

You're reading from  Edge Computing Systems with Kubernetes

Product typeBook
Published inOct 2022
PublisherPackt
ISBN-139781800568594
Edition1st Edition
Right arrow
Author (1)
Sergio Méndez
Sergio Méndez
author image
Sergio Méndez

Sergio Méndez is a systems engineer and professor of operating systems at San Carlos of Guatemala university. His work at the university is related to teaching and researching cloud native technologies with his students. He has experience working on DevOps, and MLOps using open source technologies at work. About open source communities, he is involved in the CNCF Community, promoting students into the CNCF Ecosystem and hosting a Cloud Native meetup in Guatemala. He has been a speaker at several conferences such as KubeCon, WTFisCloudNative, and Kubernetes Community Days. He is also a Linkerd Ambassador.
Read more about Sergio Méndez

Right arrow

Advanced configurations

Now it's time to explore more advanced configurations that you can use to configure your K3s cluster on 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 CloudSQL. For example, let's attempt it with a cloud instance using Digital Ocean. However, you can do it on any cloud that you wish. So, let's get started with the following steps:

  1. Log in to your cloud instance:

    $ ssh root@IP_DATASTORE
  2. 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
  3. Log out using the following command...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Edge Computing Systems with Kubernetes
Published in: Oct 2022Publisher: PacktISBN-13: 9781800568594

Author (1)

author image
Sergio Méndez

Sergio Méndez is a systems engineer and professor of operating systems at San Carlos of Guatemala university. His work at the university is related to teaching and researching cloud native technologies with his students. He has experience working on DevOps, and MLOps using open source technologies at work. About open source communities, he is involved in the CNCF Community, promoting students into the CNCF Ecosystem and hosting a Cloud Native meetup in Guatemala. He has been a speaker at several conferences such as KubeCon, WTFisCloudNative, and Kubernetes Community Days. He is also a Linkerd Ambassador.
Read more about Sergio Méndez