privacyidea

by gpappsoft

Helm chartv1.0.6App 3.12.2

A Helm chart for deploying PrivacyIDEA with MariaDB database and optional radius and redis.

About this chart

[!Important] This is a first version of the chart, which will deploy a basic privacyIDEA stack. No configmaps and no secrets. Do not use for production!


Prerequisites

  1. Install Minikube: Follow the official Minikube installation guide.
  2. Install Helm: Follow the official Helm installation guide.
  3. Start Minikube: Start a Minikube cluster.
    minikube start
    
  4. Enable Ingress (Optional): If you want to expose PrivacyIDEA using an Ingress, enable the Ingress addon in Minikube.
    minikube addons enable ingress
    minikube addons enable ingress-dns
    

Steps to Deploy the Helm Chart

1. Clone or Create the Helm Chart

If you haven't already created the Helm chart, follow the steps in the previous responses to create the privacyidea-chart directory with the necessary files.

2. Install the Helm Chart

Navigate to the directory containing the Helm chart and install it:

helm install privacyidea ./privacyidea-chart

This will deploy the following components:

  • PrivacyIDEA application
  • MariaDB database
  • Radius with privacyIDEA plugin (optional - disabled by default)
  • Redis cache (optional - disabled by default)

3. Verify the Deployment

Check if the pods are running:

kubectl get pods

You should see pods for PrivacyIDEA, MariaDB, and Redis.

4. Access PrivacyIDEA

By default, the PrivacyIDEA service is exposed as a ClusterIP. To access it, you can use one of the following methods:

Method 1: Use kubectl port-forward

Forward a local port to the PrivacyIDEA service:

kubectl port-forward svc/privacyidea-privacyidea 8080:80

Now, you can access PrivacyIDEA in your browser at:

http://localhost:8080

Method 2: Use Minikube Service

Expose the service using Minikube:

minikube service privacyidea-privacyidea

This will open the PrivacyIDEA application in your default browser.

Method 3: Use Ingress (Optional)

If you enabled the Ingress addon, you can create an Ingress resource to expose PrivacyIDEA. Enable ingress in the values.yaml file:

...
# Enable or disable ingress
ingress:
  enabled: true

Configure ingress in templates/ingress.yamnl

Add the following line to your /etc/hosts file to map privacyidea.local to the Minikube IP:

echo "$(minikube ip) privacyidea.local" | sudo tee -a /etc/hosts

Now, you can access PrivacyIDEA at:

http://privacyidea.local

5. Enable Radius with privacyIDEA plugin

Edit values.yaml

...
# Enable or disable radius
radius:
  enabled: true

6. Enable Radius with privacyIDEA plugin

Edit values.yaml

...
# Enable or disable redis
redis:
  enabled: true

7. Clean Up

When you're done testing, you can delete the Helm release:

helm uninstall privacyidea

To stop Minikube:

minikube stop

To delete the Minikube cluster:

minikube delete

Troubleshooting

  1. Pods not starting: Check the logs for the failing pod:

    kubectl logs <pod-name>
    
  2. Database connection issues: Ensure that the MariaDB pod is running.

  3. Persistent Volume issues: If you encounter issues with persistent volumes, ensure that Minikube's storage class is configured correctly. You can check the persistent volumes and claims:

    kubectl get pv
    kubectl get pvc
    

Deploy privacyidea with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has privacyidea on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartprivacyidea is pinned at v1.0.6 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply