Skip to content
GitHub

Helm & Kubernetes

This guide explains how to deploy Rafiki using Helm charts on a Kubernetes cluster. Helm is a package manager for Kubernetes that allows you to define, install, and upgrade complex Kubernetes applications through Helm charts.

Rafiki uses the following key infrastructure components:

  • PostgreSQL: Used for storing application data, grants, and Open Payments resources
  • Redis: Used for caching and session management
  • TigerBeetle (recommended): High-performance accounting database for financial transaction processing and ledger management

Before you begin, ensure you have the following:

Add the official Interledger Helm repository which contains the Rafiki charts:

Terminal window
helm repo add interledger https://interledger.github.io/charts/interledger
helm repo update

You can list the available Rafiki charts:

Terminal window
helm search repo interledger/rafiki

This will show you the available chart versions for the different Rafiki components:

  • interledger/rafiki-auth
  • interledger/rafiki-backend
  • interledger/rafiki-frontend

Create separate values files for each Rafiki service to customize your deployment. You can start with minimal configurations and add more settings as needed.

Create auth-values.yaml:

# Minimal auth service configuration
nodeEnv: production
logLevel: info
# Database configuration (update with your credentials)
databaseUrl:
secretKeyRef:
name: rafiki-secrets
key: DATABASE_URL
# Redis configuration
redisUrl:
secretKeyRef:
name: rafiki-secrets
key: REDIS_URL
# Identity server configuration
identityServer:
domain: 'https://your-domain.com/idp'
serverSecret:
secretKeyRef:
name: rafiki-secrets
key: IDENTITY_SERVER_SECRET
# Cookie signing key
cookieKey:
secretKeyRef:
name: rafiki-secrets
key: COOKIE_KEY
# Service configuration
service:
- name: service
type: ClusterIP
ports:
- port: 3006
targetPort: 3006
protocol: TCP
name: auth
- port: 3003
targetPort: 3003
protocol: TCP
name: admin
- port: 3007
targetPort: 3007
protocol: TCP
name: introspection
- port: 3009
targetPort: 3009
protocol: TCP
name: interaction

Create backend-values.yaml:

# Minimal backend service configuration
nodeEnv: production
logLevel: info
instanceName: 'your-rafiki-instance'
# Database configuration
databaseUrl:
secretKeyRef:
name: rafiki-secrets
key: DATABASE_URL
# Redis configuration
redisUrl:
secretKeyRef:
name: rafiki-secrets
key: REDIS_URL
# Auth service URLs
auth:
grantUrl: http://rafiki-auth-service.default:3006
introspectionUrl: http://rafiki-auth-service.default:3007
# ILP configuration
ilp:
host: 'https://your-domain.com'
address: test.your-instance
connector: 'http://rafiki-backend-service.default:3002'
streamSecret:
secretKeyRef:
name: rafiki-secrets
key: STREAM_SECRET
# Webhook configuration
webhook:
url: https://your-wallet.com/webhooks/rafiki
# Key configuration
key:
id: your-unique-key-id
pvk: '' # Will auto-generate if empty
# Webhook signature secret
webhookSignatureSecret:
secretKeyRef:
name: rafiki-secrets
key: SIGNATURE_SECRET
# Service configuration
service:
- name: service
type: ClusterIP
ports:
- port: 3000
targetPort: 3000
protocol: TCP
name: open-payments
- port: 3001
targetPort: 3001
protocol: TCP
name: admin
- port: 3002
targetPort: 3002
protocol: TCP
name: connector

Create frontend-values.yaml:

# Minimal frontend service configuration
nodeEnv: production
logLevel: info
# Service URLs
serviceUrls:
GRAPHQL_URL: http://rafiki-backend-service.default:3001/graphql
OPEN_PAYMENTS_URL: https://your-domain.com/
# Port configuration
port: 3010
# Service configuration
service:
- name: service
type: ClusterIP
ports:
- port: 3010
targetPort: 3010
protocol: TCP
name: http
# Kratos configuration (if using authentication)
kratos:
enabled: false

Before installing the services, create the required secrets:

