# Data Persistency and Advanced SQL Server Disk Topologies in Kubernetes

DevFeed: [Data Persistency and Advanced SQL Server Disk Topologies in Kubernetes](<https://devfeed.tech/articles/data-persistency-and-advanced-sql-server-disk-topologies-in-kubernetes-17510.md>)

Original publisher: [Read original article](<https://www.nocentino.com/posts/2019-05-08-data-persistency-and-advanced-sql-server-disk-topologies-in-kubernetes/>)

Author: Anthony Nocentino

Published: 2019-05-08T15:09:33Z

Content type: tutorial

Language: en

Sources: [Kubernetes on Anthony Nocentino's Blog](<https://devfeed.tech/sources/kubernetes-on-anthony-nocentino-s-blog.md>)

Topics: [Kubernetes](<https://devfeed.tech/topics/kubernetes.md>), [sql-server](<https://devfeed.tech/topics/sql-server.md>), [Containers](<https://devfeed.tech/topics/containers.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [Filesystems](<https://devfeed.tech/topics/filesystems.md>)

Tags: [configuration](<https://devfeed.tech/tags/configuration.md>), [container](<https://devfeed.tech/tags/container.md>), [containers](<https://devfeed.tech/tags/containers.md>), [databases](<https://devfeed.tech/tags/databases.md>), [environment-variables](<https://devfeed.tech/tags/environment-variables.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [performance](<https://devfeed.tech/tags/performance.md>), [sql-server](<https://devfeed.tech/tags/sql-server.md>), [stateful](<https://devfeed.tech/tags/stateful.md>), [stateless](<https://devfeed.tech/tags/stateless.md>), [storage](<https://devfeed.tech/tags/storage.md>), [volumes](<https://devfeed.tech/tags/volumes.md>)

## AI overview

This tutorial explains how to deploy SQL Server in Kubernetes with Persistent Volumes for system and user databases. It describes how Kubernetes Pod recreation affects stateful workloads and how environment variables and persistent storage preserve SQL Server configuration and database state.

## Source excerpt

When working with SQL Server in containers and Kubernetes storage is a key concept. In this post, we're going to walk through how to deploy SQL Server in Kubernetes with Persistent Volumes for the system and user databases. One of the key principals of Kubernetes is the ephemerality of Pods. No Pod is every redeployed, a completely new Pod is created. If a Pod dies, for whatever reason, a new Pod is created in its place there is no continuity in the state of that Pod. The newly created Pod will go back to the initial state of the container image defined in the Pod's spec. This is very valuable for stateless workloads, not so much for stateful workloads like SQL Server.