Unofficial Content

Note: There is right now a better way: read HowTo: Deploy an Application to a Kubernetes cluster.

Kubernetes is the most popular container orchestrator at the moment, and with the possibility of containerizing your GeneXus apps right from the GeneXus IDE, orchestrating your GeneXus apps with Kubernetes is easier than ever.

Kubernetes allows you to scale the modules of your application in a way that better suits your needs. Let's say you've adopted a Microservices Architecture approach for your app. In that scenario, you'll typically have a module (microservice) for every use case or activity your application will manage. Keep in mind this is not a recipe, and every implementation of microservices looks different as they try to solve different problems. In some scenario, you might want to have a microservice that manage all the CRUD operations of your products, while in other you could even have different microservices for the different CRUD operations.

But once you have all your modules (or microservices), you'll need to find a way to send them to production, to define how they will communicate with each other, how many instances of each you'll need, and how to manage your different versions.

That's where Kubernetes comes into play, but how do you do it?

First, you need to deploy your application to a Docker Image. Take a look at HowTo: Deploy an Application to Docker for more info.

Then you can test your Kubernetes strategy in your own development box if you installed Docker for Windows and enabled Kubernetes.

EnableKubernetes

Create a yaml file where you'll describe your desired state.

Here's what a very simple yaml file looks like:

KubernetesYaml

You can modify the yaml file to change the version of the running apps or the number of replicas running. After that just apply your changes and Kubernetes will manage the changes.

Get to know the Kubernetes CLI, kubectl is your friend.

There's a demo repo that you can clone and play with Kubernetes and GeneXus app if you're not familiar with it. Kubernetes demo at the 28th GeneXus International Meeting

See also

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant