Commit bf1e591f authored by Jack Zampolin's avatar Jack Zampolin

Add NOTES.txt and README.md

parent 79f077ad
apiVersion: v1
description: A Helm chart for Kubernetes
name: kapacitor
version: 0.1.0
description: Chart for Chronograf
keywords:
- kapacitor
- stream
- etl
- timeseries
home: https://www.influxdata.com/time-series-platform/kapacitor/
maintainers:
- name: Jack Zampolin
email: jack@influxdb.com
engine: gotpl
\ No newline at end of file
# `kapacitor` Chart
\ No newline at end of file
# Kapacitor
## An Open-Source Time Series ETL and Alerting Engine
[Kapacitor](https://github.com/influxdata/kapacitor) is an open-source framework built by the folks over at [InfluxData](https://influxdata.com) and written in Go for processing, monitoring, and alerting on time series data
## QuickStart
```bash
$ helm install stable/kapacitor --name foo --namespace bar
```
## Introduction
This chart bootstraps A Kapacitor deployment and service on a Kubernetes cluster using the Helm Package manager.
## Prerequisites
- Kubernetes 1.4+
- PV provisioner support in the underlying infrastructure (optional)
## Installing the Chart
To install the chart with the release name `my-release`:
```bash
$ helm install --name my-release stable/kapacitor
```
The command deploys Kapacitor on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
> **Tip**: List all releases using `helm list`
## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
```bash
$ helm delete my-release --purge
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
## Configuration
The following tables lists the configurable parameters of the Kapacitor chart and
their default values.
```yaml
image.repository: "kapacitor"
image.tag: "1.1.0"
image.pullPolicy: "IfNotPresent"
service.type: NodePort
persistence.enabled: false
persistence.storageClass: generic
persistence.accessMode: ReadWriteOnce
persistence.size: 8Gi
resources.requests.memory: 256Mi
resources.requests.cpu: 0.1
resources.limits.memory: 2Gi
resources.limits.cpu: 2
# This is the location where kapacitor will look for an Influxdb
# instance to create a subscription on.
InfluxURL: http://influxdb-influxdb.tick:8086
```
The [full image documentation](https://hub.docker.com/_/kapacitor/) contains more information about running Kapacitor in docker.
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```bash
$ helm install --name my-release \
--set InfluxURL=http://myinflux.mytld:8086,persistence.enabled=true \
stable/kapacitor
```
The above command enables persistence and changes the size of the requested data volume to 200GB.
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
```bash
$ helm install --name my-release -f values.yaml stable/kapacitor
```
> **Tip**: You can use the default [values.yaml](values.yaml)
## Persistence
The [Kapacitor](https://hub.docker.com/_/kapacitor/) image stores data in the `/var/lib/kapacitor` directory in the container.
The chart optionally mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning.
\ No newline at end of file
1. Get the application URL by running these commands:
{{- if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT/login
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "fullname" . }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:{{ .Values.service.externalPort }}
{{- end }}
Kapacitor can be accessed via port 9092 on the following DNS name from within your cluster:
- http://{{ template "fullname" . }}.{{ .Release.Namespace }}:9092
You can easily connect to the remote instance from a local kapacitor cli. Forward the api port to localhost:9092
- kubectl port-forward --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "fullname" . }} -o jsonpath='{ .items[0].metadata.name }') 9092:9092
You can also connect to the container running Kapacitor. To open a shell session in the pod run the following:
- kubectl exec -i -t --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "fullname" . }} -o jsonpath='{.items[0].metadata.name}') /bin/sh
To trail the logs for the Kapacitor pod run the following:
- kubectl logs -f --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "fullname" . }} -o jsonpath='{ .items[0].metadata.name }')
{{- if eq .Values.service.type "LoadBalancer" }}
To watch for the LoadBalancer IP run the following
- kubectl get svc -w --namespace {{ .Release.Namespace }} -l app={{ template "fullname" . }}
{{- end }}
\ No newline at end of file
......@@ -31,4 +31,4 @@ resources:
cpu: 2
# Set url for kapacitor to point to
InfluxURL: http://influxdb-influxdb.tick:8086
\ No newline at end of file
InfluxURL: http://influxdb-influxdb.tick:8086
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment