Learn Kubernetes: Deploy a mysql DB

In this story, I will show how to deploy a MySQL database on Kubernetes. We will use a service, a deployment. We will start with a replica 1 then scale up to replicas 4.

If you want to practice, you can register on Alibaba Cloud and use the Serverless Kubernetes service. If you aren’t yet registered, I invite you to follow the link Alibaba Cloud console. It’s a good entry point to experiment services based on Kubernetes.

Let’s create a service with a selector set to app: mysql-app in order to route traffic to pods with the label app=mysql-app



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store