wordpress-k8s

WordPress

  • Canonical IS DevOps
Channel Revision Published Runs on
latest/stable 127 11 Mar 2025
Ubuntu 22.04 Ubuntu 20.04
latest/stable 13 06 Mar 2023
Ubuntu 22.04 Ubuntu 20.04
latest/edge 139 03 Apr 2025
Ubuntu 22.04 Ubuntu 20.04
latest/edge 15 30 Mar 2023
Ubuntu 22.04 Ubuntu 20.04
juju deploy wordpress-k8s
Show information

Platform:

Relation endpoints

database

Interface: mysql_client
Supported charms: Charmed MySQL, Charmed MySQL-K8s

The database endpoint can be integrated with MySQL based charms, providing long term storage for WordPress. The database relation connects wordpress-k8s with charms that support the mysql_client interface on port 3306 in the database side.

Example database integrate command:

juju integrate wordpress-k8s:database mysql-k8s:database

grafana-dashboard

Interface: grafana-dashboard
Supported charms: grafana-k8s

Grafana-dashboard is a part of the COS relation to enhance observability. The relation enables quick dashboard access already tailored to fit the needs of operators to monitor the charm. The template for the Grafana dashboard for the wordpress-k8s charm can be found at /src/grafana_dashboards/wordpress.json. In the Grafana UI, it can be found as “WordPress Operator Overview” under the General section of the dashboard browser (/dashboards). Modifications to the dashboard can be made but will not be persisted upon restart or redeployment of the charm.

The wordpress-k8s charm satisfies the grafana_dashboard interface by providing the pre-made dashboard template to the Grafana relation data bag under the “dashboards” key. Requires Prometheus datasource to be already integrated with Grafana.

Grafana-Prometheus integrate command:

juju integrate grafana-k8s:grafana-source prometheus-k8s:grafana-source

Grafana-dashboard integrate command:

juju integrate wordpress-k8s grafana-dashboard

ingress

Interface: ingress
Supported charms: nginx-ingress-integrator

Ingress manages external http/https access to services in a Kubernetes cluster. The ingress relation through nginx-ingress-integrator charm enables additional blog_hostname and use_nginx_ingress_modesec configurations that provide capabilities such as ModSecurity enabled Web Application Firewall (WAF).

Note that the Kubernetes cluster must already have an nginx ingress controller deployed. Documentation to enable ingress in MicroK8s can be found here.

Example ingress integrate command:

juju integrate wordpress-k8s nginx-ingress-integrator

logging

Interface: loki_push_api
Supported charms: loki-k8s

The logging relation is a part of the COS relation to enhance logging observability. Logging relation through the loki_push_api interface installs and runs promtail which ships the contents of local logs found at /var/log/apache2/access.log and /var/log/apache2/error.log to Loki. This can then be queried through the Loki API or easily visualized through Grafana. Learn more about COS here.

Logging-endpoint integrate command:

juju integrate wordpress-k8s loki-k8s

metrics-endpoint

Interface: prometheus_scrape
Supported charms: prometheus-k8s

The metrics-endpoint relation allows scraping the /metrics endpoint provided by apache-exporter sidecar on port 9117, which provides apache metrics from apache’s /server-status route. This internal apache’s /server-status route is not exposed and can only be accessed from within the same Kubernetes pod. The metrics are exposed in the open metrics format and will only be scraped by Prometheus once the relation becomes active. For more information about the metrics exposed, please refer to the apache-exporter documentation.

Metrics-endpoint integrate command:

juju integrate wordpress-k8s prometheus-k8s