Skip to Content
Technical Articles
Author's profile photo Kevin Riedelsheimer

Kevin’s Path to Kubernetes World: Let’s install Kyma

 

Kyma is a great Open-Source project found on kyma-project.io.

 

Kyma

/kee-ma/

is a platform for extending applications with serverless functions and microservices. It provides a selection of cloud-native projects glued together to simplify the creation and management of extensions.

– https://kyma-project.io

 

This means to us as business application developers, sys-admins, support, … we can leverage the Kyma Runtime as a great way to connect application extensions into our existing architecture. The great thing is that it allows us, if applicable, to extend legacy systems with serverless functions and microservices.

Kyma%20Architecture

Kyma Architecture – https://kyma-project.io/assets/docs/1.13/kyma/docs/assets/ac-s-sc.svg

Naturally I wanted to try this piece of technology out as I am in discovery mode anyway and trying all sorts of things in the K8S context.

Kyma installation on macOS

First of all, to all the Windows and Linux users, I am really sorry but this guide is just for macOS users because this is what I am using as development machine. But you can find great installation guides on the Installation webpage or on Youtube.

With that let us talk hardware! In order to run the Kyma installment properly you should check the hardware requirements first https://kyma-project.io/docs/#installation-installation .

By default, the local Kyma Lite installation on Minikube requires 4 CPU and 8GB of RAM. If you want to add more components to your installation, install Kyma on a cluster.

– https://kyma-project.io/docs/#installation-installation

My MacBook is has the following specs:

Apple MacBook Pro 13-inch
macOS Catalina V 10.15.5
Processor: 2.3 GHz Quad-Core Intel Core i7
Memory: 32 GB 3733 MHz LPDDR4

Install the required prerequisites

In order to run Kyma locally inside of an Kubernetes cluster you have to make sure that all needed components have the correct version installed. My first couple of tries I got a lot of weird error messages which I couldn’t make sense off because of wrong versioning. Kyma is really particular about what version of Minikube, Kubernetes-CLI and (maybe not sure about this) the Helm version it wants.

If we follow the Installation Guide, the following versions are noted for Kyma V1.14 (latest):

  • Minikube 1.6.2
  • Kubernetes-CLI 1.16.3

In addition we need to install docker and the Kyma CLI. For docker there is no version specified, for the Kyma CLI we want to make sure that, if you’re using Homebrew, its installing the correct version 1.14. On Mac you need to install the Hyperkit driver as well for the virtualization where your Minikube K8S cluster will run on.

NOTE: The following instructions are from my personal experience on my MacBook Pro. For the Windows or Linux installation you have to follow the above mentioned Kyma installation guide.’

So let’s get started:

One way to install a specific Formula version with Homebrew is to lookup the commit id of the version release commit.

The best would be for you to go to the official homebrew-core Github page and clone yourself that nice repository.

The reason for this is, you want to look in the commit history for the version you require and GitHub.com doesn’t support displaying a big commit history.

In the github.com web interface you want to search for the Formula you require in that repository.

Kyma%20homebrew%20formula%20git

The result will lead you to the ruby file which represents the wished Formula. There you can hit the history button and probably get a message which will tell you to execute the following command to get the full history:

git log 3bbe4aaef060cabffb82550aea2b78fd28767a8e -- Formula/minikube.rb

This you just gotta execute in the homebrew-core git repository locally and you can browse the commit history.

With that lets install the needed components to run Kyma locally on Minikube using the Hyperkit driver.

Install the Minikube version 1.6.2. No worries if you have a more current version installed you can install the old version right next to it and switch to whatever version you need.

# List all package versions
brew list --versions

# List all versions of one Formula
brew list <formula> --versions

# Switch between versions
brew switch <formula><version>

NOTE: When you execute the install command it could be that it overrides your current installment.

Install Minikube 1.6.2

We’re going to use the commit id pointing to the 1.6.2 release. Execute the following command in your Terminal:

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/21a0efbd754779d29a078df5e74e0d90f06ed993/Formula/minikube.rb -f

You can try the command without the force parameter (-f) but for me it didn’t work really.

Verify your installation:

minikube version

# Output:
# minikube version: v1.6.2
# commit: 54f28ac5d3a815d1196cd5d57d707439ee4bb392

The output should show you the version 1.6.2. Sometimes it happens that it auto-updates during the installation. In that case do the following and try again:

brew unlink minikube

This will unlink the package and you can install the other version with the above mentioned command. Please verify afterwards that the correct version is installed.

Use the commands I’ve listed to get a better overview.

Install the kubernetes-cli

To interact with the clusters API we’re using kubernetes-cli. Again, it might be that you have a newer version installed as the required version is deprecated but don’t worry you know what to do.

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/62afc1f862a762a037bf30150c31479630469517/Formula/kubernetes-cli.rb -f

Check the kubernetes-cli version of the installation:

kubectl version

# Output
# Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.3", 
# GitCommit:"b3cbbae08ec52a7fc73d334838e18d17e8512749", GitTreeState:"clean", BuildDate:"2020-07-10T17:17:31Z", GoVersion:"go1.12.17", Compiler:"gc", Platform:"darwin/amd64"}

