Run kPow in Kubernetes with Helm

This article covers running kPow in Kubernetes using the kPow Helm Chart.

Introduction

kPow is the all-in-one toolkit to manage, monitor, and learn about your Kafka resources.

Helm is the package manager for Kubernetes. Helm deploys charts, which you can think of as a packaged application.

We publish a Helm chart for kPow in our Helm Chart Repository. You can view the details of both in ArtifactHUB.

Prerequisites

Before we can install kPow we need to obtain a trial license, configure our local environment, and connect to Kubernetes.

Get a License

You require a license to run kPow, sign-up for a free 30-day trial today.

See kPow on the AWS Marketplace to have kPow billed automatically to your AWS account, no license required.

Configure Your Environment Environment

You will need to install:

Connect to Kubernetes

Installing kPow with Helm requires a Kubernetes environment, in this quick-start guide we use Amazon EKS.

Update your EKS Cluster Configuration

Use the AWS CLI to update your current EKS cluster configuration.

aws eks --region <your-aws-region> update-kubeconfig --name <your-eks-cluster-name> 

Updated context arn:aws:eks:<your-aws-region>:123123123:cluster/<your-eks-cluster-name> in /your/.kube/config
Confirm EKS Cluster Availability

Use kubectl to check the availability of your configured EKS cluster.

kubectl get svc 

NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE 
kubernetes   ClusterIP   12.345.6.7   <none>        443/TCP   28h

Now that we’re configured and connected, we’re ready to install kPow!

Install kPow with Helm

kPow can be installed in Kubernetes with Helm in these simple steps.

Configure the kPow Helm Repository

Register the kPow Helm repository, then update your Helm repo configuration to make sure you install the latest version of kPow.

helm repo add kpow https://charts.kpow.io && \
helm repo update

Get the kPow Helm Chart

We pull the kPow Helm chart to a local directory so that we can make configuration changes before installing kPow.

helm pull kpow/kpow --untar --untardir .

Update kPow Configuration

The minimum information required by kPow to operate is:

kPow is configured by a ConfigMap containing all of the Environment Variables described in our documentation.

Edit the ConfigMap and make the changes required for your environment.

vi ./kpow/templates/kpow-config.yaml

Start kPow

You are now ready to launch a kPow instance, in this example we will create and launch in the operatr-io namespace.

helm install --namespace operatr-io --create-namespace my-kpow ./kpow 

Access the kPow UI

Now that your instance is running, you can access the UI by running the commands included in the output of the previous command.

export POD_NAME=$(kubectl get pods --namespace operatr-io -l "app.kubernetes.io/name=kpow,app.kubernetes.io/instance=my-kpow" -o jsonpath="{.items[0].metadata.name}") 
echo "Visit http://127.0.0.1:3000 to use your application" 
kubectl --namespace operatr-io port-forward $POD_NAME 3000:3000

The kPow UI is now available on http://127.0.0.1:3000.

Manage the kPow Instance

If you encounter errors installing kPow or accessing the kPow UI you can view the installed pods and their logs.

View the kPow Pod

Use kubectl to list pods in the operatr-io namespace.

kubectl describe pods --namespace operatr-io

View the kPow Pod Logs

Using the name of the pod from the previous command output, use kubectl to view the pod logs

kubectl logs --namespace operatr-io my-kpow-9988df6b6-vvf8z 

Delete kPow

Removing the kPow instance is simple with Helm.

helm delete --namespace operatr-io my-kpow

Next Steps

  • If you have any issues or would like to walk through your Kubernetes use cases with us, contact [email protected].
  • Visit https://docs.kpow.io for the full list of configuration options and kPow features available to you.
  • Check out our AWS Marketplace guide for details of running kPow in EKS billed automatically to your AWS account.