RTP Kubernetes meetup features two interesting topics: how to deploy blockchain on Kubernetes and how to manage issues in Kubernetes.
Deploy a scalable WordPress implementation on Kubernetes
Deploy a scalable WordPress implementation on a Kubernetes cluster
– – – Last updated – | By Animesh Singh, Tommy Li
WordPress is the world’s most popular website management and blogging system, supporting more than 60 million websites. At its core, WordPress is built on one of the most common web programming languages, PHP, and uses MySQL as its back-end database. Kubernetes, the open-source container management system, is one of the top 10 GitHub projects based on number of unique developers contributing code. The challenge for developers is how to bring these two giant open source projects together to provide maximum benefits.
You as a developer are looking to create best-of-class applications, and to do that you need to use the leading tools and platforms. This journey shows you how to harness the full power of Kubernetes clusters and demonstrates how easy it is to deploy the world’s most popular website framework on top of world’s most popular container orchestration platform.
You’ll find step-by-step instructions, including a full roadmap for hosting WordPress on a Kubernetes Cluster from IBM Bluemix Container Service. Each component runs in a separate container or group of containers.
WordPress represents a typical multi-tier app and each component will have its own containers. The WordPress containers are the front-end tier and the MySQL container is the database/back-end tier for WordPress. The WordPress front-end tier can use MySQL as a service from Bluemix.
- The user interacts with WordPress via the web interface.Each WordPress container will respond to its users via HTTP/HTTPS.
- When a user posts to any WordPress container, WordPress will typically post the changes to the MySQL database. The MySQL database stores the post data into persistent disks to maintain security. In addition to a MySQL container, you can also use the Compose MySQL service from Bluemix. After authentication and authorization are complete, WordPress user information such as password (encrypted with MD5) and email address are created and stored in MySQL. Website, blogs, tags, categories, and other data are also stored in MySQL.
- The user can also upload themes, plugins, images, and documents. Non-textual data such as PDFs,videos, and MP3s, can also be uploaded.
- Themes, plugins, PDFs, videos, MP3s, etc. are stored in a persistent volume attached to the WordPress pods.
- The user accesses the WordPress website or blog. The WordPress core (that is, the WordPress “brain”) calls the required PHP scripts, starting with index.php.
- WordPress reaches out to the MySQL database to retrieve the website, blogs, tags, categories, and so on.
- TheWordPress core then retrieves the themes, documents, images, etc. from the persistent volume, combines it with data retrieved from the database, and presents the page to the user.