Terminal window
kubectl create secret generic rafiki-secrets \
--from-literal=DATABASE_URL="postgresql://username:password@rafiki-postgresql:5432/rafiki" \
--from-literal=REDIS_URL="redis://rafiki-redis:6379" \
--from-literal=IDENTITY_SERVER_SECRET="your-identity-server-secret" \
--from-literal=COOKIE_KEY="your-cookie-signing-key" \
--from-literal=STREAM_SECRET="your-stream-secret" \
--from-literal=SIGNATURE_SECRET="your-webhook-signature-secret"

Install each Rafiki service using the appropriate values file:

Terminal window
# Install auth service
helm install rafiki-auth interledger/rafiki-auth -f auth-values.yaml
# Install backend service
helm install rafiki-backend interledger/rafiki-backend -f backend-values.yaml
# Install frontend service
helm install rafiki-frontend interledger/rafiki-frontend -f frontend-values.yaml

If you want to install to a specific namespace:

Terminal window
kubectl create namespace rafiki
helm install rafiki-auth interledger/rafiki-auth -f auth-values.yaml -n rafiki
helm install rafiki-backend interledger/rafiki-backend -f backend-values.yaml -n rafiki
helm install rafiki-frontend interledger/rafiki-frontend -f frontend-values.yaml -n rafiki

Check the status of your deployments:

Terminal window
# Check Helm releases
helm list
# Check running pods
kubectl get pods
# Check deployed services
kubectl get services
# Check logs for any issues
kubectl logs -l app.kubernetes.io/name=rafiki-auth
kubectl logs -l app.kubernetes.io/name=rafiki-backend
kubectl logs -l app.kubernetes.io/name=rafiki-frontend

Each Rafiki service can be configured via environment variables through Helm values. Below are the complete environment variable configurations for each service:

Auth service

The Rafiki auth service is responsible for handling Open Payments authorization and grant management. It implements the Open Payments authorization server specification and manages access tokens, grants, and interactions. The auth service connects to a PostgreSQL database to store grant-related data and uses Redis for session management.

Ports exposed:

  • 3003 (admin) - Auth Admin API for managing grants and access tokens
  • 3006 (auth) - Open Payments authorization server endpoint
  • 3007 (introspection) - Access token introspection endpoint
  • 3009 (interaction) - User interaction endpoint for grant flows

Required values

Helm variableDefaultDescription
auth.databaseUrlundefinedThe URL of the Postgres database storing your Open Payments grant data. Can be provided directly as a value or referenced from a secret.
auth.redisUrlundefinedThe connection URL for Redis. Can be provided directly as a value or referenced from a secret.
auth.cookieKeychangemeThe koa KeyGrip key that is used to sign cookies for an interaction session. Can be provided directly as a value or referenced from a secret.
auth.identityServer.domainhttp://rafiki-backend/idpThe URL of your IdP’s server, used by the authorization server to inform an Open Payments client of where to redirect the end-user to start interactions.
auth.identityServer.serverSecretchangemeA shared secret between the authorization server and the IdP server; the authorization server will use the secret to secure its IdP-related endpoints.
When the IdP server sends requests to the authorization server, the IdP server must provide the secret via an x-idp-secret header. Can be provided directly as a value or referenced from a secret.

Conditionally required values

Helm value nameDefaultDescription
auth.trustProxytrueMust be set to true when running Rafiki behind a proxy. When true, the X-Forwarded-Proto header is used to determine if connections are secure.

Optional values

Helm value nameDefaultDescription
auth.replicaCount1The number of pods to run across the cluster.
auth.nodeSelector{}NodeSelector can be used to specify the nodes on which the pods should run on your cluster.
auth.serviceAccount.createfalseIf true, a ServiceAccount will be created with the specified name and annotations.
auth.serviceAccount.annotations{}Annotations to add to the ServiceAccount.
auth.serviceAccount.name""The name of the ServiceAccount to use.
auth.secrets.createfalseIf true, the chart will create a secret with the name of the release. If false, you must create the secret manually.
auth.service.nameserviceThe name of the service.
auth.service.typeClusterIPThe type of Kubernetes service.
auth.service.annotations{}Annotations to add to the service.
auth.service.portsMultiple portsService port configuration for auth (3006), admin (3003), introspection (3007), and interaction (3009) endpoints.
auth.configmapfiles/config.yamlDefines the location of the template that will be used to generate the ConfigMap.
auth.secretsGenFilefiles/secret.yamlDefines the location of the template that will be used to generate the default secret.
auth.containers.nameserverThe name of the main container.
auth.containers.readinessProbe.httpGet.path/healthzThe path for the readiness probe HTTP check.
auth.containers.readinessProbe.httpGet.port3007The port for the readiness probe HTTP check.
auth.containers.livenessProbe.httpGet.path/healthzThe path for the liveness probe HTTP check.
auth.containers.livenessProbe.httpGet.port3007The port for the liveness probe HTTP check.
auth.containers.resources.requests.memory128MiThe minimum amount of memory required by the container.
auth.containers.resources.requests.cpu200mThe minimum amount of CPU required by the container.
auth.containers.resources.limits.memory512MiThe maximum amount of memory the container can use.
auth.containers.resources.limits.cpu400mThe maximum amount of CPU the container can use.
auth.containers.portsMultiple portsContainer port configuration for auth (3006), admin (3003), introspection (3007), and interaction (3009) endpoints.
auth.nodeEnvproductionThe type of node environment: development, test, or production.
auth.logLevelinfoPino log level
auth.authServerUrlhttp://rafiki-auth:3006The public endpoint for your Rafiki instance’s public Open Payments routes.
auth.interaction.quotefalseWhen true, quote grants are interactive. Note that this is a string value.
auth.interaction.cookieSameSitelaxThe SameSite attribute for interaction cookies.
auth.interaction.incomingPaymentfalseWhen true, incoming Open Payments grant requests are interactive. Note that this is a string value.
auth.port.admin3003The port of your Rafiki Auth Admin API server.
auth.port.auth3006The port of your Open Payments authorization server.
auth.port.introspection3007The port of your Open Payments access token introspection server.
auth.grant.waitSeconds5The wait time, in seconds, included in a grant request response (grant.continue).
auth.accessToken.deletionDays30The days until expired and/or revoked access tokens are deleted.
auth.accessToken.expirySeconds600 (10 minutes)The expiry time, in seconds, for access tokens.
auth.workers.cleanup1The number of workers processing expired or revoked access tokens.
auth.ingress.enabledfalseWhen true, an Ingress resource is created to expose the application.
auth.ingress.classNamenginxThe Ingress class name to use.
auth.ingress.tlsTLS configurationTLS configuration for the Ingress, including secret name and hosts.
auth.ingress.hostsHost configurationHost configuration for the Ingress, including host, paths, and service details.
Backend service

The Rafiki backend service handles the core Open Payments functionality and business logic. It exposes the Open Payments resource server APIs for wallet addresses, incoming payments, outgoing payments, and quotes. The backend also includes an ILP connector for sending and receiving Interledger packets. It connects to PostgreSQL for storing Open Payments resources, Redis for caching, and optionally TigerBeetle for high-performance accounting.

Ports exposed:

  • 3000 (openPayments) - Open Payments resource server API
  • 3001 (admin) - Backend Admin API and GraphQL endpoint
  • 3002 (connector) - ILP connector for sending and receiving packets
  • 3005 (autoPeering) - Auto-peering service (when enabled)

Required values

Helm value nameDefaultDescription
backend.auth.grantUrlhttp://rafiki-auth.rafiki-auth:3006The endpoint on your Open Payments authorization server to grant a request.
backend.auth.introspectionUrlhttp://rafiki-auth.rafiki-auth:3007The endpoint on your Open Payments authorization server to introspect an access token.
backend.databaseUrlundefinedThe Postgres database URL of the database storing your resource data. Can be provided directly as a value or referenced from a secret.
backend.redisUrlundefinedThe Redis URL of the database handling ILP packet data. Can be provided directly as a value or referenced from a secret.
backend.ilp.hosthttp://rafiki-backend:3000The public endpoint of your Open Payments resource server.
backend.ilp.addresstest.rafiki-backendThe ILP address of your Rafiki instance.
backend.ilp.connectorhttp://rafiki-backend:3002The ILP connector address where ILP packets are received.
backend.ilp.streamSecretchangemeThe seed secret to generate shared STREAM secrets. Can be provided directly as a value or referenced from a secret.
backend.key.idrafiki-override-this-valueYour Rafiki instance’s client key ID.
backend.key.pvk''The private key pem file used. Must be provided as base64 encoded version of the pem file. If empty, a job will generate a new key pair.
backend.webhook.urlhttp://wallet/webhooks/rafikiYour endpoint that consumes webhook events.
backend.webhookSignatureSecretchangemeThe secret to generate request header signatures for webhook event requests. Can be provided directly as a value or referenced from a secret.

Conditionally required values

Helm value nameDefaultDescription
backend.instanceNamerafiki-backend-changemeYour Rafiki instance’s name used to communicate for auto-peering and/or telemetry. Required when auto-peering and/or telemetry is enabled.
backend.trustProxytrueMust be set to true when running Rafiki behind a proxy. When true, the X-Forwarded-Proto header is used to determine if connections are secure.

Optional values

Helm value nameDefaultDescription
backend.nodeEnvproductionThe type of node environment: development, test, or production.
backend.logLevelinfoPino log level
backend.useTigerbeetlefalseWhen true, a TigerBeetle database is used for accounting. When false, a Postgres database is used.
backend.secrets.createfalseIf true, the chart will create a secret with the name of the release. If false, you must create the secret manually.
backend.rates.url""The endpoint your Rafiki instance uses to request exchange rates.
backend.webhook.timeout200The time, in milliseconds, that WALLET_ADDRESS_WORKERS wait until checking the empty wallet address request queue again.
backend.walletAddressRedirectHtmlPage''This feature is experimental and may change in future versions.
backend.slippage0.01 (1%)The accepted ILP rate fluctuation.
backend.withdrawalThrottleDelay''The delay in liquidity withdrawal processing. Unit ms.
backend.lifetime.exchangeRate15000The time, in milliseconds, the exchange rates you provide via the EXCHANGE_RATES_URL are valid.
backend.lifetime.quote300000 (5 minutes)The time, in milliseconds, an Open Payments quote is valid for.
backend.lifetime.webhook200The time, in milliseconds, that your Rafiki instance will wait for a 200 response from your webhook endpoint. If a 200 response is not received, Rafiki will time out and try to send the webhook event again.
backend.workers.incomingPayment1The number of workers processing incoming payment requests.
backend.workers.outgoingPayment1The number of workers processing outgoing payment requests.
backend.workers.paymentPointer1The number of workers processing payment pointer requests.
backend.workers.webhook1The number of workers processing webhook events.
backend.workerIdle200The time, in milliseconds, that workers will wait until checking an empty queue again.
backend.idempotency.keyTTL86400000 (24 hours)The TTL, in milliseconds, for idempotencyKey on GraphQL mutations on the Backend Admin API.
backend.idempotency.keyLock2000The TTL, in milliseconds, for idempotencyKey concurrency lock on GraphQL mutations on the Backend Admin API.
backend.telemetry.enabledfalseEnables the telemetry service on Rafiki.
backend.telemetry.livenetfalseWhen true, telemetry is enabled for livenet.
backend.autoPeering.enabledfalseEnables the auto-peering service on Rafiki.
backend.port.admin3001The port of your Backend Auth API server.
backend.port.connector3002The port of the ILP connector for sending packets via ILP over HTTP.
backend.port.openPayments3000The port of your Open Payments resource server.
backend.port.autoPeering3005If auto-peering is enabled, the server will use this port.
backend.replicaCount1Currently rafiki should run with a single replica, so this value is set to 1.
backend.nodeSelector{}Can be used to ensure rafiki-backend is deployed on a specific node or set of nodes.
backend.serviceAccount.createfalseIf true, a ServiceAccount will be created with the specified name and annotations.
backend.serviceAccount.annotations{}Annotations to add to the ServiceAccount.
backend.serviceAccount.name""The name of the ServiceAccount to use.
backend.service.nameserviceThe name of the service.
backend.service.annotations{}Annotations to add to the service.
backend.service.typeClusterIPThe type of Kubernetes service.
backend.service.portsMultiple portsService port configuration for open-payments (3000), admin (3001), connector (3002), and auto-peering (3005) endpoints.
backend.configmapfiles/config.yamlThe template for generating the default env configmap.
backend.secretsGenFilefiles/secret.yamlThe template for generating the env secrets.
backend.containers.nameserverThe name of the main container.
backend.containers.resources.requests.memory256MiThe minimum amount of memory required by the container.
backend.containers.resources.requests.cpu1The minimum amount of CPU required by the container.
backend.containers.resources.limits.memory2048MiThe maximum amount of memory the container can use.
backend.containers.resources.limits.cpu4The maximum amount of CPU the container can use.
backend.containers.readinessProbe.httpGet.path/healthzThe path for the readiness probe HTTP check.
backend.containers.readinessProbe.httpGet.port3000The port for the readiness probe HTTP check.
backend.containers.livenessProbe.httpGet.path/healthzThe path for the liveness probe HTTP check.
backend.containers.livenessProbe.httpGet.port3000The port for the liveness probe HTTP check.
backend.containers.portsMultiple portsContainer port configuration for open-payments (3000), admin (3001), connector (3002), and auto-peering (3005) endpoints.
backend.containers.volumeMountsVolume mount configurationMounts the keys volume at /mnt/keys as read-only.
Frontend service

