Migrate a SQL Server database from Windows to Kubernetes

Antonio Milesi Bastos
8 min readFeb 21, 2018

Moving to Cloud-based and Managed Infrastructure as a Service

This is a case based on my recent experience to reduce an infrastructure administration and management, and support variability in a client infrastructure requirements by deploying onto the cloud or infrastructure as a service.

Firstly, I will show you how to get a desired state to move on. So how to move a database.

Actual Scenario

The following scenario was found when I started:

A Windows machine with the following:

  • SQL Server installed.
  • Target database to migrate.

Desired Scenario

The desired scenario we are looking for is:

A SQL Server instance on Kubernetes in Google Cloud, with persistent storage for high availability (HA). These solution should be provides resiliency. If the SQL Server instance fails, Kubernetes automatically re-creates it in a new pod.

Background

In general, a container’s root filesystem is not suitable to store persistent data. The containers you run on Kubernetes Engine are typically disposable entities, and the…

--

--

Antonio Milesi Bastos

I have devoted my journey to uncover better ways of develop software by doing it and helping others to do so.