# On Premise

## Overview

Running Kubernetes on-premise gives a cloud-native experience on SDC when it comes to deploying DIGIT.

Whether States have their own on-premise data centre or have decided to forego the various managed cloud solutions, there are a few things one should know when getting started with on-premise K8s.

One should be familiar with Kubernetes and the [control plane](https://kubernetes.io/docs/concepts/overview/components/#master-components) consists of the Kube-apiserver, Kube-scheduler, Kube-controller-manager and an ETCD datastore. For managed cloud solutions like [Google’s Kubernetes Engine (GKE)](https://cloud.google.com/kubernetes-engine/) or [Azure’s Kubernetes Service (AKS)](https://azure.microsoft.com/en-us/services/kubernetes-service/), it also includes the cloud-controller-manager. This is the component that connects the cluster to external cloud services to provide networking, storage, authentication, and other support features.

To successfully deploy a bespoke Kubernetes cluster and achieve a cloud-like experience on SDC, one needs to replicate all the same features you get with a managed solution. At a high level, this means that we probably want to:

* Automate the deployment process
* Choose a networking solution
* Choose a right storage solution
* Handle security and authentication

The subsequent sections look at each of these challenges individually, and provide enough of a context required to help in getting started.

## Automating The Deployment Process

Using a tool like Ansible can make deploying Kubernetes clusters on-premise trivial.

When deciding to manage your own Kubernetes clusters, we need to set up a few proofs-of-concept (PoC) clusters to learn how everything works, perform performance and conformance tests, and try out different configuration options.

After this phase, automating the deployment process is an important if not necessary step to ensure consistency across any clusters you build. For this, you have a few options, but the most popular are:

* [**kubeadm**](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm/): a low-level tool that helps you bootstrap a minimum viable Kubernetes cluster that conforms to best practices
* [**kubespray**](https://github.com/kubernetes-sigs/kubespray): an Ansible playbook that helps deploy production-ready clusters

If you already using Ansible, Kubespray is a great option, otherwise, we recommend writing automation around Kubeadm using your preferred playbook tool after using it a few times. This will also increase your confidence and knowledge of Kubernetes.

## Installation Steps

{% content-ref url="/pages/aVQzQIWFpQ7X46gT7ZGn" %}
[1. On-Premise Pre-requisites](/platform/guides/installation-guide/infrastructure-setup/sdc/1.-sdc-pre-requisites.md)
{% endcontent-ref %}

{% content-ref url="/pages/cD6TRwZUKoPRrJ5g5Q3u" %}
[2. Infra-as-code (Kubespray)](/platform/guides/installation-guide/infrastructure-setup/sdc/2.-infra-as-code-kubespray.md)
{% endcontent-ref %}

{% content-ref url="/pages/a4zyqRshEsVNp82nVkAa" %}
[DIGIT Deployment](/platform/guides/installation-guide/digit-deployment.md)
{% endcontent-ref %}

{% content-ref url="/pages/15mjpFXFiGiyy9WoAE1q" %}
[Bootstrap DIGIT](/platform/guides/data-setup-guide/bootstrap-digit.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digit.org/platform/guides/installation-guide/infrastructure-setup/sdc.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