The Rafiki frontend service provides an administrative web interface for managing your Rafiki instance. It offers a user-friendly dashboard for monitoring and managing wallet addresses, payments, peers, and other Open Payments resources. The frontend communicates with the Backend Admin API to perform administrative operations.

Ports exposed:

  • 3010 (http) - Rafiki Admin web interface

Required values

Helm value nameDefaultDescription
frontend.serviceUrls.GRAPHQL_URLundefinedURL for Rafiki’s GraphQL Auth Admin API
frontend.serviceUrls.OPEN_PAYMENTS_URLundefinedYour Open Payments API endpoint
frontend.portundefinedPort from which to host the Rafiki Remix app

Conditionally required values

The following values are required only when frontend.kratos.enabled is set to true.

Helm value nameDefaultDescription
frontend.kratos.adminUrlundefinedThe admin endpoint/container address for Kratos
frontend.kratos.containerPublicUrlundefinedThe URL for you to access the Kratos Docker container from within the Docker network. This is used for backend calls to Kratos.
frontend.kratos.browserPublicUrlundefinedThe URL for you to access the Kratos Docker container from a browser outside of the Docker network. This is used for calls from a browser (what you see in the Rafiki Admin UI) to the Kratos server on the backend.

Optional values

Helm value nameDefaultDescription
frontend.nodeEnvproductionThe type of node environment: development, test, or production.
frontend.logLeveldebugPino log level
frontend.replicaCount1The number of pods to run across the cluster.
frontend.nodeSelector{}NodeSelector can be used to specify the nodes on which the pods should run on your cluster.
frontend.serviceAccount.createfalseIf true, a ServiceAccount will be created with the specified name and annotations.
frontend.serviceAccount.annotations{}Annotations to add to the ServiceAccount.
frontend.serviceAccount.name""The name of the ServiceAccount to use.
frontend.service.nameserviceThe name of the service.
frontend.service.typeClusterIPThe type of Kubernetes service.
frontend.service.ports.port3010The port exposed by the service.
frontend.service.ports.targetPort3010The port on the container that the service should forward traffic to.
frontend.service.ports.protocolTCPThe protocol used by the port.
frontend.service.ports.namehttpThe name of the port.
frontend.configmapfiles/config.yamlDefines the location of the template that will be used to generate the ConfigMap.
frontend.containers.nameserverThe name of the main container.
frontend.containers.envFromConfigMap referenceEnvironment variables sourced from the ConfigMap with the release name.
frontend.containers.resources.requests.memory128MiThe minimum amount of memory required by the container.
frontend.containers.resources.requests.cpu100mThe minimum amount of CPU required by the container.
frontend.containers.resources.limits.memory512MiThe maximum amount of memory the container can use.
frontend.containers.resources.limits.cpu1The maximum amount of CPU the container can use.
frontend.containers.ports.namehttpThe name of the container port.
frontend.containers.ports.containerPort3010The port number on the container.
frontend.containers.ports.protocolTCPThe protocol used by the container port.
frontend.rollingUpdate.maxSurge100%The maximum number of pods that can be created above the desired number during a rolling update.
frontend.rollingUpdate.maxUnavailable50%The maximum number of pods that can be unavailable during a rolling update.
frontend.kratos.enabledfalseWhen true, Kratos authentication is enabled for the frontend.

To expose Rafiki services outside the cluster, you’ll need to configure ingress. Here’s an example using NGINX Ingress Controller:

If you don’t already have an ingress controller installed:

Terminal window
# Add the ingress-nginx repository
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
# Install the ingress controller
helm install nginx-ingress ingress-nginx/ingress-nginx \
--set controller.publishService.enabled=true

Add ingress configuration to your service values files:

# In backend-values.yaml
ingress:
enabled: true
className: nginx
hosts:
- host: rafiki-backend.your-domain.com
paths:
- path: /
pathType: Prefix
service:
name: rafiki-backend-service
port: 3000
tls:
- secretName: rafiki-backend-tls
hosts:
- rafiki-backend.your-domain.com
# In auth-values.yaml
ingress:
enabled: true
className: nginx
hosts:
- host: rafiki-auth.your-domain.com
paths:
- path: /
pathType: Prefix
service:
name: rafiki-auth-service
port: 3006
tls:
- secretName: rafiki-auth-tls
hosts:
- rafiki-auth.your-domain.com

Create DNS records pointing to your ingress controller’s external IP:

  • rafiki-backend.your-domain.com
  • rafiki-auth.your-domain.com
  • rafiki-frontend.your-domain.com

You can use an external PostgreSQL instance or deploy one using Helm:

Terminal window
# Add Bitnami repository
helm repo add bitnami https://charts.bitnami.com/bitnami
# Install PostgreSQL
helm install rafiki-postgresql bitnami/postgresql \
--set auth.postgresPassword=your-secure-password \
--set auth.database=rafiki \
--set primary.persistence.size=20Gi

Deploy Redis for caching and session management:

Terminal window
# Install Redis
helm install rafiki-redis bitnami/redis \
--set auth.enabled=false \
--set master.persistence.size=8Gi

For high-performance accounting, deploy TigerBeetle:

Terminal window
# Add TigerBeetle repository
helm repo add tigerbeetle https://tigerbeetle.github.io/helm-charts
# Install TigerBeetle
helm install rafiki-tigerbeetle tigerbeetle/tigerbeetle \
--set replicaCount=3 \
--set persistence.size=20Gi

To upgrade your Rafiki services to newer versions:

Terminal window
# Update the Helm repository
helm repo update
# Upgrade each service
helm upgrade rafiki-auth interledger/rafiki-auth -f auth-values.yaml
helm upgrade rafiki-backend interledger/rafiki-backend -f backend-values.yaml
helm upgrade rafiki-frontend interledger/rafiki-frontend -f frontend-values.yaml

To uninstall Rafiki services:

Terminal window
helm uninstall rafiki-auth
helm uninstall rafiki-backend
helm uninstall rafiki-frontend
# Optionally uninstall dependencies
helm uninstall rafiki-postgresql
helm uninstall rafiki-redis
helm uninstall rafiki-tigerbeetle

Verify that all services are running correctly:

