---
title: Get Started with Redis and SQL Server Containers on Kubernetes
description: Instructions for sample .NET application source code with Redis session and query caching; Kubernetes deployment and service YAML files and instructions.
---

 

 

 DOCUMENT ARCHIVE

# Get Started with Redis and SQL Server Containers on Kubernetes

Instructions follow for:

- Sample .NET application source code with Redis session and query caching
- Kubernetes deployment and service YAML files and instructions
- Support for any Windows SQL Server edition
- Database cloning for a complete Redis + SQL Server development environment

[Solution Components](https://23302346.hs-sites.com/doc-redis#components)

#### [Redis Quick Start](https://23302346.hs-sites.com/doc-redis#quick-start)

#### [Step 1: Prepare the database for containers and cloning](https://23302346.hs-sites.com/doc-redis#step1)

#### [Step 2: Launch the Kubernetes Service](https://23302346.hs-sites.com/doc-redis#step2)

 

 

## Solution Components

#### Redis

The leading open source, in-memory data store.

 

Redis off-loads SQL Server by caching user sessions and frequently-accessed queries. Enhance the user experience, system performance and scalability.

#### Windocks SQL Containers & Clones

Containers for all editions of SQL Server 2008 onward.

 

Secure production database clones provide complete database environments in seconds, and combined with containers brings SQL Server into a Cloud-native architecture.

#### Kubernetes

The standard for cloud-native development.

 

Kubernetes provides declarative support for delivery of complex multi-service environments.

 

 

[Back to Top ](https://23302346.hs-sites.com/doc-redis#getting-started) [Back to Technical Docs Gallery ](https://23302346.hs-sites.com/resources)

 

 

## Redis Quick Start

#### To set up your own Kubernetes cluster, download Windocks and follow the instructions below.

[DOWNLOAD ](https://23302346.hs-sites.com/download)

#### Schedule a demo using Redis, Windocks, SQL Server Containers and Kubernetes

[GET A DEMO ](https://23302346.hs-sites.com/schedule-demo)

 

 

[Back to Top ](https://23302346.hs-sites.com/doc-redis#getting-started) [Back to Technical Docs Gallery ](https://23302346.hs-sites.com/resources)

 

 

## Step 1: Prepare the database for containers and cloning

1. Log into Windows as an administrator and install SQL Server
2. Download Windocks, double-click on the installer and finish the install Refer to [the getting started steps](https://23302346.hs-sites.com/getting-started).-->
3. Install a git client
4. Open a Command Prompt and run the following commands:
   
   **cd C:**
   
   **git clone https://github.com/WinDocks/redis-sql-container.git**
   
   **copy c:\redis-sql-container\redisdemo.bak c:\windocks\dbbackups**
   
   **cd C:\windocks\samples**
   
   **notepad dockerfile**
   
   Enter the following lines into dockerfile and save it (Change mssql-2016 to whichever version of SQL Server you installed)
   
   FROM mssql-2016  
   SETUPCLONING FULL redisdemo c:\windocks\dbbackups\redisdemo.bak
   
   **docker build -t redisdemo2 c:\windocks\samples\redis**
   
   **docker images**
5. Email [support@windocks.com](mailto:support@windocks.com) for the Windocks API password.

[Back to Top ](https://23302346.hs-sites.com/doc-redis#getting-started) [Back to Technical Docs Gallery ](https://23302346.hs-sites.com/resources)

 

 

## Step 2: Launch the Kubernetes Services

1. Create a kubernetes cluster and get a console that supports kubectl
2. **git clone https://github.com/WinDocks/redis-sql-container.git**
   
   **cd redis-sql-container**
   
   **vi secrets.sh**
   
   Set WINDOCKS_REQUIRED_USERNAME and WINDOCKS_REQUIRED_PASSWORD to the credentials you got from support@windocks.com. If you want to setup a secure connection, then edit the key and crt in secret-ssl.
   
   **sh secrets.sh**
   
   **vi sqlproxy-deployment.yaml**
   
   Line 31, set the hostname or IP address for your Windocks VM above
   
   **sh deploy.sh**
3. Confirm the services are running by entering:
   
   **kubectl get services**

![kubectlGetServicesReturn](https://23302346.hs-sites.com/hubfs/document-archive/kubectlGetServicesReturn.png "kubectlGetServicesReturn")

 

1. Open a browser using the Windocks-dotnetwebsite external IP address:port. Click on the Cars tab to access the application.

![displayCars](https://23302346.hs-sites.com/hubfs/document-archive/displayCars.png "displayCars")

 

1. Paste the .NET api external IP address into the app, along with a username of ramenn2 and password of Password!! Click the “Get Cars” button to see the behavior of the redis cache interacting with the .NET application and SQL Server.

[Back to Top ](https://23302346.hs-sites.com/doc-redis#getting-started) [Back to Technical Docs Gallery ](https://23302346.hs-sites.com/resources)

## Extend CI/CD to your data layer

[GET A DEMO ](https://23302346.hs-sites.com/schedule-demo) [TRY FREE ](https://23302346.hs-sites.com/try-free)