NOTE: The Go version used here is 1.12.17. I might not be a 100% correct but if you don’t have that version installed you will run into problems later on.

To execute the Kyma commands for interaction with the Kyma API we need to install the Kyma-CLI. In my case I am going to use the newest Kyma version (on the date this blog got published) 1.14.0, so the newest Kyma-CLI is what we want.

I’ve tried to execute

brew install kyma-cli

what resulted in the installment of the latest version of 1.12 which is not the version we want. Make sure you have the correct version installed.

kyma version

# Output
# Kyma CLI version: 1.14.0

If the correct version is not installed go ahead and uninstall the currently installed version:

brew uninstall kyma-cli

And then install directly from URL:

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/0562d3564122af01e298215640e3f3a38a1c7d36/Formula/kyma-cli.rb -f

Kyma is using Helm as the Kubernetes package manager of choice so we can install it next:

brew install helm

Don’t forget to check the version again, we can use version 3.

Lastly, install hyperkit via Homebrew:

brew install hyperkit

With that we have everything installed to get started with our Kyma installation on Minikube.

Install Kyma locally

With the correct versions installed nothing can go wrong, I hope… Actually it was quite painful to get an instance up and running until I switched MacBooks to a Mac which didn’t have any development software installed at all.

Let’s hope it just works like a charm for you.

What we basically do is, we provision a Kyma K8S configuration to Minikube via the kyma-cli.

kyma provision minikube —vm-driver=hyperkit

# This might take while...

# Output
# - Requirements verified
# - Preparing Minikube using vm-driver 'hyperkit'
# - Minikube status verified
# - Minikube config initialized
# - Minikube up and running
# - Adjustments finished
# - ConfigMap created

# Minikube cluster installed
# host: Running
# kubelet: Running
# apiserver: Running
# kubeconfig: Configured

# Happy Minikube-ing! :)

This might take a while but when it succeeds, you will see this very friendly message.

NOTE: You could configure the standard vm driver in the Minikube configuration but for now we explicitly set it here.

Sometimes the startup fails and it prints you the command which failed. First verify if the cluster creation was successful anyway. I have the suspicion that you sometimes get error messages in the CLI even if the step actually worked. So just execute:

minikube status

# host: Running
# kubelet: Running
# apiserver: Running
# kubeconfig: Configured

Which should mean we’re up and running with the cluster using the Kyma provided configuration.

Install the Kyma environment on your cluster:

kyma install

# Output
# host: Running
# kubelet: Running
# apiserver: Running
# kubeconfig: Configured
# smokey@MacBook-Pro Git % kyma install
# - Cluster info read
# - Configurations validated
# - Installing Kyma in version '1.14.0' 
# - Installation source checked
# - Tiller deployed
# - Installation files loaded
# - Kyma Installer deployed
# - Helm configured
# - Kyma Installer is installing Kyma
# - Waiting for installation to start
# - install component cluster-essentials
# - install component testing
# - install component istio
# - install component xip-patch
# - install component knative-serving-init
# - install component knative-serving
# - install component knative-eventing
# - install component dex
# - install component ory
# - install component api-gateway
# - install component rafter
# - install component service-catalog
# - install component service-catalog-addons
# - install component helm-broker
# - install component nats-streaming
# - install component core
# - install component permission-controller
# - install component apiserver-proxy
# - install component iam-kubeconfig-service
# - install component serverless
# - install component knative-provisioner-natss
# - install component event-sources
# - install component application-connector
  # Kyma wants to add its root certificate to the keychain.
# Password:
  # Adding domain mappings to your 'hosts' file
# - Domains added

# Kyma is installed in version:	1.14.0
# Kyma is running at:		https://192.168.64.4:8443
# Kyma console:			https://console.kyma.local
# Kyma admin email:		admin@kyma.cx
# Kyma admin password:		


# Happy Kyma-ing! :)

During the install process I faced quiet some issues which resolve back to proxy issues, VPN configurations which aren’t happy and other interesting things. If you’re facing issues please refer to kyma-community.slack.com channel.

If Kyma is installed and started up you can ask the cluster for its running pods and you should see that Kyma is running in the list of pods.

kubectl get pods --all-namespaces

# Output
# You're looking for everything kyma* in the namespace e.g.:
# - kyma-installer
# - kyma-integration 
# - kyma-system 

Great, we have a locally installed Kyma Runtime now. You can open the Kyma Console UI via this link https://console.kyma.local/home now. Your login credentials are displayed in your CLI.

For today we leave this as our achievement and next time look into deploying a DB on our Kyma Runtime and expose it through an API.

Summary

To summarize what we did:

  1. We installed all needed bits and pieces to install the Kyma runtime instance
  2. You’ve provisioned a Minikube instance with the Kyma configuration
    kyma provision minikube —vm-driver=hyperkit
  3. You’ve installed the Kyma runtime instance using the hyperkit driver
    kyma install
  4. And finally opened up the Kyma Console UI

 

With that happy Coding!

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.