Production & Kubernetes Integration

Container & Kubernetes Deployment

Deploy iris2bq into production data pipelines using Docker containers or scheduled Kubernetes CronJobs to stream InterSystems IRIS tables directly to BigQuery.

1. Docker Container Deployment

The iris2bq utility is packaged as a multi-stage Docker image based on alpine:latest. The container contains CA certificates for secure Google Cloud Storage and BigQuery API endpoints and runs with zero external C dependencies.

Building the Docker Image

# Build Docker image
docker build -t iris2bq:latest .

# Verify image creation
docker images iris2bq

Dockerfile Specification

# Multi-stage Dockerfile for iris2bq

FROM golang:1.22-alpine AS builder

WORKDIR /app

COPY go.mod go.sum ./
RUN go mod download

COPY . .

RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-w -s" -o iris2bq main.go

FROM alpine:3.19

RUN apk add --no-cache ca-certificates tzdata

WORKDIR /app

COPY --from=builder /app/iris2bq /app/iris2bq
COPY config.example.yaml /app/config.yaml

ENTRYPOINT ["/app/iris2bq"]
CMD ["-config", "/app/config.yaml"]

2. Kubernetes CronJob Deployment

Running iris2bq as a Kubernetes CronJob enables automated synchronization of InterSystems IRIS tables into Google Cloud BigQuery datasets on a predefined cron schedule (e.g. daily at 02:00 AM).

Kubernetes Manifest Specification (kubernetes-cronjob.yaml)

apiVersion: batch/v1
kind: CronJob
metadata:
  name: iris2bq-daily-sync
  namespace: data-pipeline
spec:
  schedule: "0 2 * * *" # Everyday at 02:00 AM
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: iris2bq
            image: iris2bq:latest
            env:
            - name: GCP_PROJECT
              value: "my-gcp-project"
            - name: BQ_DATASET
              value: "iris_production"
            - name: GCS_TMP_BUCKET
              value: "iris-bq-staging-prod"
            - name: IRIS_HOST
              value: "iris-service.database.svc.cluster.local"
            - name: IRIS_PORT
              value: "1972"
            - name: IRIS_USER
              valueFrom:
                secretKeyRef:
                  name: iris-credentials
                  key: username
            - name: IRIS_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: iris-credentials
                  key: password
            - name: IRIS_TABLES
              value: "Sample.Person,Sample.Company,User.Patient"
          restartPolicy: OnFailure