You are currently viewing the new Anvil Editor Docs.
Switch to the Classic Editor Docs
You are currently viewing the Classic Editor Docs.
Switch to the new Anvil Editor Docs

The Anvil Operator

The Anvil Kubernetes Operator is responsible for orchestrating individual Kubernetes Resources to provision a full Anvil Cluster inside Kubernetes. This way, you only need to deploy a single Custom Resource to your Kubernetes Cluster, and the Anvil Operator takes care of all the individual Pods, Services, etc.

Configuration

Your Anvil cluster can be configured by specifying appropriate options in the AnvilCluster Custom Resource spec. Here is a sample AnvilCluster resource:

apiVersion: anvil.works/v1
kind: Cluster
metadata:
  namespace: anvil
  name: maple
spec:
  versionTag: latest
  licenceKeySecret:
    name: anvil-licence-key
    key: value
  platformServerConfig:
    anvilOrigin: https://anvil.mycorp.com
    appOrigin: https://{{id-or-alias}}.apps.anvil.mycorp.com
  platformServerCount: 3
  loadBalancer:
    internalTls:
      certificateSecretName: anvil-certs
  backup:
    frequency: 24h

Backup and Restore

In its default configuration, the Anvil Operator will back up your Anvil Cluster every 24 hours, with the internal databases backed up continuously. You can restore your cluster to any previous time by creating a ClusterRestore Resource. For example:

apiVersion: anvil.works/v1
kind: ClusterRestore
metadata:
  namespace: default
  name: maple-restore
spec:
  source:
    pvc:
      claimName: anvil-maple-backup-b7fbaf
      directory: /anvil-backups
  targetTime: latest_backup

Updating Anvil

Update your Anvil cluster by replacing the spec.versionTag property in your AnvilCluster Resource. The Anvil Operator will take care of bringing up the new servers and draining the old ones, avoiding downtime where possible.

Updating the Anvil Operator

The Anvil Operator can be updated by creating a new Helm release. Updating the operator will not affect your running Anvil installation inside Kubernetes.


Do you still have questions?

Our Community Forum is full of helpful information and Anvil experts.