Terminal window
# Check pod status
kubectl get pods -l app.kubernetes.io/name=rafiki-auth
kubectl get pods -l app.kubernetes.io/name=rafiki-backend
kubectl get pods -l app.kubernetes.io/name=rafiki-frontend
# Check service endpoints
kubectl get endpoints
# Check for events
kubectl get events --sort-by=.metadata.creationTimestamp
  1. Verify database connectivity:

    Terminal window
    kubectl logs -l app.kubernetes.io/name=rafiki-backend | grep -i database
  2. Check PostgreSQL status:

    Terminal window
    kubectl get pods -l app.kubernetes.io/name=postgresql
    kubectl logs -l app.kubernetes.io/name=postgresql
  3. Test database connection:

    Terminal window
    kubectl run -it --rm debug --image=postgres:14 -- psql postgresql://username:password@rafiki-postgresql:5432/rafiki
  1. Check Redis status:

    Terminal window
    kubectl get pods -l app.kubernetes.io/name=redis
    kubectl logs -l app.kubernetes.io/name=redis
  2. Test Redis connectivity:

    Terminal window
    kubectl run -it --rm debug --image=redis:7 -- redis-cli -h rafiki-redis ping
  1. Verify service names and ports:

    Terminal window
    kubectl get services
    kubectl describe service rafiki-backend-service
  2. Check DNS resolution:

    Terminal window
    kubectl run -it --rm debug --image=busybox -- nslookup rafiki-backend-service
  1. Check auth service logs:

    Terminal window
    kubectl logs -l app.kubernetes.io/name=rafiki-auth
  2. Verify secrets are properly mounted:

    Terminal window
    kubectl describe pod -l app.kubernetes.io/name=rafiki-auth
  3. Test auth endpoints:

    Terminal window
    kubectl port-forward svc/rafiki-auth-service 3007:3007
    curl http://localhost:3007/healthz
  1. Check ingress controller status:

    Terminal window
    kubectl get pods -n ingress-nginx
    kubectl logs -n ingress-nginx -l app.kubernetes.io/component=controller
  2. Verify ingress resources:

    Terminal window
    kubectl get ingress
    kubectl describe ingress rafiki-backend-ingress
  3. Check TLS certificates:

    Terminal window
    kubectl get secrets
    kubectl describe secret rafiki-backend-tls
  1. Check resource usage:

    Terminal window
    kubectl top pods
    kubectl top nodes
  2. Monitor pod metrics:

    Terminal window
    kubectl describe pod -l app.kubernetes.io/name=rafiki-backend
  3. Scale services if needed:

    Terminal window
    # Update replicaCount in values.yaml and upgrade
    helm upgrade rafiki-backend interledger/rafiki-backend -f backend-values.yaml
  • Use strong passwords: Replace all default passwords with cryptographically secure values
  • Enable TLS: Configure HTTPS for all external communications
  • Network policies: Implement Kubernetes network policies to restrict pod-to-pod communication
  • RBAC: Use Kubernetes Role-Based Access Control to limit cluster access
  • Secrets management: Consider using external secret management solutions like HashiCorp Vault
  • Image security: Use specific image tags and scan images for vulnerabilities
  • Pod security: Configure pod security standards and security contexts
  • Multi-replica deployments: Run multiple replicas of critical services
  • Pod disruption budgets: Configure disruption budgets to maintain availability during updates
  • Resource limits: Set appropriate CPU and memory limits
  • Health checks: Configure proper readiness and liveness probes
  • Load balancing: Use multiple ingress controller replicas
  • Prometheus: Deploy Prometheus for metrics collection
  • Grafana: Set up Grafana dashboards for visualization
  • Logging: Implement centralized logging with ELK stack or similar
  • Alerting: Configure alerting rules for critical issues
  • Distributed tracing: Consider implementing distributed tracing for request flow analysis

PostgreSQL backup:

Terminal window
# Create a backup job
kubectl create job --from=cronjob/postgres-backup manual-backup-$(date +%Y%m%d-%H%M%S)
# Manual backup
kubectl exec -it rafiki-postgresql-0 -- pg_dump -U postgres rafiki > backup.sql

TigerBeetle backup:

Terminal window
# Create volume snapshots
kubectl create -f - <<EOF
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
name: tigerbeetle-snapshot-$(date +%Y%m%d-%H%M%S)
spec:
source:
persistentVolumeClaimName: tigerbeetle-data-0
volumeSnapshotClassName: your-snapshot-class
EOF
  • Resource allocation: Right-size CPU and memory requests/limits based on actual usage
  • Connection pooling: Configure appropriate database connection pool sizes
  • Caching: Optimize Redis configuration for your workload
  • TigerBeetle tuning: Configure TigerBeetle cluster size based on expected transaction volume
  • Rolling updates: Use rolling update strategies to maintain availability
  • Blue-green deployments: Consider blue-green deployments for zero-downtime upgrades
  • Database migrations: Plan for database schema migrations
  • Backup before upgrade: Always backup data before major upgrades
  • Testing: Test upgrades in staging environments first