Skip to content

Deploy presidio to Kubernetes

You can install Presidio locally using KIND, as a service in Kubernetes or AKS.

Deploy locally with KIND

KIND (Kubernetes IN Docker).

  1. Install Docker.

  2. Clone Presidio.

  3. Run the following script, which will use KIND (Kubernetes emulation in Docker)

cd docs/samples/deployments/k8s/deployment/
./run-with-kind.sh
  1. Wait and verify all pods are running:
kubectl get pod -n presidio
  1. Port forwarding of HTTP requests to the API micro-service will be done automatically. In order to run manual:
kubectl port-forward <presidio-analyzer-pod-name> 8080:8080 -n presidio

Presidio As a Service with Kubernetes

Prerequisites

  1. A Kubernetes 1.18+ cluster with RBAC enabled. If you are using AKS RBAC is enabled by default.

!!! note: Note Note the pod's resource requirements (CPU and memory) and plan the cluster accordingly.

  1. kubectl installed. Verify you can communicate with the cluster by running:

    kubectl version
    
  2. Local helm client.

  3. Optional - Container Registry - such as ACR. Only needed if you are using your own presidio images and not the default ones from from Microsoft syndicates container catalog
  4. Recent presidio repo is cloned on your local machine.

Step by step deployment with customizable parameters

  1. Install Helm with RBAC.

  2. Optional - Ingress controller for presidio API, e.g., NGINX.

NOTE:
Presidio is deployed with an ingress controller by default, and uses nginx as ingress.class. To change this behavior, deploy the helm chart with ingress.enabled=false.

  1. Deploy from /docs/samples/deployments/k8s/charts/presidio
# Choose a namespace and ensure it is created
NAMESPACE=presidio

# Choose the tag, from mcr.microsoft.com, e.g. `latest`
TAG=latest

# Choose a name for the deployment
NAME=<name>

# Use Helm to install all required components
helm install $NAME . --set tag=$PRESIDIO_LABEL --namespace $NAMESPACE

# If you have your own images in a separate ACR, run
DOCKER_REGISTRY=<your_registry>
helm install $NAME . --set registry=$DOCKER_REGISTRY,tag=$PRESIDIO_LABEL . --namespace $NAMESPACE