ghost

by CloudPirates

Helm chartv0.20.34App 6.77.0Apache-2.0Verified publisher

A simple, powerful publishing platform that allows you to share your stories with the world.

About this chart

Ghost Helm Chart

Ghost is a simple, powerful publishing platform for creating blogs and online publications. This Helm chart deploys Ghost on Kubernetes with optional MariaDB support.

Installation

To install the chart with the release name my-ghost:

helm install my-ghost oci://registry-1.docker.io/cloudpirates/ghost

To install with custom values:

helm install my-ghost oci://registry-1.docker.io/cloudpirates/ghost -f my-values.yaml

Or install directly from the local chart:

helm install my-ghost ./charts/ghost

The output should show you the URL's for your Ghost instance and Admin interface accoriding to your settings in my-values.yaml

URLS:
 1) Website: https://ghost.localhost
 2) Admin: https://admin.ghost.localhost/ghost

Uninstalling

To uninstall/delete the my-ghost deployment:

helm uninstall my-ghost

Security & Signature Verification

This Helm chart is cryptographically signed with Cosign to ensure authenticity and prevent tampering.

Public Key:

-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE5U+rM2d3hDjgP5T3cLShuuQIU9vR
Z4/G+Nug6q5vRa+C3qUA1wXjbaJFAfcIrv5VjmYAYOj13shnPpp3Zh4fnQ==
-----END PUBLIC KEY-----

To verify the helm chart before installation, copy the public key to the file cosign.pub and run cosign:

cosign verify --key cosign.pub registry-1.docker.io/cloudpirates/ghost:<version>

Configuration

Custom Admin URL

By default, this chart expects a second ingress host for the admin interface. If you want to customize the admin URL or use a different configuration, you can set it explicitly:

config:
  admin:
    url: "https://custom-admin.example.com"

If config.admin.url is not set (empty string or not defined), the chart will automatically use the second ingress host defined in ingress.hosts[1].host.

External database support

If you want to use an external database (e.g., AWS RDS, DigitalOcean Managed Databases), you need to set the following values in your my-values.yaml:

mariadb:
  enabled: false
config:
  database:
    client: "mysql"
    externalConnection:
      host: "ghost-mariadb"
      port: 3306
      user: "ghost"
      password: "changeme"
      database: "ghost"
    pool:
      min: 2
      max: 10
  ...

Using Kubernetes Secrets for Credentials

Database Credentials from Secret

For external databases:

Create a Kubernetes secret with your database credentials:

kubectl create secret generic ghost-db-credentials \
  --from-literal=username=ghost \
  --from-literal=password=your-secure-password

Reference this secret in your my-values.yaml:

mariadb:
  enabled: false

config:
  database:
    client: "mysql"
    externalConnection:
      host: "my-external-db.example.com"
      port: 3306
      database: "ghost"
      existingSecret:
        name: "ghost-db-credentials"
        usernameKey: "username"
        passwordKey: "password"

For bundled MariaDB:

You can also use an existing secret with the bundled MariaDB deployment. Create a secret with the required keys:

kubectl create secret generic ghost-mariadb-credentials \
  --from-literal=username=ghost \
  --from-literal=mariadb-password=your-secure-password

Reference it in your my-values.yaml:

mariadb:
  enabled: true
  auth:
    database: ghost
    existingSecret: "ghost-mariadb-credentials"

Note: The secret must contain the following keys:

  • username: database username
  • mariadb-password: database password for the user

SMTP Credentials from Secret

Create a secret for SMTP credentials:

kubectl create secret generic ghost-smtp-credentials \
  [email protected] \
  --from-literal=pass=your-smtp-password

Reference it in your values:

config:
  mail:
    transport: "SMTP"
    options:
      service: "Mailgun"
      host: "smtp.mailgun.org"
      port: 465
      secure: true
      auth:
        existingSecret:
          name: "ghost-smtp-credentials"
          userKey: "user"
          passKey: "pass"
    from: "[email protected]"

The following tables list the configurable parameters of the Ghost chart organized by category:

Global Parameters

ParameterDescriptionDefault
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as array[]

Common Parameters

