Joget DX Available for Download
Check out Joget DX, the next generation successor to Joget Workflow for faster, simpler digital transformation.
Kubernetes is the leading open source container orchestration platform. Originally created by Google based on their need to support massive scale, Kubernetes is now under the purview of Cloud Native Computing Foundation (CNCF), a vendor-neutral foundation managing popular open source projects.
There are several basic and essential concepts that need to be understood:
A Kubernetes cluster consists of one or more nodes. Nodes are machines (VMs, physical servers, etc) that run the applications.
A Pod is the smallest Kubernetes object that contains one or more containers, storage resources, network IP and other configuration.
A Service defines a set of Pods and how they are accessed.
A Volume is a shared storage for containers, and many different types are supported.
These Kubernetes objects are defined in YAML format in .yaml files
Simplified view of Kubernetes objects
There are many more concepts in Kubernetes, but the basic ones above should suffice to get started with Kubernetes.
There are many Kubernetes solutions available for different requirements from different providers, ranging from community tools for local testing, to production environments from cloud providers and enterprise vendors.For the purpose of this tutorial we’ll use Minikube, a tool that runs a single-node Kubernetes cluster in a virtual machine for local development and testing. We’ll be using a Mac running macOS, but you can adapt the instructions for your OS.
The first step is to install a VM platform. We’ll use the open source VirtualBox as the VM platform. Follow the download and installation instructions at https://www.virtualbox.org/wiki/Downloads
The next step is to install the Kubernetes command-line tool, kubectl, which allows you to run commands against Kubernetes clusters e.g. deploy applications, inspect resources, view logs, etc.1. Download and set executable:
2. Move the binary to your PATH:
3. Test to ensure the version you installed is up-to-date:
Full instructions are at https://kubernetes.io/docs/tasks/tools/install-kubectl/
Now let’s install Minikube, a tool that runs a single-node Kubernetes cluster in a virtual machine on your laptop.1. Download and set executable:
2. Move the binary to your PATH:
Full instructions are available at https://kubernetes.io/docs/tasks/tools/install-minikube/
1. Start Minikube and create a cluster:
The output will be similar to this:
1. Run a sample HTTP application
2. Expose the service so that external connections can be made
3. Inspect the pod
4. Once the STATUS is Running, test the service using curl
5. Delete the service and deployment
Full instructions are available at https://kubernetes.io/docs/setup/minikube/#quickstart
2. Deploy the MySQL image
3. Inspect the deployment
4. Run MySQL client to test
Full instructions are available at https://kubernetes.io/docs/tasks/run-application/run-single-instance-stateful-application/
Once the MySQL database is running, let’s run a Docker image for Joget Enterprise that connects to that MySQL service.
1. Deploy joget image using an example YAML file. Download the contents of joget-dx-deployment.yaml into a file with the same name and run kubectl.
2. Inspect the deployment
3. Once the STATUS is Running, get the URL for the service
4. Access the URL in a browser with an additional /jw in the path to access the Joget App Center e.g. http://192.168.99.100:32496/jw
You now have a running installation of Joget, and you’ll be able to visually build a full app in 30 minutes without coding.
Now we can demonstrate how Kubernetes can be used to manually increase and decrease the number of Pods running.1. Scale the deployment to 2 pods (called replicas)
2. Examine the running pods, and you should see 2 pods running Joget
3. Scale the deployment down to 1 pod
4. Examine the running pods, and you should now see 1 pod running Joget.