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 components:
- Tigerbeetle: High-performance accounting database used for financial transaction processing and ledger management
- PostgreSQL: Used for storing application data and metadata
- Redis: Used for caching and messaging between components
Before you begin, ensure you have the following:
- Kubernetes cluster deployed
- kubectl installed and configured
- Helm installed
Add the official Interledger Helm repository which contains the Rafiki charts:
helm repo add interledger https://interledger.github.io/chartshelm repo update
Create a values.yaml
file to customize your Rafiki deployment.
Click to expand
# Rafiki values.yaml for Kubernetes deployment
# =====================================================================
# REQUIRED CONFIGURATION:
# The following sections contain values that MUST be customized
# for your specific environment before deployment
# =====================================================================
# Global settings
global:imageRegistry: "" # OPTIONAL: Specify if using a private registryimagePullSecrets: [] # REQUIRED: If using private registry, add your pull secrets herestorageClass: "" # REQUIRED: Set to your cluster's storage class
# Backend service configuration
backend:enabled: trueimage:repository: ghcr.io/interledger/rafiki/backendtag: latest # REQUIRED: Change to specific version for productionpullPolicy: IfNotPresentreplicaCount: 1 # CONSIDER: Adjust based on your load requirementsresources:requests:cpu: 100mmemory: 256Milimits:cpu: 500mmemory: 512Miservice:type: ClusterIP # CONSIDER: May need LoadBalancer or NodePort depending on your setupport: 3000ingress:enabled: false # REQUIRED: Set to true if exposing outside the clusterannotations: {} # REQUIRED: Add annotations for your ingress controller (nginx, traefik, etc.)hosts: - host: rafiki-backend.local # REQUIRED: Change to your actual domainpaths: ["/"]tls: [] # REQUIRED: Configure if using HTTPSenv: # Environment variables for backendNODE_ENV: productionDATABASE_URL: "postgresql://postgres:postgres@rafiki-postgresql:5432/rafiki" # REQUIRED: Update credentialsREDIS_URL: "redis://rafiki-redis:6379" # REQUIRED: Update if using auth with RedisAUTH_SERVER_GRANT_TYPES: "authorization_code,refresh_token"AUTH_SERVER_DOMAIN: "http://rafiki-auth-server" # REQUIRED: Update to your auth server URLOPEN_PAYMENTS_URL: "https://wallet.example.com/open-payments" # REQUIRED: Update to your Open Payments URL # TigerBeetle configurationUSE_TIGERBEETLE: "true" # REQUIRED: Enable TigerBeetle for accountingTIGERBEETLE_CLUSTER_ID: "0" # REQUIRED: Must match tigerbeetle.config.clusterIDTIGERBEETLE_REPLICA_ADDRESSES: "tigerbeetle-0.tigerbeetle:3004,tigerbeetle-1.tigerbeetle:3004,tigerbeetle-2.tigerbeetle:3004" # REQUIRED: List all TigerBeetle replicas
# Auth server configuration
authServer:enabled: trueimage:repository: ghcr.io/interledger/rafiki/authtag: latest # REQUIRED: Change to specific version for productionpullPolicy: IfNotPresentreplicaCount: 1 # CONSIDER: Adjust based on your load requirementsresources:requests:cpu: 100mmemory: 256Milimits:cpu: 500mmemory: 512Miservice:type: ClusterIP # CONSIDER: May need LoadBalancer or NodePort depending on your setupport: 3001ingress:enabled: false # REQUIRED: Set to true if exposing outside the clusterannotations: {} # REQUIRED: Add annotations for your ingress controllerhosts: - host: rafiki-auth.local # REQUIRED: Change to your actual domainpaths: ["/"]tls: [] # REQUIRED: Configure if using HTTPSenv:NODE_ENV: productionDATABASE_URL: "postgresql://postgres:postgres@rafiki-postgresql:5432/rafiki" # REQUIRED: Update credentialsREDIS_URL: "redis://rafiki-redis:6379" # REQUIRED: Update if using auth with RedisBACKEND_URL: "http://rafiki-backend:3000" # REQUIRED: Must match your backend service name
# Frontend configuration
frontend:enabled: trueimage:repository: ghcr.io/interledger/rafiki/frontendtag: latest # REQUIRED: Change to specific version for productionpullPolicy: IfNotPresentreplicaCount: 1resources:requests:cpu: 100mmemory: 128Milimits:cpu: 200mmemory: 256Miservice:type: ClusterIP # CONSIDER: May need LoadBalancer or NodePort depending on your setupport: 3002ingress:enabled: false # REQUIRED: Set to true and configure for user accessannotations: {} # REQUIRED: Add annotations for your ingress controllerhosts: - host: rafiki.local # REQUIRED: Change to your actual domainpaths: ["/"]tls: [] # REQUIRED: Configure if using HTTPSenv:NODE_ENV: productionBACKEND_URL: "http://rafiki-backend:3000" # REQUIRED: Must match your backend service configurationAUTH_SERVER_URL: "http://rafiki-auth-server:3001" # REQUIRED: Must match your auth server configuration
# Connector configuration
connector:enabled: trueimage:repository: ghcr.io/interledger/rafiki/connectortag: latest # REQUIRED: Change to specific version for productionpullPolicy: IfNotPresentreplicaCount: 1 # CONSIDER: Adjust based on your traffic needsresources:requests:cpu: 200mmemory: 256Milimits:cpu: 1000mmemory: 512Miservice:type: ClusterIPport: 3003env:NODE_ENV: productionDATABASE_URL: "postgresql://postgres:postgres@rafiki-postgresql:5432/rafiki" # REQUIRED: Update credentialsREDIS_URL: "redis://rafiki-redis:6379" # REQUIRED: Update if using auth with RedisBACKEND_URL: "http://rafiki-backend:3000" # REQUIRED: Must match your backend service nameILP_ADDRESS: "test.rafiki" # REQUIRED: Set to your production ILP addressCONNECTOR_URL: "http://0.0.0.0:3003" # REQUIRED: Set to your connector's publicly accessible URL for ILP peers # TigerBeetle configurationUSE_TIGERBEETLE: "true" # REQUIRED: Enable TigerBeetle for accountingTIGERBEETLE_CLUSTER_ID: "0" # REQUIRED: Must match tigerbeetle.config.clusterIDTIGERBEETLE_REPLICA_ADDRESSES: "tigerbeetle-0.tigerbeetle:3004,tigerbeetle-1.tigerbeetle:3004,tigerbeetle-2.tigerbeetle:3004" # REQUIRED: List all TigerBeetle replicas
# PostgreSQL configuration
postgresql:enabled: true # Set to false if using external PostgreSQLauth:username: postgres # REQUIRED: Change for productionpassword: postgres # REQUIRED: Change for production - USE A STRONG PASSWORDdatabase: rafikiprimary:persistence:enabled: truesize: 8Gi # REQUIRED: Adjust based on your data volumeservice:ports:postgresql: 5432
# Redis configuration
redis:enabled: true # Set to false if using external Redisarchitecture: standalone # CONSIDER: Use replication for productionauth:enabled: false # REQUIRED: Set to true and configure password for productionpassword: "" # REQUIRED: Set a strong password if auth is enabledmaster:persistence:enabled: truesize: 8Gi # REQUIRED: Adjust based on your data volumeservice:ports:redis: 6379
# Monitoring
monitoring:enabled: false # CONSIDER: Enable for production environmentsprometheus:enabled: false # CONSIDER: Enable for production monitoringgrafana:enabled: false # CONSIDER: Enable for production dashboards
# Persistence configuration for data that needs to be persisted
persistence:enabled: truestorageClass: "" # REQUIRED: Set to your cluster's storage classaccessMode: ReadWriteOncesize: 10Gi # REQUIRED: Adjust based on your data volume
# Security settings
securityContext:enabled: truerunAsUser: 1000runAsGroup: 1000fsGroup: 1000
# Pod Security settings
podSecurityContext:enabled: true
# Network policy settings
networkPolicy:enabled: false # CONSIDER: Enable for production to restrict pod communication
# Configure service accounts
serviceAccount:create: truename: "rafiki" # REQUIRED: Change if conflicts with existing service accountsannotations: {} # REQUIRED: Add annotations if using IAM roles for service accounts
# Configure pod disruption budget
podDisruptionBudget:enabled: false # CONSIDER: Enable for production for high availabilityminAvailable: 1
# Resource requests and limits for init containers
initContainers:resources:requests:cpu: 100mmemory: 128Milimits:cpu: 200mmemory: 256Mi
# =====================================================================
# TIGERBEETLE CONFIGURATION:
# Configuration for TigerBeetle as the accounting database
# =====================================================================
tigerbeetle:enabled: true # REQUIRED: Set to true to use TigerBeetle for accountingimage:repository: ghcr.io/tigerbeetle/tigerbeetletag: 0.14.2 # REQUIRED: Check for the latest compatible versionpullPolicy: IfNotPresentreplicaCount: 3 # REQUIRED: For production, use at least 3 replicas for consensusresources:requests:cpu: 500mmemory: 1Gilimits:cpu: 2000mmemory: 4Giservice:type: ClusterIPport: 3004persistence:enabled: truestorageClass: "" # REQUIRED: Set to your cluster's storage classsize: 20Gi # REQUIRED: Adjust based on expected transaction volumeaccessMode: ReadWriteOnceconfig:clusterID: 0 # REQUIRED: Set a unique cluster IDreplicaCount: 3 # Should match replicaCount above # For consensus algorithm (1f+1 redundancy where f is number of failures tolerated) # 1 replica: 0 fault tolerance # 3 replicas: 1 fault tolerance (recommended minimum for production) # 5 replicas: 2 fault tolerance (recommended for critical systems)
Each Rafiki service can be configured via environment variables. Below are the main environment variables for each service:
Auth service
The Rafiki auth
service is responsible for handling authentication and authorization for your application. It connects to a Postgres database to store auth-related resources and a Redis database for storing session data. See Auth service for more information.
Ports exposed:
- 3003 (
ADMIN_PORT
) is used for the Auth Admin API - 3006 (
AUTH_PORT
) is used for the Open Payments authorization server
Required values
Helm variable | Default | Description |
---|---|---|
auth.postgresql.host ,auth.postgresql.port ,auth.postgresql.username ,auth.postgresql.database ,auth.postgresql.password | postgresql://postgres:password@localhost:5432/auth_development | The URL of the Postgres database storing your Open Payments grant data. For Helm, these components are provided individually. |
auth.server.domain | undefined | The public endpoint for your Rafiki instance’s public Open Payments routes. |
auth.cookieKey | undefined | The koa KeyGrip key that is used to sign cookies for an interaction session. |
auth.identityServer.domain | undefined | The 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.secret | undefined | A 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. |
auth.redis.host ,auth.redis.port | redis://127.0.0.1:6379 | The connection URL for Redis. For Helm, these components are provided individually. |
Conditionally required values
Helm value name | Default | Description |
---|---|---|
auth.trustProxy | false | Must 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 name | Default | Description |
---|---|---|
auth.accessToken.deletionDays | 30 | The days until expired and/or revoked access tokens are deleted. |
auth.accessToken.expirySeconds | 600 (10 minutes) | The expiry time, in seconds, for access tokens. |
auth.adminApi.signatureVersion | 1 | The version of the request signing algorithm used to generate signatures. |
auth.adminAPI.signatureTtlSeconds | 30 | The TTL, in seconds, for which a request’s signature will be valid. |
auth.port.admin | 3003 | The port of your Rafiki Auth Admin API server. |
auth.port.auth | 3006 | The port of your Open Payments authorization server. |
auth.workers.cleanup | 1 | The number of workers processing expired or revoked access tokens. |
auth.enableManualMigrations | false | When true , you must run the auth Postgres database manually with the command npm run knex – migrate:latest –envproduction |
auth.interaction.incomingPayment | false | When true , incoming Open Payments grant requests are interactive |
auth.interactionExpirySeconds | 600 (10 minutes) | The time, in seconds, for which a user can interact with a grant request before the request expires. |
auth.port.interaction | 3009 | The port number of your Open Payments interaction-related APIs. |
auth.port.introspection | 3007 | The port of your Open Payments access token introspection server. |
auth.interaction.listAll | true | When true , grant requests that include a list-all action will require interaction. In these requests, the client asks to list resources that it did not create. |
auth.logLevel | info | Pino log level |
auth.nodeEnv | development | The type of node environment: development , test , or production . |
auth.interaction.quote | false | When true , quote grants are interactive. |
auth.redis.tlsCaFile | '' | Redis TLS config |
auth.redis.tlsCertFile | '' | Redis TLS config |
auth.redis.tlsKeyFile | '' | Redis TLS config |
auth.grant.waitSeconds | 5 | The wait time, in seconds, included in a grant request response (grant.continue ). |
Backend service
The Rafiki backend
service handles business logic and external communication. It exposes the Open Payments APIs and an Interledger connector for sending and receiving packets. It connects to a Redis database for caching, a Postgres database for Open Payments resources, and TigerBeetle for accounting liquidity. See Backend service for more information.
Ports exposed:
- 3000 (
OPEN_PAYMENTS_PORT
) is used for the Open Payments resource server - 3001 (
ADMIN_PORT
) is used for the Backend Admin API - 3002 (
CONNECTOR_PORT
) is used for the ILP connector to send and receive ILP packets
Required values
Helm value name | Default | Description |
---|---|---|
backend.serviceUrls.AUTH_SERVER_GRANT_URL | undefined | The endpoint on your Open Payments authorization server to grant a request. |
backend.serviceUrls.AUTH_SERVER_INTROSPECTION_URL | undefined | The endpoint on your Open Payments authorization server to introspect an access token. |
backend.postgresql.host ,backend.postgresql.port ,backend.postgresql.username ,backend.postgresql.database ,backend.postgresql.password | postgresql://postgres:password@localhost:5432/development | The Postgres database URL of the database storing your resource data. For Helm, these components are provided individually. |
backend.serviceUrls.EXCHANGE_RATES_URL | undefined | The endpoint your Rafiki instance uses to request exchange rates. |
backend.ilp.address | undefined | The ILP address of your Rafiki instance. |
backend.ilp.connectorUrl | undefined | The ILP connector address where ILP packets are received. |
backend.key.id | undefined | Your Rafiki instance’s client key ID. |
backend.serviceUrls.OPEN_PAYMENTS_URL | undefined | The public endpoint of your Open Payments resource server. |
backend.redis.host ,backend.redis.port | redis://127.0.0.1:6379 | The Redis URL of the database handling ILP packet data. For Helm, these components are provided individually. |
backend.use.tigerbeetle | true | When true , a TigerBeetle database is used for accounting. When false , a Postgres database is used. |
backend.serviceUrls.WEBHOOK_URL | undefined | Your endpoint that consumes webhook events. |
Conditionally required values
Helm value name | Default | Description |
---|---|---|
backend.instance.name | undefined | Your Rafiki instance’s name used to communicate for auto-peering and/or telemetry. Required when auto-peering and/or telemetry is enabled |
backend.trustProxy | false | Must 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 name | Default | Description |
---|---|---|
backend.port.admin | 3001 | The port of your Backend Auth API server. |
backend.autoPeering.serverPort | 3005 | If auto-peering is enabled, the server will use this port. |
backend.port.connector | 3002 | The port of the ILP connector for sending packets via ILP over HTTP. |
backend.enable.autoPeering | false | When true , auto-peering is enabled. |
backend.enableManualMigrations | false | When true , you must run the database manually with the command npm run knex – migrate:latest –env production |
backend.enable.spspPaymentPointers | true | When true , the SPSP route is enabled. |
backend.lifetime.exchangeRate | 15_000 | The time, in milliseconds, the exchange rates you provide via the EXCHANGE_RATES_URL are valid. |
backend.idempotency.keyLockMs | 2000 | The TTL, in milliseconds, for idempotencyKey concurrency lock on GraphQL mutations on the Backend Admin API. |
backend.idempotency.keyTTL | 86400000 (24 hours) | The TTL, in milliseconds, for idempotencyKey on GraphQL mutations on the Backend Admin API. |
backend.incomingPayment.expiryMaxMs | 2592000000 (30 days) | The maximum into the future, in milliseconds, incoming payments expiry can be set to on creation. |
backend.workerIdle | 200 | The time, in milliseconds, that workers will wait until checking an empty queue again. |
backend.workers.incomingPayment | 1 | The number of workers processing incoming payment requests. |
backend.logLevel | info | Pino log level |
backend.nodeEnv | development | The type of node environment: development , test , or production . |
backend.port.openPayments | 3003 | The port of your Open Payments resource server. |
backend.workers.outgoingPayment | 4 | The number of workers processing outgoing payment requests. |
backend.key.file | undefined | The path to your Rafiki instance’s client private key. |
backend.lifetime.quote | 5 * 60_000 (5 minutes) | The time, in milliseconds, an Open Payments quote is valid for. |
backend.redis.tlsCaFile | '' | Redis TLS config |
backend.redis.tlsCertFile | '' | Redis TLS config |
backend.redis.tlsKeyFile | '' | Redis TLS config |
backend.quoteSignatureSecret | undefined | The secret to generate request header signatures for webhook event requests. |
backend.signatureVersion | 1 | The version number to generate request header signatures for webhook events. |
backend.ilp.slippage | 0.01 (1%) | The accepted ILP rate fluctuation. |
backend.ilp.streamSecret | undefined | The seed secret to generate shared STREAM secrets. |
backend.walletAddress.deactivationPaymentGratePeriodMs | 86400000 (24 hours) | The time into the future, in milliseconds, to set expiration of Open Payments incoming payments when deactivating a wallet address. |
backend.walletAddress.lookupTimeoutMs | 1500 | The time, in milliseconds, you have to create a missing wallet address before timeout. |
backend.walletAddress.pollingFrequencyMs | 100 | The frequency of polling while waiting for you to create a missing wallet address. |
backend.serviceUrls.WALLET_ADDRESS_URL | http://127.0.0.1:3001/.well-known/pay | Your Rafiki instance’s internal wallet address. |
backend.workers.walletAddress | 1 | The number of workers processing wallet address requests. |
backend.webhookMaxRetry | 10 | The maximum number of times your Rafiki instance’s backend retries sending a certain webhook event to your configured WEBHOOK_URL . |
backend.lifetime.webhook | 2000 (2 seconds) | The 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.webhook | 1 | The number of workers processing webhook events. |
backend.withdrawalThrottleDelay | undefined | The delay in liquidity withdrawal processing. |
Frontend service
The Rafiki frontend
service provides an internal admin interface for managing your Rafiki instance. It communicates with the Backend Admin API to facilitate administrative tasks. See Frontend service for more information.
Ports exposed:
- 3005 (
PORT
) is used to host the Rafiki Admin app
Required Values
Helm value name | Default | Description |
---|---|---|
frontend.serviceUrls.GRAPHQL_URL | undefined | URL for Rafiki’s GraphQL Auth Admin API |
frontend.serviceUrls.OPEN_PAYMENTS_URL | undefined | Your Open Payments API endpoint |
frontend.port | undefined | Port from which to host the Rafiki Remix app |
Conditionally required values
The following values are required only when frontend.authEnabled
is set to true
.
Helm value name | Default | Description |
---|---|---|
frontend.kratos.adminUrl | undefined | The admin endpoint/container address for Kratos |
frontend.kratos.containerPublicUrl | undefined | The URL for you to access the Kratos Docker container from within the Docker network. This is used for backend calls to Kratos. |
frontend.kratos.browserPublicUrl | undefined | The 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 name | Default | Description |
---|---|---|
frontend.authEnabled | true | When true , only authenticated users can be granted access to Rafiki Admin by an administrator |
frontend.quoteSignatureSecret | undefined | The signature secret used to authenticate requests to the Backend Admin API. |
frontend.signatureVersion | 1 | The signature version number used to authenticate requests to the Backend Admin API. |
frontend.enableInsecureMessageCookie | true | When set to true , t , or 1 , cookie will be transmitted over insecure HTTP connection. Insecure message cookies are required for flash messages to work over HTTP. |
frontend.nodeEnv | production | The type of node environment: development , test , or production . |
frontend.logLevel | info | Pino log level |
Install Rafiki using the following command:
helm install rafiki interledger/rafiki -f values.yaml
This will deploy all Rafiki components to your Kubernetes cluster with the configurations specified in your values.yaml
file.
If you want to install to a specific namespace:
kubectl create namespace rafikihelm install rafiki interledger/rafiki -f values.yaml -n rafiki
Check the status of your deployment with the following commands:
# Check all resources deployed by Helmhelm status rafiki
# Check the running podskubectl get pods
# Check the deployed serviceskubectl get services
Configure ingress with NGINX Ingress Controller
Section titled “Configure ingress with NGINX Ingress Controller”To expose Rafiki services outside the cluster using NGINX Ingress Controller:
If you don’t already have NGINX Ingress Controller installed, you can install it using Helm:
# Add the ingress-nginx repositoryhelm repo add ingress-nginx https://kubernetes.github.io/ingress-nginxhelm repo update
# Install the ingress-nginx controllerhelm install nginx-ingress ingress-nginx/ingress-nginx \ --set controller.publishService.enabled=true
Wait for the Load Balancer to be provisioned:
kubectl get services -w nginx-ingress-ingress-nginx-controller
Once the Load Balancer has an external IP or hostname assigned, create DNS records:
auth.example.com
pointing to the Load Balancer IP/hostnamebackend.example.com
pointing to the Load Balancer IP/hostname
Apply your updated configuration:
helm upgrade rafiki interledger/rafiki -f values.yaml
Check if your ingress resources were created correctly:
kubectl get ingress
You should find entries for the auth server and backend API ingress resources.
If you don’t want to use ingress to access Rafiki services, you can use port forwarding to directly access the services:
Service | Port-Forward Command |
---|---|
Auth Server | kubectl port-forward svc/rafiki-auth-server 3000:3000 |
Backend API | kubectl port-forward svc/rafiki-backend-api 3001:3001 |
Admin UI | kubectl port-forward svc/rafiki-backend-api 3001:3001 |
PostgreSQL | kubectl port-forward svc/rafiki-postgresql 5432:5432 |
Redis | kubectl port-forward svc/rafiki-redis-master 6379:6379 |
To upgrade your Rafiki deployment to a newer version:
# Update the Helm repositoryhelm repo update
# Upgrade Rafikihelm upgrade rafiki interledger/rafiki -f values.yaml
To uninstall Rafiki from your cluster:
helm uninstall rafiki
Note that this won’t delete Persistent Volume Claims (PVC) created by the PostgreSQL and Redis deployments. If you want to delete them as well:
kubectl delete pvc -l app.kubernetes.io/instance=rafiki
If a component isn’t working correctly, you can check its logs:
# List all podskubectl get pods
# Check logs for a specific podkubectl logs pod/rafiki-auth-server-0
# List pods and their statuskubectl get pods
# Check logs for a specific podkubectl logs pod/rafiki-auth-server-0
# Get details about a podkubectl describe pod/rafiki-auth-server-0
# Check services and their endpointskubectl get services
# Check Persistent Volume Claimskubectl get pvc
# Check ingress resourceskubectl get ingress
- Check if PostgreSQL pods are running:
kubectl get pods -l app.kubernetes.io/name=postgresql
- Check PostgreSQL logs:
kubectl logs pod/rafiki-postgresql-0
- Verify that the database passwords match those in your
values.yaml
- Check Tigerbeetle logs:
kubectl logs pod/tigerbeetle-0
- Ensure that the PVC for Tigerbeetle has been created correctly
kubectl get pvc -l app.kubernetes.io/name=tigerbeetle
- Verify that the cluster ID is consistent across all components
- Verify NGINX Ingress Controller is running:
kubectl get pods -n ingress-nginx
- Check if your DNS records are correctly pointing to the ingress controller’s external IP
- Check the ingress resource:
kubectl get ingress
- Check ingress controller logs:
kubectl logs -n ingress-nginx deploy/nginx-ingress-ingress-nginx-controller
- Verify that TLS secrets exist if HTTPS is enabled:
kubectl get secrets
- If using cert-manager, check if certificates are properly issued:
kubectl get certificates
- Check certificate status:
kubectl describe certificate [certificate-name]
- Check cert-manager logs:
kubectl logs -n cert-manager deploy/cert-manager
- Check if services are running:
kubectl get services
- Verify pod health:
kubectl describe pod [pod-name]
- Check for resource constraints:
kubectl top pods
- Ensure all required services are running:
kubectl get services
- Verify service endpoints:
kubectl get endpoints
- Test connectivity between pods using temporary debugging pods:
kubectl run -it --rm debug --image=busybox -- sh# Inside the podwget -q -O- http://rafiki-auth-server:3000/health
When deploying Rafiki in production, consider the following security practices:
- Use secure passwords: Replace all default passwords with strong, unique passwords
- Enable TLS: Use HTTPS for all external communications
- Implement network policies: Use Kubernetes network policies to restrict traffic between pods
- Use RBAC: Use Kubernetes Role-Based Access Control to limit access to your cluster
- Use secrets management: Consider using a secrets management solution
- Perform regular updates: Keep your Rafiki deployment updated
To create a backup of your PostgreSQL database:
# Forward PostgreSQL port to local machinekubectl port-forward svc/rafiki-postgresql 5432:5432
# Use pg_dump to create a backuppg_dump -h localhost -U rafiki -d rafiki > rafiki_pg_backup.sql
Tigerbeetle is designed to be fault-tolerant with its replication mechanism. However, to create a backup of Tigerbeetle data, you can use the following approach:
# Create a snapshot of the Tigerbeetle PVCkubectl get pvc tigerbeetle-data-tigerbeetle-0 -o yaml > tigerbeetle-pvc.yaml
# Create a volume snapshotcat <<EOF | kubectl apply -f -apiVersion: snapshot.storage.k8s.io/v1kind: VolumeSnapshotmetadata: name: tigerbeetle-snapshotspec: volumeSnapshotClassName: csi-hostpath-snapclass source: persistentVolumeClaimName: tigerbeetle-data-tigerbeetle-0EOF
To restore from a PostgreSQL backup:
# Forward PostgreSQL port to local machinekubectl port-forward svc/rafiki-postgresql 5432:5432
# Use psql to restore from backuppsql -h localhost -U rafiki -d rafiki < rafiki_pg_backup.sql
To restore Tigerbeetle from a snapshot:
# Create a new PVC from the snapshotcat <<EOF | kubectl apply -f -apiVersion: v1kind: PersistentVolumeClaimmetadata: name: tigerbeetle-data-restoredspec: dataSource: name: tigerbeetle-snapshot kind: VolumeSnapshot apiGroup: snapshot.storage.k8s.io accessModes: - ReadWriteOnce resources: requests: storage: 10GiEOF
# Update the Tigerbeetle StatefulSet to use the restored PVCkubectl patch statefulset tigerbeetle -p '{"spec":{"template":{"spec":{"volumes":[{"name":"data","persistentVolumeClaim":{"claimName":"tigerbeetle-data-restored"}}]}}}}'