Using the HELM charts

Introduction to Axual Helm Charts

With k8s deployments are getting easier, and here at Axual we try to make your life easier. To achieve that we have developed our Axual Helm Charts to run the Axual Platform on your local machine.

The current helm charts support only a single cluster platform with no distribution in place and commands are for MacOS with Docker-Desktop 2.3.0.X version.

Preparation of the machine

The following doc has been written based on Docker for Mac.

Make sure you have the latest version of Docker for Mac installed as it now supports Kubernetes.

Enable k8s, install k9s and Helm

Enable k8s and set context to docker-desktop

  1. Go to Docker Preferences menu.

  2. Move to Kubernetes tab.

  3. Check Enable Kubernetes option.

    Enable Kubernetes
  4. Wait for Kubernetes to come into running state.

    Running Kubernetes
  5. Verify by running the command:

    kubectl version

    You should get an output like one of the below output, based on your docker-desktop version:

    Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.8", GitCommit:"211047e9a1922595eaa3a1127ed365e9299a6c23", GitTreeState:"clean", BuildDate:"2019-10-15T12:11:03Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"darwin/amd64"}
    Server Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.9-eks-c0eccc", GitCommit:"c0eccca51d7500bb03b2f163dd8d534ffeb2f7a2", GitTreeState:"clean", BuildDate:"2019-12-22T23:14:11Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}
    Client Version: version.Info{Major:"1", Minor:"16+", GitVersion:"v1.16.6-beta.0", GitCommit:"e7f962ba86f4ce7033828210ca3556393c377bcc", GitTreeState:"clean", BuildDate:"2020-01-15T08:26:26Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"darwin/amd64"}
    Server Version: version.Info{Major:"1", Minor:"16+", GitVersion:"v1.16.6-beta.0", GitCommit:"e7f962ba86f4ce7033828210ca3556393c377bcc", GitTreeState:"clean", BuildDate:"2020-01-15T08:18:29Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"linux/amd64"}
  6. Congratulations, you have Kubernetes running in your laptop!

    Please ensure your active context is set to "docker-desktop". You can verify by going to:

    Docker → Kubernetes → docker-desktop (context ticked)

    Docker-Desktop as k8s context

Install k9s

K9S is a powerful CLI tool to manage and interface with any Kubernetes cluster.

  1. To install run the command:

    brew install derailed/k9s/k9s
  2. To start the utility:

    k9s

    You can navigate to view pods, namespaces and other resources via keyboard shortcuts. Find more information at https://github.com/derailed/k9s

Install Helm v3.x

Helm is a nice package manager for Kubernetes.

  1. Install Helm via Homebrew:

    brew install helm
  2. Once installation is complete, verify the version.

    helm version
    It should be v3.x (v2 will not work).
    version.BuildInfo{Version:"v3.0.3", GitCommit:"ac925eb7279f4a6955df663a0128044a8a6b7593", GitTreeState:"clean", GoVersion:"go1.13.7"}

Install Axual Operator

Axual Operator (forked version of Strimzi Operator) has been used to deploy Kafka clusters.

This will NOT install Kafka Clusters! Only the Axual Operator capable of deploying Kafka clusters.

Create namespace and Docker Registry Secret

Creating a namespace is optional but recommended. A namespace provides an isolation layer within a Kubernetes cluster.

  1. Create a namespace.

    kubectl create namespace kafka
  2. Create a secret for the Axual Docker registry.

    kubectl -n kafka                                    \
        create secret docker-registry axualdockercred   \
        --docker-server=docker.axual.io                 \
        --docker-username=[your-username]               \
        --docker-password=[your-password]
    Make sure to replace the username and password with your credentials for Axual Nexus.

Install Axual Operator

Clone the public gitlab repository somewhere in your local folder. We have decided to download the repository into axual folder in our HOME directory.

  1. Clone the repository.

    cd ~/axual
    git clone git@gitlab.com:axual/axual-operator.git
  2. Install Axual Operator with Helm.

    cd ./axual-operator
    helm -n kafka                                                        \
        install strimzi                                                  \
        --set imageRepositoryOverride=docker.axual.io/axual/strimzi      \
        --set image.imagePullSecrets=axualdockercred                     \
        --set image.imagePullPolicy=Always                               \
        --set kafkaInit.image.repository=docker.axual.io/axual/strimzi   \
        --set kafkaInit.image.tag=0.19.0                                 \
        ./helm-charts/helm3/strimzi-kafka-operator

[Intermezzo] - k9s

Confirm that everything is working fine with k9s

  1. open k9s.

    K9s home
  2. select strimzi pod and press d to describe the pod.

    K9s describe pod
If you want to take a look at what k9s offers, check it out this article Speed up Administration with k9s

Install Axual Platform in Kubernetes

Add the Axual helm repository

Add the Axual helm repository to be able to use Axual helm charts.

  1. Add the helm repository. Please replace username and password with your access credentials.

    helm repo add axual-stable https://dev.axual.io/nexus/repository/axual-helm-stable/ --username=your_username --password=your_password

Install Axual Platform

  1. To search available chart versions

    helm search repo -l axual-stable/platform
  2. To install the Axual platform with a specific version my-version:

    helm install platform axual-stable/platform --version=my-version -n kafka
  3. To install the latest version of Axual Platform run the command as shown below.

    helm install platform axual-stable/platform -n kafka
  4. Run the following script to add a loopback interface on the ip 192.168.99.100

    cd ~/axual/axual-helm-charts
    ./platform/setup-scripts/lo0_alias.sh
    You can check if the loopback interface got successfully added by executing:
    ifconfig | grep 192.168.99.100

    It should be something like this:

    	inet 192.168.99.100 netmask 0xffffffff
  5. Add the following entry to your /etc/hosts file:

    192.168.99.100 platform.local
    /etc/hosts content

[Intermezzo - 2] - Axual Platform with k9s

Confirm that Axual Platform is starting fine, with k9s

  1. open k9s.

    K9s home
  2. press l to get the logs for the container.

    K9s container’s logs
If you want to take a look at what k9s offers, check it out this article Speed up Administration with k9s

Install ngnix

We need to start ngnix in order to make the Self-Service pod accessible from outside the kubernetes clusters.

Depends on your kubectl client version, execute one command.
  1. Add the kubernetes-charts repository to your helm.

>=1.16.0-0
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
<1.16.0-0
helm repo add stable https://kubernetes-charts.storage.googleapis.com/
  1. Create a namespace for nginx.

    kubectl create namespace nginx
  2. Start the ingress-nginx.

>=1.16.0-0
helm upgrade --install nginx ingress-nginx/ingress-nginx -n nginx --set-string controller.config.proxy-buffer-size="16k"
<1.16.0-0
helm upgrade --install nginx stable/nginx-ingress -n nginx --set-string controller.config.proxy-buffer-size="16k"

Try out Axual Platform

Login into Self-Service

  1. Login to Self Service with the following URL:

    URL: https://platform.local/login/axual
    Self-Service Login
  2. Use the first login credentials:

      Username: kubernetes@axual.com
      Password: password
    Self-Service Axual Home

Create your first environment for getting started

The instance axual-local has been setup up by us, not the environment.

  1. You can see here how to create Environments

Keep your configuration in mind

This is the configuration you’ll have to pass to your AxualClient. You can edit the axual-client-examples with the following values:

  Tenant: axual
  Endpoint: http://discovery-axual-local.axual.cloud:8080

Follow getting started with your configuration

Now, since your Axual Platform is running fine, you can follow this doc Getting Started to produce/consume some events.

Don’t forget to change the tenant, endpoint, and environment from examples

Uninstall the Axual from kubernetes

Time to do some cleanup

Uninstall Ngnix-ingress

  1. Uninstall the ngnix controller in the nginx namespace.

    helm uninstall nginx -n nginx

Uninstall Axual Platform

  1. Uninstall the Axual Platform in the kafka namespace.

    helm uninstall platform -n kafka

Uninstall Axual Operator

  1. Uninstall the Axual Operator in the kafka namespace.

    helm uninstall strimzi -n kafka