ParameterDescriptionDefault
nameOverrideString to partially override ghost.fullname""
fullnameOverrideString to fully override ghost.fullname""
namespaceOverrideString to override the namespace for all resources""
commonLabelsLabels to add to all deployed objects{}
commonAnnotationsAnnotations to add to all deployed objects{}
replicaCountNumber of Ghost replicas to deploy1

Image Parameters

ParameterDescriptionDefault
image.registryGhost image registrydocker.io
image.repositoryGhost image repositoryghost
image.tagGhost image tag6.9.1@sha256:8a30cacb126262887f4db101e438271ade0b51437917b8165d26b0fede72ccf2
image.pullPolicyGhost image pull policyAlways

Network Parameters

ParameterDescriptionDefault
containerPortsList of container ports[{name: http, containerPort: 2368}]
service.typeKubernetes service typeClusterIP
service.portsList of service ports[{port: 80, targetPort: http}]
ingress.enabledEnable ingress record generationtrue
ingress.classNameIngressClass for the ingress record""
ingress.annotationsAdditional ingress annotations{}
ingress.hostsList of ingress hosts[{host: ghost.localhost, paths:[{path: /, pathType: Prefix}]}, {host: admin.ghost.localhost, paths:[{path: /ghost, pathType: Prefix}]}]
ingress.tlsTLS configuration for ingress[]

Persistence Parameters

ParameterDescriptionDefault
persistence.enabledEnable persistence using PVCtrue
persistence.annotationsAnnotations for PVC{}
persistence.existingClaimUse an existing PVC""
persistence.storageClassStorage class of backing PVC""
persistence.accessModesPVC access modes[ReadWriteOnce]
persistence.sizeSize of persistent volume claim8Gi

Database Parameters

ParameterDescriptionDefault
mariadb.enabledDeploy MariaDB as dependencytrue
mariadb.auth.databaseMariaDB database nameghost
mariadb.auth.usernameMariaDB usernameghost
mariadb.auth.passwordMariaDB passwordchangeme
mariadb.auth.existingSecretName of existing secret with MariaDB credentials (must contain keys: username, mariadb-password)""
mariadb.auth.allowEmptyRootPasswordAllow empty root passwordfalse
config.database.externalConnection.existingSecret.nameName of existing secret for external DB credentials""
config.database.externalConnection.existingSecret.usernameKeyKey in secret containing database usernameusername
config.database.externalConnection.existingSecret.passwordKeyKey in secret containing database passwordpassword

Mail Configuration Parameters

ParameterDescriptionDefault
config.mail.options.auth.existingSecret.nameName of existing secret for SMTP credentials""
config.mail.options.auth.existingSecret.userKeyKey in secret containing SMTP usernameuser
config.mail.options.auth.existingSecret.passKeyKey in secret containing SMTP passwordpass

Pod Parameters

ParameterDescriptionDefault
resourcesResource limits and requests for pod{}
nodeSelectorNode selector for pod assignment{}
tolerationsTolerations for pod assignment[]
affinityAffinity for pod assignment{}
podSecurityContext.fsGroupSet pod's Security Context fsGroup1000
containerSecurityContext.runAsUserSet container's Security Context runAsUser1000
containerSecurityContext.runAsNonRootRun as non-root usertrue
containerSecurityContext.allowPrivilegeEscalationAllow privilege escalationfalse
priorityClassNamePriority class for the ghost instance""

Health Check Parameters

ParameterDescriptionDefault
livenessProbe.enabledEnable liveness probetrue
livenessProbe.typeProbe type (tcpSocket or httpGet)tcpSocket
livenessProbe.initialDelaySecondsInitial delay seconds30
livenessProbe.periodSecondsPeriod seconds10
readinessProbe.enabledEnable readiness probetrue
readinessProbe.typeProbe type (tcpSocket or httpGet)tcpSocket
readinessProbe.initialDelaySecondsInitial delay seconds5
readinessProbe.periodSecondsPeriod seconds12

Init Container Parameters

ParameterDescriptionDefault
initContainers.waitForMariadb.imageMariaDB init container image (leave empty to use registry/repository/tag)""
initContainers.waitForMariadb.registryMariaDB init container image registry (overrid

Deploy ghost with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ghost on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartghost is pinned at v0.20.34 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply