Encontrar

Artigo
· Set. 21 5min de leitura

Share volumes across pods and zones on AKS

Background

For a variety of reasons, users may wish to mount a persistent volume on two or more pods spanning multiple availability zones. One such use case is to make data stored outside of IRIS available to both mirror members in case of failover.

Unfortunately the built-in storage classes in most Kubernetes implementations (whether cloud or on-prem) do not provide this capability:

  • Does not support access mode "ReadWriteMany"
  • Does not support being mounted on more than one pod at a time
  • Does not support access across availability zones

However, some Kubernetes add-ons (both provider and third-party) do provide this capability. The one we'll be looking at in this article is Azure Blob Store.

Overview

In this article we will:

  • Create a Kubernetes cluster on AKS (Azure Kubernetes Service)
  • Use Azure Blob Store to create a persistent volume of type ReadWriteMany
  • Use IKO to deploy an IRIS failover mirror spanning two availability zones
  • Mount the persistent volume on both mirror members
  • Demonstrate that both mirror members have read/write access to the volume

Steps

The following steps were all carried out using Azure Cloud Shell. Please note that InterSystems is not responsible for any costs incurred in the following examples.

We will be using region "eastus" and availability zones "eastus-2" and "eastus-3".

Create Resource Group

az group create \
   --name samplerg \
   --location eastus

Create Service Principal

We extract the App Id and Client Secret for the next call:

SP=$(az ad sp create-for-rbac -o tsv)
APP_ID="$(echo $SP | cut -d' ' -f1)"
CLIENT_SECRET="$(echo $SP | cut -d' ' -f3)"

Create Kubernetes Cluster

az aks create \
   --resource-group samplerg \
   --name sample \
   --node-count 6 \
   --zones 2 3 \
   --generate-ssh-key \
   --service-principal $APP_ID \
   --client-secret $CLIENT_SECRET \
   --kubernetes-version 1.33.2 \
   --enable-blob-drive

Create a PersistentVolumeClaim

Add the following to a file named azure-blob-pvc.yaml:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: azure-blob-storage
spec:
  accessModes:
  - ReadWriteMany
  storageClassName: azureblob-nfs-premium
  resources:
    requests:
      storage: 5Gi

Now create the persistent volume claim:

kubectl apply -f azure-blob-pvc.yaml

Install IKO

Install and run IKO:

helm install sample iris_operator_amd-3.8.42.100/chart/iris-operator

See IKO documentation for additional information on how to download and configure IKO.

Create an IrisCluster

Add the following to a file named iris-azureblob-demo.yaml:

apiVersion: intersystems.com/v1alpha1
kind: IrisCluster
metadata:
  name: sample
spec:
  storageClassName: iris-ssd-storageclass
  licenseKeySecret:
    name: iris-key-secret
  imagePullSecrets:
    - name: dockerhub-secret
  volumes:
  - name: nfs-volume
    persistentVolumeClaim:
      claimName: azure-blob-pvc
  topology:
    data:
      image: containers.intersystems.com/intersystems/iris:2025.2
      preferredZones: ["eastus-2","eastus-3"]
      mirrored: true
      volumeMounts:
      - name: nfs-volume
        mountPath: "/mnt/nfs"

Notes:

  • The mirror spans both availability zones in our cluster
  • See IKO documentation for information on how to configure an IrisCluster

Now create the IrisCluster:

kubectl apply -f iris-azureblob-demo.yaml

Soon after that you should see the IrisCluster is up and running:

$ kubectl get pod,pv,pvc
NAME                 READY  STATUS   RESTARTS  AGE
pod/sample-data-0-0  1/1    Running  0         9m34s
pod/sample-data-0-1  1/1    Running  0         91s
NAME              CAPACITY  ACCESS MODES  STATUS   CLAIM                      STORAGECLASS
pvc-bbdb986fba54   5Gi       RWX           Bound    azure-blob-pvc             azureblob-nfs-premium
pvc-9f5cce1010a3   4Gi       RWO           Bound    iris-data-sample-data-0-0  iris-ssd-storageclass
pvc-5e27165fbe5b   4Gi       RWO           Bound    iris-data-sample-data-0-1  iris-ssd-storageclass
NAME                      STATUS  VOLUME            CAPACITY  ACCESS MODES  STORAGECLASS            
azure-blob-pvc             Bound   pvc-bbdb986fba54  5Gi       RWX           azureblob-nfs-premium
iris-data-sample-data-0-0  Bound   pvc-9f5cce1010a3  4Gi       RWO           iris-ssd-storageclass
iris-data-sample-data-0-1  Bound   pvc-5e27165fbe5b  4Gi       RWO           iris-ssd-storageclass

We can also (by joining the output of "kubectl get pod" with "kubectl get node") see that the mirror members reside in different availability zones:

sample-data-0-0 aks-nodepool1-10664034-vmss000001 eastus-2
sample-data-0-1 aks-nodepool1-10664034-vmss000002 eastus-3

Test the shared volume

We can create files on the shared volume on each pod:

kubectl exec sample-data-0-0 -- touch /mnt/nfs/primary.txt
kubectl exec sample-data-0-1 -- touch /mnt/nfs/backup.txt

And then observe that files are visible from both pods:

$ kubectl exec sample-data-0-0 -- ls /mnt/nfs
primary.txt
backup.txt
$ kubectl exec sample-data-0-1 -- ls /mnt/nfs
primary.txt
backup.txt

Cleanup

Delete IrisCluster deployment

kubectl delete -f iris-azureblob-demo.yaml --ignore-not-found
helm uninstall sample --ignore-not-found

Delete Persistent Volumes

