Skip to content

TrueWatchTech/datakit-gke-helm-chart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Datakit GKE Helm Chart

This Helm chart deploys Datakit on Google Kubernetes Engine (GKE) Autopilot clusters.

Overview

Datakit is an observability data collection agent that collects metrics, logs, and traces from Kubernetes clusters. This chart is specifically optimized for GKE Autopilot environments with appropriate security contexts and resource configurations.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.0+
  • GKE Autopilot cluster (or standard GKE cluster with appropriate security policies)

Installation

Quick Start

  1. Clone or download this chart

  2. Update the values.yaml file with your configuration:

    • Update config.dataway with your actual Dataway token
    • Update config.clusterName with your cluster name
    • Update config.datakitNamespace with your namespace identifier
  3. Install the chart:

helm install datakit ./datakit-gke -n datakit --create-namespace

Or with custom values:

helm install datakit ./datakit-gke \
  --set config.dataway="https://openway.truewatch.com?token=YOUR_TOKEN" \
  --set config.clusterName="my-gke-cluster" \
  --set config.datakitNamespace="production" \
  -n datakit --create-namespace

Configuration

Key Configuration Parameters

Parameter Description Default
namespace.create Create the namespace true
namespace.name Namespace name datakit
image.repository Datakit image repository pubrepo.truewatch.com/truewatch/datakit
image.tag Datakit image tag 1.85.1
config.dataway Dataway endpoint with token https://openway.truewatch.com?token=<YOUR_DATAWAY_TOKEN>
config.clusterName Kubernetes cluster name tw_gke_autopilot_test
config.datakitNamespace Datakit namespace for grouping tw_gke_autopilot_test
config.defaultEnabledInputs Default enabled inputs statsd,dk,container,kubernetesprometheus
daemonset.resources.requests.cpu CPU request 500m
daemonset.resources.requests.memory Memory request 512Mi
daemonset.resources.limits.cpu CPU limit 1000m
daemonset.resources.limits.memory Memory limit 1Gi
service.enabled Enable service true
networkPolicy.enabled Enable network policy true

Resource Configuration

The chart includes resource requests and limits suitable for GKE Autopilot:

  • Init Container: 10m CPU, 16Mi memory (request) / 100m CPU, 64Mi memory (limit)
  • Main Container: 500m CPU, 512Mi memory (request) / 1000m CPU, 1Gi memory (limit)

You can adjust these values in values.yaml according to your workload requirements.

Security Context

The chart is configured with security contexts appropriate for GKE Autopilot:

  • Non-root user (UID 1000)
  • No privilege escalation
  • All capabilities dropped
  • Runtime default seccomp profile

Volumes

By default, all volumes use emptyDir. You can customize volume types in values.yaml:

  • conf-d-volume: Configuration directory
  • data-volume: Data directory
  • pipeline-volume: Pipeline configurations
  • gitrepos-volume: Git repositories
  • python-d-volume: Python scripts
  • pipeline-remote-volume: Remote pipeline configs
  • cache-volume: Cache directory
  • log-volume: Log directory

Network Policy

The chart includes a NetworkPolicy that allows ingress traffic from all pods (0.0.0.0/0). You can customize this by setting:

networkPolicy:
  enabled: true
  allowAllIngress: false  # Customize ingress rules in the template

Service Ports

The following ports are exposed:

  • 9529: HTTP API (TCP)
  • 8125: StatsD (UDP)
  • 4317: OpenTelemetry gRPC (TCP)
  • 9533: Log forwarding (TCP)

Upgrading

To upgrade the chart:

helm upgrade datakit ./datakit-gke -n datakit

Uninstalling

To uninstall the chart:

helm uninstall datakit -n datakit

If you want to delete the namespace as well:

kubectl delete namespace datakit

Troubleshooting

Check DaemonSet status

kubectl get daemonset -n datakit
kubectl describe daemonset datakit -n datakit

View logs

# View logs from all Datakit pods
kubectl logs -n datakit -l app=daemonset-datakit

# View logs from a specific pod
kubectl logs -n datakit <pod-name>

Check pod status

kubectl get pods -n datakit
kubectl describe pod <pod-name> -n datakit

Common Issues

  1. Permission denied errors: Ensure the init container has completed successfully and set the correct permissions.

  2. Image pull errors: Verify that your cluster can access the image repository pubrepo.truewatch.com.

  3. Resource constraints in GKE Autopilot: Adjust resource requests/limits if pods are not scheduling.

Support

For more information about Datakit, visit the TrueWatch documentation.

License

This chart is provided as-is for use with TrueWatch Datakit.

About

This Helm chart deploys Datakit on Google Kubernetes Engine (GKE) Autopilot clusters.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages