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
-
Go to
Docker Preferences
menu. -
Move to
Kubernetes
tab. -
Check
Enable Kubernetes
option. -
Wait for Kubernetes to come into running state.
-
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"}
-
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)
Install k9s
K9S is a powerful CLI tool to manage and interface with any Kubernetes cluster.
-
To install run the command:
brew install derailed/k9s/k9s
-
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.
-
Install Helm via Homebrew:
brew install helm
-
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.
-
Create a namespace.
kubectl create namespace kafka
-
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.
-
Clone the repository.
cd ~/axual git clone git@gitlab.com:axual/axual-operator.git
-
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
-
open k9s.
-
select strimzi pod and press
d
to describe the 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.
-
Add the helm repository. Please replace
username
andpassword
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
-
To search available chart versions
helm search repo -l axual-stable/platform
-
To install the Axual platform with a specific version
my-version
:helm install platform axual-stable/platform --version=my-version -n kafka
-
To install the latest version of Axual Platform run the command as shown below.
helm install platform axual-stable/platform -n kafka
-
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
-
Add the following entry to your /etc/hosts file:
192.168.99.100 platform.local
[Intermezzo - 2] - Axual Platform with k9s
Confirm that Axual Platform is starting fine, with k9s
-
open k9s.
-
press
l
to get the logs for the container.
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. |
-
Add the kubernetes-charts repository to your helm.
<1.16.0-0
helm repo add stable https://kubernetes-charts.storage.googleapis.com/
-
Create a namespace for nginx.
kubectl create namespace nginx
-
Start the ingress-nginx.
Try out Axual Platform
Login into Self-Service
-
Login to Self Service with the following URL:
URL: https://platform.local/login/axual
-
Use the first login credentials:
Username: kubernetes@axual.com Password: password
Create your first environment for getting started
The instance axual-local
has been setup up by us, not the environment.
-
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
|