kubectl delete azure-blob-pvc iris-data-sample-data-0-0 iris-data-sample-data-0-1 --ignore-not-found

Note that deleting PersistentVolumeClaim triggers deletion of the corresponding PersistentVolume.

Delete Kubernetes Cluster

az aks delete --resource-group samplerg --name sample --yes

Delete Resource Group

az group delete --name samplerg --no-wait --yes

Conclusion

We demonstrated how Azure Blob Store can be used to mount read/write volumes on pods residing in different availability zones.  Several other solutions are available both for AKS and for other cloud providers.  As you can see, their configuration can be highly esoteric and vendor-specific, but once working can be reliable and effective.

1 Comment
Discussão (1)2
Entre ou crie uma conta para continuar
Artigo
· Set. 20 2min de leitura

Snapshot DB free - Strategies

These are the strategic plans of my example for the External Languages Contest 2025

  • Top of all: Speed
    • Anything that is running in endless loops doesn't help
    • So the steps happen where the environment is best suited for
    • Communications reduce speed. Less Ping-Pong od messages
    • Just exchange what can't be avoided
  • No artificial constructs. Keep it compact and simple to follow,

Python

I'm using the Native API for Python to keep it independent of IRIS instances
The interactive entered connection parameters allow a wide range of IRIS instances
Running it in a Docker container makes me independent of locally installed Python.

Once connected, a slave class is triggered in IRIS to prepare the data by columns.
The fetched 4 columns fill a DataSet and generate the bar chart.
The result is delivered outside the Docker container. 

IRIS#1

I tried to create a class that is independent of the IRIS version.
Int namespace %SYS runs 1 embedded SQL query, resulting in a single string.
The string is splitted into 4 columns, ready for the Python Dataset.
Synchronization is provided by the standard ClassMethod call. 

IRIS#2

Display of the results is implemented a very simple CSP page using the
results deposited outside the container. The biggest challenge was to force
the browser to ignore its actual cached graphic images.
The trick: Instead of just a source request for tab.jpg  I used tab.jpg?#($h)#
the makes no logical sense, but creates a different signature in the browser cache
So what you see is really the last image generated and in synch with the displayed data

Compact code

As both parts in IRIS result in only 4 ClassMethods I decided to pack them together
in a single resulting class that made coding and maintenance very easy.
Similar in Python:
The code is almost linear and easy to follow. Exception: Mimic of ZWRITE for testing

Summary

The exercise could have been composed in IRIS only with or without embedded Python
Though the challenge was to use external code to use connections to IRIS.

Discussão (0)1
Entre ou crie uma conta para continuar
Artigo
· Set. 20 1min de leitura

Snapshot of free disk space

It's about an example for the External Languages Contest 2025

You get almost any information about your databases in IRIS using 
the System Management Portal. After passing several levels, you often
get a wide list of items, but the interesting ones are hard to find.
The example takes the important numbers and visualizes them as a 
bar chart,  showing the total size of DB, size of free space in the DB, and 
the free percentage. All just actual data, no accumulation or history.

dkfree1.jpg

How does work

There is an external Python code that connects to IRIS using IRIS Native API for Python.
It connects to a local helper running in any namespace (default = USER)
The result is stored by columns in a Global.
This is transformed into a DataSet and feeds the bar chart. 
For improved readability, the x-axis is logarithmic
The table of data received is a bypack.
The visualization is provided by a very simple CSP page.
Forcing the browser NOT to use an actual instead of the cached JPG was a bit tricky.

Advantages

  • Graphic visualization instead of buried numbers
  • Fast jumping across multiple instances of IRIS

GitHub

Video

Ideas Portal

1 Comment
Discussão (1)1
Entre ou crie uma conta para continuar
Anúncio
· Set. 19

InterSystems sera présent au Supply Chain Event 2025

Salut la communauté,

Rejoignez-nous pour notre atelier et nos démonstrations pendant le Supply Chain Event 2025 !

📅  Dates : 14 - 15 octobre, 2025

📌 Lieu : Paris, Porte de Versailles - Stand D16

Venez échanger avec nos experts et découvrir comment orchestrer une supply chain grâce à des données fiables et accessibles.

Au programme :
🔗 Retours d’expérience concrets
🔗 Démonstrations animées par nos experts et partenaires
🔗 Atelier immersif avec notre expert @Sylvain Guilbaud en partenariat avec SUPPLAÏ et CGI Business Consulting
🔗 Opportunités de networking avec la communauté Supply Chain

Réservez la date, préparez vos questions et rejoignez-nous pour des échanges, nous avons hâte de vous rencontrer !
Inscrivez-vous dès maintenant !

Discussão (0)1
Entre ou crie uma conta para continuar
Anúncio
· Set. 19

[Video] The Evolution of AI: Embracing Agency

Hey Community,

Enjoy the new video on InterSystems Developers YouTube:

⏯ The Evolution of AI: Embracing Agency @ Ready 2025

This video explores the evolution and future of AI in healthcare, tracing the shift from traditional machine learning to emerging approaches centered on agency and generative AI. It showcases innovative work in predictive modeling using non-clinical data, such as healthcare interaction timestamps and supermarket shopping patterns, to detect early signs of disease, including ovarian cancer. It also covers the use of behavioral data collected through living labs to support diagnostics for conditions like Parkinson’s. The overarching goal is to develop "patient-ready AI" that addresses gaps in observability and care, reduces clinician burnout, and drives meaningful transformation in digital healthcare delivery.

Presenter:
🗣 Aldo Faisal, Professor of AI & Neuroscience, School of Convergence Science in Human & Artificial Intelligence

Wondering what’s possible? Watch the video and subscribe for more examples!

Discussão (0)1
Entre ou crie uma conta para continuar