If no namespace is chosen, your application will be deployed in your cluster’s default
namespace. Deploying in the default
namespace is not a good practice and it is highly recommended to split your deployments, services, and applications in separate namespaces, thus allowing a more secure configuration of your cluster.
Deploying WordPress on a Scaleway Kubernetes cluster with the Application Library
- kubernetes
- wordpress
- docker
WordPress is a well-known CMS (Content Management System) allowing you to create evolving websites.
This tutorial teaches you how to install WordPress on a Scaleway Kubernetes Kapsule or Kosmos cluster by using the Application Library in the Easy-Deploy feature.
You can perform most of these steps directly from the Scaleway console.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- A Scaleway Kubernetes Kapsule or Kosmos cluster
- Installed kubectl on your local computer
Creating a Kubernetes Kapsule cluster and deploying WordPress
-
Go to the Kubernetes dashboard in the Scaleway console.
-
Select the cluster you want to deploy WordPress to.
-
Select the Easy Deploy tab.
The Application Library allows you to deploy a WordPress CMS application. You can use the search bar to locate the application.
-
Click Deploy an application.
-
Select Application Library as the application type.
-
Search for the application you want to deploy using the search bar.
The default configuration for the application is set automatically in a YAML format when you select it. You can edit the configuration to fit to your application deployment within the YAML editor displayed.
-
Enter a name for your application and the Kubernetes namespace you want to deploy it to.
Important -
Once configured, click Deploy an application to deploy your application on your Kubernetes cluster.
You are then redirected to the listing page of our deployed applications.
-
Check that the deployment is successful by running the command
kubectl get all -n cms-ns
in your terminal.You can see that your WordPress application is running, and has even created a MariaDB database within your cluster to store our data on Scaleway Block Storage. You also have access to the Load Balancer that was created to access your WordPress using the external IP displayed.
-
Access your WordPress application by entering the external IP provided in a web browser. The WordPress website displays in your browser.
Note- When updating the configuration of your application, you may run into some errors returned by the API. Read these errors carefully, as they contain the instructions you need to solve them.
- When you update your WordPress application setup, you will run into an error that asks you to use the correct password to update the application.
This behavior is a security measure as the Application Library automatically creates the missing credentials that are not set at the deployment of the application and stores them into secrets within your Kubernetes cluster.
To retrieve these secrets, you might need to run command lines such as the following:
kubectl get secret --namespace "cms-ns" wordpress-mariadb -o jsonpath="{.data.mariadb-password}" | base64 --decode
All required instructions are given in the error message. - When updating the configuration of your application, you may run into some errors returned by the API. Read these errors carefully, as they contain the instructions you need to solve them.