Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction to Kubernetes

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.

...

  1. A Kubernetes cluster consists of one or more nodes. Nodes are machines (VMs, physical servers, etc) that run the applications.

  2. Pod is the smallest Kubernetes object that contains one or more containers, storage resources, network IP and other configuration.

  3. Service defines a set of Pods and how they are accessed.

  4. Volume is a shared storage for containers, and many different types are supported.

  5. These Kubernetes objects are defined in YAML format in .yaml files

  6. A command line interface tool, kubectl, is used to manage these objects via the Kubernetes API.

 


Simplified view of Kubernetes objects

Simplified view of Kubernetes objects 


There are many more concepts in Kubernetes, but the basic ones above should suffice to get started with Kubernetes.

...

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.

Install VirtualBox

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

Install kubectl

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.

...

Full instructions are at https://kubernetes.io/docs/tasks/tools/install-kubectl/

Install Minikube

Now let’s install Minikube, a tool that runs a single-node Kubernetes cluster in a virtual machine on your laptop.

...

Full instructions are available at https://kubernetes.io/docs/tasks/tools/install-minikube/

Start Minikube

1. Start Minikube and create a cluster: 

...

Code Block
minikube v1.1.0 on darwin (amd64)
Downloading Minikube ISO ...
131.28 MB / 131.28 MB [============================================] 100.00% 0s
Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
Configuring environment for Kubernetes v1.14.2 on Docker 18.09.6
Downloading kubeadm v1.14.2
Downloading kubelet v1.14.2
Pulling images ...
Launching Kubernetes ...
Verifying: apiserver proxy etcd scheduler controller dns
Done! kubectl is now configured to use "minikube"


Test Minikube Installation

1. Run a sample HTTP application

...

Full instructions are available at https://kubernetes.io/docs/setup/minikube/#quickstart

Deploy MySQL on Kubernetes

To deploy a MySQL database image, we’ll use an example YAML file provided in the kubernetes website k8s.io.

...

Full instructions are available at https://kubernetes.io/docs/tasks/run-application/run-single-instance-stateful-application/

Deploy Joget on Kubernetes

Once the MySQL database is running, let’s run a Docker image for Joget Workflow EnterpriseJoget Enterprise that connects to that MySQL service.

...

You now have a running installation of Joget Workflow, and you’ll be able to visually build a full app in 30 minutes without coding.

Scale Joget Deployment

Now we can demonstrate how Kubernetes can be used to manually increase and decrease the number of Pods running.

...

Code Block
kubectl get pods

 

...