Magento 2 on Kubernetes - how do I do that?

Magento 2 on Kubernetes - how do I do that?

In this article, we’ll take a closer look at what it takes to run Magento 2 on Kubernetes. Let’s dive in!

This article assumes you have the fundamental knowledge of operating Magento 2, containers (Docker), and basic concepts of Kubernetes.

[…]

Once the cluster and the tools are in place, we can start deploying Magento. You'll find all necessary files in our Magento 2 on Kubernetes GitHub repository.

[…]

But first, we need to go through some of the aspects one needs to consider when running any PHP web application on Kubernetes, to shed light on some architectural choices done in this article.

There are different patterns for deploying a PHP web application on Kubernetes – from single-process, single-container through multi-process containers to multiple single-process ones.

[…]

As discussed above, we’ll use a Docker image based on php:7.2-fpm and a plain NGINX:mainline image.

When deploying Kubernetes applications, it’s usually best to configure each program by setting environment variables on its container.

[…]

One more issue to consider when deploying Magento 2 on Kubernetes is to make sure all relevant logs survive container restarts and are easily accessible.

[…]

Another Kubernetes Object type we’ll make use of in this project is a Job.

[…]

At this point, all that we’re missing to have a working Magento 2 instance on Kubernetes is a way to access the frontend.

[…]

Assuming that NGINX Ingress Controller already installed, all we need to do here is to create an Ingress definition that will proxy all traffic to the magento-web Service on HTTP port.

[…]

Tip: Similarly, Elastic Cloud on Kubernetes Operator can be used to deploy another Elasticsearch cluster along with Kibana to manage logs.

[…]