phpMyAdmin
A Helm chart for deploying phpMyAdmin on Kubernetes with the official phpmyadmin image.
phpMyAdmin is a web UI for administering MySQL and MariaDB. This chart supports development installs, internal administration portals, and hardened production-style deployments with External Secrets, Gateway API, NetworkPolicy, dual-stack Services, optional shared sessions, and Kubernetes-native availability controls.
Install
helm repo add helmforge https://repo.helmforge.dev
helm repo update
helm install phpmyadmin helmforge/phpmyadmin
OCI:
helm install phpmyadmin oci://ghcr.io/helmforgedev/helm/phpmyadmin
Quick Start
helm install phpmyadmin oci://ghcr.io/helmforgedev/helm/phpmyadmin \
--set phpmyadmin.host=mysql.default.svc.cluster.local
Local access:
kubectl port-forward svc/phpmyadmin 8080:80
Open http://localhost:8080/.
Feature Summary
- Official
phpmyadmincontainer image. - Single-server, multi-server, and arbitrary-server login modes.
- Cookie, config, HTTP, and signon auth mode selection.
- Optional auto-login with inline Secret, existing Secret, or External Secrets Operator.
- External Secrets Operator support with
external-secrets.io/v1. - Ingress and Kubernetes Gateway API
HTTPRoute. - Service dual-stack options through
ipFamilyPolicyandipFamilies. - Optional NetworkPolicy for ingress and database egress.
- Optional ServiceAccount token automount control.
- Optional HPA and PodDisruptionBudget.
- Optional
/sessionsmount for multi-replica session stability. - Optional custom phpMyAdmin config through ConfigMap or
PMA_CONFIG_BASE64. - Optional configuration storage/control user variables.
- Optional custom themes mounted at
/www/themes.
Application Listener
containerPorts.http configures the real Apache listener through the official
image's APACHE_PORT environment variable. It also controls the container
port, probes, and NetworkPolicy ingress rule. service.port is the independent
Kubernetes Service port and routes to the named http target.
containerPorts:
http: 8088
service:
port: 80
Changing only service.port does not change Apache. Use
containerPorts.http when the process must listen on a different port.
Development vs Production
The default values are intentionally simple for development: one replica, no Ingress/Gateway, no NetworkPolicy, no ExternalSecret, and access through port-forward. This keeps a local install easy.
Production deployments should opt into the controls they need:
- Use
auth.existingSecretorexternalSecrets.authinstead of inline passwords. - Prefer
phpmyadmin.authType: cookieunless a controlledconfig,http, orsignonworkflow is required. - Expose phpMyAdmin through private networking, VPN, SSO/reverse proxy auth, or IP allowlists.
- Enable TLS at the Ingress or Gateway layer.
- Enable NetworkPolicy and restrict egress to DNS and the target database.
- Use least-privilege database accounts.
- Enable
sessions.enabledfor multi-replica deployments that rely on cookie/session state. - Add requests, limits, PDB, HPA, topology spread, and anti-affinity where appropriate.
Database Connectivity
Single MySQL/MariaDB server:
phpmyadmin:
host: mysql.default.svc.cluster.local
port: 3306
Multi-server dropdown:
phpmyadmin:
hosts: "mysql-primary.default.svc,mysql-replica.default.svc,mariadb.default.svc"
ports: "3306,3306,3306"
verboses: "Primary,Replica,MariaDB"
Arbitrary server mode:
phpmyadmin:
arbitrary: true
Authentication
Default cookie login:
phpmyadmin:
authType: cookie
auth:
blowfishSecret: "use-a-32-byte-random-secret-here"
Non-cookie auth modes are rendered into config.user.inc.php because the official phpMyAdmin image does not consume an auth-type environment variable:
phpmyadmin:
authType: http
When authType: http is used, the chart automatically switches the default probes to TCP checks because the application root returns 401
until HTTP authentication succeeds.
Auto-login with an existing Secret:
auth:
existingSecret: phpmyadmin-auth
existingSecretUsernameKey: username
existingSecretPasswordKey: password
existingSecretBlowfishKey: blowfish-secret
The Secret should contain:
apiVersion: v1
kind: Secret
metadata:
name: phpmyadmin-auth
type: Opaque
stringData:
username: admin
password: change-me
blowfish-secret: use-a-32-byte-random-secret-here
Auto-login skips the login form and should only be used behind strong network and identity controls.
When a blowfish secret is provided inline, by existing Secret, or by External Secrets Operator, the chart exposes it to the pod as
HELMFORGE_BLOWFISH_SECRET and writes $cfg['blowfish_secret'] through config.user.inc.php.
External Secrets Operator
The chart can render an ExternalSecret using external-secrets.io/v1. The External Secrets Operator
and the referenced SecretStore or ClusterSecretStore must already exist.
externalSecrets:
enabled: true
secretStoreRef:
name: platform-secrets
kind: ClusterSecretStore
auth:
enabled: true
usernameRemoteRef:
key: prod/phpmyadmin
property: username
passwordRemoteRef:
key: prod/phpmyadmin
property: password
blowfishSecretRemoteRef:
key: prod/phpmyadmin
property: blowfish-secret
Ingress
phpmyadmin:
host: mysql.default.svc.cluster.local
absoluteUri: "https://pma.example.com/"
ingress:
enabled: true
ingressClassName: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
hosts:
- host: pma.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: phpmyadmin-tls
hosts:
- pma.example.com
Gateway API
Gateway API support is opt-in and creates an HTTPRoute attached to an existing Gateway.
gatewayAPI:
enabled: true
parentRefs:
- name: public
namespace: gateway-system
sectionName: https
hostnames:
- pma.example.com
Service Dual Stack
Dual-stack is disabled by default and inherits the cluster default. Enable it only on clusters configured for IPv4/IPv6 Services.
service:
ipFamilyPolicy: PreferDualStack
ipFamilies:
- IPv4
- IPv6
NetworkPolicy
networkPolicy:
enabled: true
ingress:
allowSameNamespace: true
egress:
enabled: true
allowDNS: true
allowSameNamespaceDatabase: true
databasePort: 3306
Use extraFrom and extraTo to restrict traffic to Gateway/Ingress controller namespaces and database CIDRs or pod selectors.
Sessions And Replicas
phpMyAdmin is mostly stateless, but cookie/session flows benefit from a shared /sessions mount when running multiple replicas.
replicaCount: 2
sessions:
enabled: true
type: persistentVolumeClaim
accessModes:
- ReadWriteMany
size: 1Gi
For clusters without shared storage, keep replicaCount: 1 or use ingress stickiness.
Custom Configuration
Mount config.user.inc.php:
config:
customConfig: |
<?php
$cfg['ShowPhpInfo'] = false;
$cfg['MaxRows'] = 100;
The chart also generates config.user.inc.php when it needs to apply phpmyadmin.authType values other than cookie or a configured
blowfish secret. If config.customConfig is set, the custom block is appended after the generated block so advanced users can still override
phpMyAdmin settings deliberately.
Or pass base64 configuration through the official image variable:
phpmyadmin:
configBase64: "PD9waHAKJGNmZ1snU2hvd1BocEluZm8nXSA9IGZhbHNlOwo="
Production Example
Architecture Guides
Values & Configuration Reference
All schema parameters, types, defaults, and allowed values are extracted directly from the chart repository. Filter and search them in the interactive reference below or customize in Values Studio.
| --- | --- | --- |
| containerPorts.http | 80 | Actual Apache HTTP listener |
| phpmyadmin.host | "" | Single MySQL/MariaDB host |
| phpmyadmin.hosts | "" | Comma-separated multi-server hosts |
| phpmyadmin.ports | "" | Comma-separated multi-server ports |
| phpmyadmin.verboses | "" | Comma-separated server display names |
| phpmyadmin.arbitrary | false | Let users enter a host at login |
| phpmyadmin.authType | cookie | phpMyAdmin auth mode |
| phpmyadmin.uploadLimit | 64M | SQL import upload limit |
| phpmyadmin.absoluteUri | "" | External URL when behind a proxy |
| auth.existingSecret | "" | Existing auth Secret |
| externalSecrets.enabled | false | Render ExternalSecret resources |
| gatewayAPI.enabled | false | Render HTTPRoute |
| service.ipFamilyPolicy | "" | Service IP family policy |
| service.ipFamilies | [] | Service IP families |
| networkPolicy.enabled | false | Render NetworkPolicy |
| sessions.enabled | false | Mount /sessions |
| autoscaling.enabled | false | Render HPA |
| pdb.enabled | false | Render PDB |
| serviceAccount.automountServiceAccountToken | false | Mount SA token into pods |
Validation
Recommended checks before promotion:
helm lint charts/phpmyadmin
helm unittest charts/phpmyadmin
helm template phpmyadmin charts/phpmyadmin -f charts/phpmyadmin/examples/production.yaml
For cluster validation, install into K3D/K3S with a test MySQL/MariaDB target and check pods, logs, events, Service endpoints, Ingress or Gateway route, and ExternalSecret reconciliation when ESO is enabled.
Security Scan: phpmyadmin
| Framework | Score |
|---|---|
| MITRE + NSA + SOC2 | 75.757576% |
Security posture: acceptable.
References
System Architecture
DESIGN.md SyncedVerified architecture contract rendered dynamically from GitHub DESIGN.md
flowchart LR User[Administrator browser] --> Edge[Ingress or Gateway API] Edge --> Service[phpMyAdmin Service] Service --> Web[phpMyAdmin and Apache pod] Web --> Database[(MySQL or MariaDB servers)] Auth[Credential Secret or ExternalSecret] --> Web Config[Generated or custom configuration] --> Web Sessions[(Optional shared session PVC)] --> Web HPA[HorizontalPodAutoscaler] --> Web
phpMyAdmin Values Schema Reference
Official schema parameters, default values, and types extracted directly from the chart repository.
Global(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| global | object | - | Global settings shared by the chart. |
Name Override(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| nameOverride | string | - | Chart configuration parameter |
Fullname Override(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| fullnameOverride | string | - | Chart configuration parameter |
Common Labels(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| commonLabels | object | - | Chart configuration parameter |
Image(3)
| Parameter | Type | Default | Description |
|---|---|---|---|
| image.repository | string | - | Chart configuration parameter |
| image.tag | string | - | Chart configuration parameter |
| image.pullPolicy | string | - | Chart configuration parameter Allowed: AlwaysIfNotPresentNever |
Image Pull Secrets(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| imagePullSecrets | array | - | Chart configuration parameter |
Replica Count(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| replicaCount | integer | - | Chart configuration parameter |
Phpmyadmin(21)
| Parameter | Type | Default | Description |
|---|---|---|---|
| phpmyadmin.host | string | - | Chart configuration parameter |
| phpmyadmin.hosts | string | - | Chart configuration parameter |
| phpmyadmin.verboses | string | - | Chart configuration parameter |
| phpmyadmin.port | integer | - | Chart configuration parameter |
| phpmyadmin.ports | string | - | Chart configuration parameter |
| phpmyadmin.arbitrary | boolean | - | Chart configuration parameter |
| phpmyadmin.uploadLimit | string | - | Chart configuration parameter |
| phpmyadmin.absoluteUri | string | - | Chart configuration parameter |
| phpmyadmin.hidePhpVersion | boolean | - | Chart configuration parameter |
| phpmyadmin.configBase64 | string | - | Chart configuration parameter |
| phpmyadmin.authType | string | - | Chart configuration parameter Allowed: cookieconfighttpsignon |
| phpmyadmin.controlHost | string | - | Chart configuration parameter |
| phpmyadmin.controlPort | integer | - | Chart configuration parameter |
| phpmyadmin.controlUser | string | - | Chart configuration parameter |
| phpmyadmin.controlPassword | string | - | Chart configuration parameter |
| phpmyadmin.ssl.enabled | boolean | - | Chart configuration parameter |
| phpmyadmin.ssl.verify | boolean | - | Chart configuration parameter |
| phpmyadmin.ssl.caPath | string | - | Chart configuration parameter |
| phpmyadmin.ssl.certPath | string | - | Chart configuration parameter |
| phpmyadmin.ssl.keyPath | string | - | Chart configuration parameter |
| phpmyadmin.extraEnv | array | - | Chart configuration parameter |
Authentication(8)
| Parameter | Type | Default | Description |
|---|---|---|---|
| auth.username | string | - | Chart configuration parameter |
| auth.password | string | - | Chart configuration parameter |
| auth.blowfishSecret | string | - | Chart configuration parameter |
| auth.existingSecret | string | - | Chart configuration parameter |
| auth.existingSecretUsernameKey | string | - | Chart configuration parameter |
| auth.existingSecretPasswordKey | string | - | Chart configuration parameter |
| auth.existingSecretBlowfishKey | string | - | Chart configuration parameter |
| auth.existingSecretControlPasswordKey | string | - | Chart configuration parameter |
Configuration(2)
| Parameter | Type | Default | Description |
|---|---|---|---|
| config.customConfig | string | - | Chart configuration parameter |
| config.existingConfigMap | string | - | Chart configuration parameter |
Resources(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| resources | object | - | Chart configuration parameter |
Pod Security(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| podSecurityContext | object | - | Chart configuration parameter |
Container Security(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| securityContext | object | - | Chart configuration parameter |
Startup Probe(6)
| Parameter | Type | Default | Description |
|---|---|---|---|
| startupProbe.enabled | boolean | - | Chart configuration parameter |
| startupProbe.path | string | - | Chart configuration parameter |
| startupProbe.initialDelaySeconds | integer | - | Chart configuration parameter |
| startupProbe.periodSeconds | integer | - | Chart configuration parameter |
| startupProbe.timeoutSeconds | integer | - | Chart configuration parameter |
| startupProbe.failureThreshold | integer | - | Chart configuration parameter |
Liveness Probe(6)
| Parameter | Type | Default | Description |
|---|---|---|---|
| livenessProbe.enabled | boolean | - | Chart configuration parameter |
| livenessProbe.path | string | - | Chart configuration parameter |
| livenessProbe.initialDelaySeconds | integer | - | Chart configuration parameter |
| livenessProbe.periodSeconds | integer | - | Chart configuration parameter |
| livenessProbe.timeoutSeconds | integer | - | Chart configuration parameter |
| livenessProbe.failureThreshold | integer | - | Chart configuration parameter |
Readiness Probe(6)
| Parameter | Type | Default | Description |
|---|---|---|---|
| readinessProbe.enabled | boolean | - | Chart configuration parameter |
| readinessProbe.path | string | - | Chart configuration parameter |
| readinessProbe.initialDelaySeconds | integer | - | Chart configuration parameter |
| readinessProbe.periodSeconds | integer | - | Chart configuration parameter |
| readinessProbe.timeoutSeconds | integer | - | Chart configuration parameter |
| readinessProbe.failureThreshold | integer | - | Chart configuration parameter |
Service & Networking(5)
| Parameter | Type | Default | Description |
|---|---|---|---|
| service.type | string | - | Chart configuration parameter Allowed: ClusterIPNodePortLoadBalancer |
| service.port | integer | - | Chart configuration parameter |
| service.annotations | object | - | Chart configuration parameter |
| service.ipFamilyPolicy | string | - | Chart configuration parameter Allowed: SingleStackPreferDualStackRequireDualStack |
| service.ipFamilies | array | - | Chart configuration parameter |
Ingress(5)
| Parameter | Type | Default | Description |
|---|---|---|---|
| ingress.enabled | boolean | - | Chart configuration parameter |
| ingress.ingressClassName | string | - | Chart configuration parameter |
| ingress.annotations | object | - | Chart configuration parameter |
| ingress.hosts | array | - | Chart configuration parameter |
| ingress.tls | array | - | Chart configuration parameter |
Gateway API(6)
| Parameter | Type | Default | Description |
|---|---|---|---|
| gatewayAPI.enabled | boolean | - | Chart configuration parameter |
| gatewayAPI.apiVersion | string | - | Chart configuration parameter Allowed: gateway.networking.k8s.io/v1 |
| gatewayAPI.annotations | object | - | Chart configuration parameter |
| gatewayAPI.parentRefs | array | - | Chart configuration parameter |
| gatewayAPI.hostnames | array | - | Chart configuration parameter |
| gatewayAPI.matches | array | - | Chart configuration parameter |
Service Account(4)
| Parameter | Type | Default | Description |
|---|---|---|---|
| serviceAccount.create | boolean | - | Chart configuration parameter |
| serviceAccount.name | string | - | Chart configuration parameter |
| serviceAccount.annotations | object | - | Chart configuration parameter |
| serviceAccount.automountServiceAccountToken | boolean | - | Chart configuration parameter |
Autoscaling(5)
| Parameter | Type | Default | Description |
|---|---|---|---|
| autoscaling.enabled | boolean | - | Chart configuration parameter |
| autoscaling.minReplicas | integer | - | Chart configuration parameter |
| autoscaling.maxReplicas | integer | - | Chart configuration parameter |
| autoscaling.targetCPUUtilizationPercentage | integer | - | Chart configuration parameter |
| autoscaling.targetMemoryUtilizationPercentage | any | - | Chart configuration parameter |
Pdb(3)
| Parameter | Type | Default | Description |
|---|---|---|---|
| pdb.enabled | boolean | - | Chart configuration parameter |
| pdb.minAvailable | any | - | Chart configuration parameter |
| pdb.maxUnavailable | any | - | Chart configuration parameter |
Sessions(6)
| Parameter | Type | Default | Description |
|---|---|---|---|
| sessions.enabled | boolean | - | Chart configuration parameter |
| sessions.type | string | - | Chart configuration parameter Allowed: emptyDirpersistentVolumeClaim |
| sessions.existingClaim | string | - | Chart configuration parameter |
| sessions.storageClass | string | - | Chart configuration parameter |
| sessions.accessModes | array | - | Chart configuration parameter |
| sessions.size | string | - | Chart configuration parameter |
Themes(2)
| Parameter | Type | Default | Description |
|---|---|---|---|
| themes.enabled | boolean | - | Chart configuration parameter |
| themes.volume | object | - | Chart configuration parameter |
Network Policy(10)
| Parameter | Type | Default | Description |
|---|---|---|---|
| networkPolicy.enabled | boolean | - | Chart configuration parameter |
| networkPolicy.ingress.allowSameNamespace | boolean | - | Chart configuration parameter |
| networkPolicy.ingress.extraFrom | array | - | Chart configuration parameter |
| networkPolicy.egress.enabled | boolean | - | Chart configuration parameter |
| networkPolicy.egress.allowDNS | boolean | - | Chart configuration parameter |
| networkPolicy.egress.allowSameNamespaceDatabase | boolean | - | Chart configuration parameter |
| networkPolicy.egress.databasePort | integer | - | Chart configuration parameter |
| networkPolicy.egress.allowHTTPS | boolean | - | Chart configuration parameter |
| networkPolicy.egress.extraTo | array | - | Chart configuration parameter |
| networkPolicy.egress.extraEgress | array | - | Additional raw NetworkPolicy egress rules (HelmForge standard) |
External Secrets(16)
| Parameter | Type | Default | Description |
|---|---|---|---|
| externalSecrets.enabled | boolean | - | Chart configuration parameter |
| externalSecrets.apiVersion | string | - | Chart configuration parameter Allowed: external-secrets.io/v1 |
| externalSecrets.refreshInterval | string | - | Chart configuration parameter |
| externalSecrets.secretStoreRef.name | string | - | Chart configuration parameter |
| externalSecrets.secretStoreRef.kind | string | - | Chart configuration parameter Allowed: SecretStoreClusterSecretStore |
| externalSecrets.target.creationPolicy | string | - | Chart configuration parameter Allowed: OwnerMergeNoneOrphan |
| externalSecrets.auth.enabled | boolean | - | Chart configuration parameter |
| externalSecrets.auth.targetName | string | - | Chart configuration parameter |
| externalSecrets.auth.usernameRemoteRef.key | string | - | Chart configuration parameter |
| externalSecrets.auth.usernameRemoteRef.property | string | - | Chart configuration parameter |
| externalSecrets.auth.passwordRemoteRef.key | string | - | Chart configuration parameter |
| externalSecrets.auth.passwordRemoteRef.property | string | - | Chart configuration parameter |
| externalSecrets.auth.blowfishSecretRemoteRef.key | string | - | Chart configuration parameter |
| externalSecrets.auth.blowfishSecretRemoteRef.property | string | - | Chart configuration parameter |
| externalSecrets.auth.controlPasswordRemoteRef.key | string | - | Chart configuration parameter |
| externalSecrets.auth.controlPasswordRemoteRef.property | string | - | Chart configuration parameter |
Node Selector(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| nodeSelector | object | - | Chart configuration parameter |
Tolerations(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| tolerations | array | - | Chart configuration parameter |
Affinity(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| affinity | object | - | Chart configuration parameter |
Topology Spread Constraints(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| topologySpreadConstraints | array | - | Chart configuration parameter |
Priority Class Name(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| priorityClassName | string | - | Chart configuration parameter |
Termination Grace Period Seconds(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| terminationGracePeriodSeconds | integer | - | Chart configuration parameter |
Pod Labels(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| podLabels | object | - | Chart configuration parameter |
Pod Annotations(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| podAnnotations | object | - | Chart configuration parameter |
Extra Volume Mounts(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| extraVolumeMounts | array | - | Chart configuration parameter |
Extra Volumes(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| extraVolumes | array | - | Chart configuration parameter |
Extra Manifests(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| extraManifests | array | - | Chart configuration parameter |
Container Ports(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| containerPorts.http | integer | - | Chart configuration parameter |
No schema parameters match your search
Try searching for a different keyword or reset the filter.