Product docs and API reference are now on Akamai TechDocs.
Search product docs.
Search for “” in product docs.
Search API reference.
Search for “” in API reference.
Search Results
 results matching 
 results
No Results
Filters
Use App Platform to Deploy WordPress with Persistent Volumes on LKE
Traducciones al EspañolEstamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.
This guide includes steps for deploying a WordPress site and MySQL database using App Platform for Linode Kubernetes Engine (LKE). In this architecture, both WordPress and MySQL use PersistentVolumes (PV) and PersistentVolumeClaims (PVC) to store data.
Akamai App Platform for LKE uses the Add Helm Chart feature to add the WordPress and MySQL Helm charts to the App Platform Catalog.
Prerequisites
A Cloud Manager account is required to use Akamai’s cloud computing services, including LKE.
Enrollment into the Akamai App Platform’s beta program.
An provisioned and configured LKE cluster with App Platform enabled and auto-scaling turned on. A Kubernetes cluster consisting of 3 Dedicated CPU Compute Instances is sufficient for the deployment in this guide to run, but additional resources may be required during the configuration of your App Platform architecture.
To ensure sufficient resources are available, it is recommended that node pool auto-scaling for your LKE cluster is enabled after deployment. Make sure to set the max number of nodes higher than your minimum. This may result in higher billing costs.
To learn more about provisioning a LKE cluster with App Platform, see our Getting Started with App Platform for LKE guide.
Components
Infrastructure
Linode Kubernetes Engine (LKE): LKE is Akamai’s managed Kubernetes service, enabling you to deploy containerized applications without needing to build out and maintain your own Kubernetes cluster.
App Platform for LKE: A Kubernetes-based platform that combines developer and operations-centric tools, automation, self-service, and management of containerized application workloads. App Platform for LKE streamlines the application lifecycle from development to delivery and connects numerous CNCF (Cloud Native Computing Foundation) technologies in a single environment, allowing you to construct a bespoke Kubernetes architecture.
Software
MySQL: An open source database management system that uses a relational database and SQL (Structured Query Language) to manage its data.
WordPress: The WordPress application is an industry standard, open source CMS (content management system) often used for creating and publishing websites.
Ingress NGINX Controller: When creating a Service in App Platform, an
ingress
is created using NGINX’s Ingress Controller to allow public access to internal services.
Set Up Infrastructure
Once your LKE cluster is provisioned and the App Platform web UI is available, complete the following steps to continue setting up your infrastructure.
Sign into the App Platform web UI using the platform-admin
account, or another account that uses the platform-admin
role. Instructions for signing into App Platform for the first time can be found in our Getting Started with Akamai App Platform guide.
Create a New Team
Teams are isolated tenants on the platform to support Development/DevOps teams, projects or even DTAP. A Team gets access to the Console, including access to self-service features and all shared apps available on the platform.
When working in the context of an admin-level Team, users can create and access resources in any namespace. When working in the context of a non-admin Team, users can only create and access resources used in that Team’s namespace.
Select view > platform.
Select Teams in the left menu.
Click Create Team.
Provide a Name for the Team. Keep all other default values, and click Submit. This guide uses the Team name
demo
.
Add the WordPress Helm Chart to the Catalog
Helm charts provide information for defining, installing, and managing resources on a Kubernetes cluster. Custom Helm charts can be added to App Platform Catalog using the Add Helm Chart feature.
To install WordPress on your cluster, add the WordPress Helm chart using the Git Repository URL.
While still using the
admin
team view, click on Catalog in the left menu.Select Add Helm Chart.
Under Git Repository URL, add the URL to the
wordpress
Helm chart .yaml file:https://github.com/bitnami/charts/blob/wordpress/24.1.18/bitnami/wordpress/Chart.yaml
Click Get Details to populate the
wordpress
Helm chart details.Deselect Allow teams to use this chart. This allows teams other than
admin
to use the Helm chart.Click Add Chart.
Add the MySQL Helm Chart to the Catalog
Repeat the same steps for installing the MySQL service on your cluster.
Click on Catalog in the left menu.
Select Add Helm Chart.
Under Git Repository URL, add the URL to the
mysql
Helm chart .yaml file:https://github.com/bitnami/charts/blob/mysql/12.3.1/bitnami/wordpress/Chart.yaml
Click Get Details to populate the
mysql
Helm chart details. You may need to change the Target Directory Name field to read “MySQL”. This is used to differentiate Helm charts within the Catalog.Deselect Allow teams to use this chart.
Click Add Chart.
Deploy a MySQL Database and WordPress Site
Separate Workloads are created for MySQL and WordPress in order to deploy a database and site, respectively. Both Workloads require passwords, so to prevent the passwords from being stored unencrypted, Sealed Secrets are created for each first.
Sealed Secrets are encrypted Kubernetes Secrets stored in the Values Git repository. When a Sealed Secret is created in the Console, the Kubernetes Secret will appear in the Team’s namespace.
Create a Sealed Secret to Store MySQL Passwords
Select view > team and team > demo in the top bar.
Select Sealed Secrets from the menu.
Click Create SealedSecret.
Add a name for your Sealed Secret, where this name is also used when creating the MySQL Workload. This guide uses the name
mysql-credentials
.Select type kubernetes.io/opaque from the type dropdown menu.
Add the following Key and Value pairs, replacing
YOUR_PASSWORD
andYOUR_ROOT_PASSWORD
with your own secure passwords:- Key=
mysql-password
, Value=YOUR_PASSWORD
- Key=
mysql-root-password
, Value=YOUR_ROOT_PASSWORD
- Key=
Click Submit. The Sealed Secret may take a few minutes to become ready.
Create a Sealed Secret to Store WordPress Credentials
Select view > team and team > demo in the top bar.
Select Sealed Secrets from the menu.
Click Create SealedSecret.
Add a name for your Sealed Secret, where this name is also used when creating the WordPress Workload. This guide uses the name
wordpress-credentials
.Select type kubernetes.io/opaque from the type dropdown menu.
Add the following Key and Value pairs.
Replace
YOUR_MYSQL_PASSWORD
with the same password you used for yourmysql-password
when creating themysql-credentials
Sealed Secret above. ReplaceYOUR_PASSWORD
with your own secure password:- Key=
mariadb-password
, Value=YOUR_MYSQL_PASSWORD
- Key=
wordpress-password
, Value=YOUR_PASSWORD
- Key=
Click Submit. The Sealed Secret may take a few minutes to become ready.
Create the MySQL Workload
Select view > team and team > demo in the top bar.
Select Workloads.
Click on Create Workload.
Select the MySQL Helm chart from the Catalog.
Click on Values.
Provide a name for the Workload. This guide uses the Workload name
wordpress-mysql
.Set the following chart values:
auth: database: "wordpress" username: "wordpress" existingSecret: "mysql-credentials" # Change when using a different name networkPolicy: enabled: false
Managing Network Policies ThenetworkPolicy
is disabled since all traffic is allowed by default. Rather than configuringnetworkPolicy
values directly in the Workload config, this guide centrally manages all network policies using App Platform’s Network Policies function.Click Submit. The Workload may take a few minutes to become ready.
Create the WordPress Workload
Select view > team and team > demo in the top bar.
Select Workloads.
Click on Create Workload.
Select the WordPress Helm chart from the Catalog.
Click on Values.
Provide a name for the Workload. This guide uses the Workload name
wordpress
.Set the following chart values. Replace YOUR_USERNAME with the username you wish to use for logging into WordPress:
mariadb: enabled: false externalDatabase: host: wordpress-mysql.team-labs.svc.cluster.local user: wordpress database: wordpress existingSecret: "wordpress-credentials" service: type: ClusterIP networkPolicy: enabled: false existingSecret: "wordpress-credentials" wordpressUsername: "YOUR_USERNAME"
Click Submit. The Workload may take a few minutes to become ready.
Create Network Policies
Create a Network Policy allowing only the WordPress Pod to connect to the MySQL database.
Select view > team and team > demo in the top bar.
Select Network Policies from the menu.
Click Create Netpol.
Add a name for the Network Policy. This guide uses the name
wordpress-mysql
.Select Rule type
ingress
using the following values, wherekfp
is the name of the Workload created in the next step:Selector label name:
app.kubernetes.io/instance
Selector label value:
kfp
Select AllowOnly, and enter the following values:
Namespace name: __
Selector label name:
app.kubernetes.io/instance
Selector label value:
wordpress
Click Submit.
Check the Pod Status
Using the App Platform Shell feature, you can check to see if the WordPress Pod has started and connected to the MySQL database.
Select view > team and team > demo in the top bar.
In the left menu, select Shell.
Once the Shell session has loaded, enter the following command to launch the k9s interface. k9s is an open source, terminal-based Kubernetes user interface pre-installed with Akamai App Platform:
k9s
A
CrashLoopBackOff
status signifies that WordPress has not successfully connected to the database.In order to force a restart, click on the WordPress Pod, and type Ctrl + D. This kills the current Pod and starts a new one.
Create a Service to Expose the WordPress Site
Creating a Service in App Platform configures NGINX’s Ingress Controller. This allows you to enable public access to services running internally on your cluster.
Select view > team and team > demo in the top bar.
Click Services, and select Create Service.
In the Name dropdown menu, select the
wordpress
service.Under Exposure (ingress), select External.
Click Submit.
Once the Service is ready, click the URL of the
wordpress
service to navigate to the live WordPress site:
Setting Up DNS
When creating a Service, DNS for your site can be configure using a CNAME rather than using an external IP address. To do this, configure a CNAME entry with your domain name provider, and follow the steps in our Using a CNAME App Platform documentation.
See our guide on CNAME records for more information on how CNAME records work.
Access the WordPress UI
While viewing the WordPress site in your browser, add
/wp-admin
to the end of the URL, where MY_WORDPRESS_URL is your site URL:http://MY_WORDPRESS_URL/wp-admin
This should bring you to the WordPress admin panel login screen:
To access the WordPress UI, sign in with your WordPress username and password.
Your username is the value used for
wordpressUsername
when creating the WordPress Workload. Your password is the value used forwordpress-password
when making yourwordpress-credentials
Sealed Secret:
Going Further
Once you’ve accessed the WordPress UI, you can begin modifying your site using WordPress templates, themes, and plugins. For more information, see WordPress’s resources below:
WordPress Support: Learn the basic workflows for using WordPress.
Securing WordPress: Advice on securing WordPress through HTTPS, using a secure password, changing the admin username, and more.
WordPress Themes: A collection of thousands of available WordPress themes.
More Information
You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.
This page was originally published on