kubeshark

by Kubeshark

Helm chartv53.6.0Apache-2.0Verified publisher

The API Traffic Analyzer for Kubernetes

About this chart

Helm Chart of Kubeshark

Official

Add the Helm repo for Kubeshark:

helm repo add kubeshark https://helm.kubeshark.com

then install Kubeshark:

helm install kubeshark kubeshark/kubeshark

Local

Clone the repo:

git clone [email protected]:kubeshark/kubeshark.git --depth 1
cd kubeshark/helm-chart

In case you want to clone a specific tag of the repo (e.g. v52.3.59):

git clone [email protected]:kubeshark/kubeshark.git --depth 1 --branch <tag>
cd kubeshark/helm-chart

See the list of available tags here: https://github.com/kubeshark/kubeshark/tags

Render the templates

helm template .

Install Kubeshark:

helm install kubeshark .

Uninstall Kubeshark:

helm uninstall kubeshark

Port-forward

Do the port forwarding:

kubectl port-forward service/kubeshark-front 8899:80

Visit localhost:8899

You can also use kubeshark proxy for a more stable port-forward connection.

Add a License Key

When it's necessary, you can use:

--set license=YOUR_LICENSE_GOES_HERE

Get your license from Kubeshark's Admin Console.

Installing with Ingress (EKS) enabled

helm install kubeshark kubeshark/kubeshark -f values.yaml

Set this value.yaml:

tap:
  ingress:
    enabled: true
    className: "alb"
    host: ks.example.com
    tls: []
    annotations:
      alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-east-1:7..8:certificate/b...65c
      alb.ingress.kubernetes.io/target-type: ip
      alb.ingress.kubernetes.io/scheme: internet-facing

Adding your own resources

tap.extraObjects renders arbitrary manifests alongside the chart's own resources, so you can add what your cluster needs without forking the chart. Entries are rendered through the template engine, so .Release, .Values and the chart helpers are all available.

On OpenShift, for example, you would disable the ingress and add a Route instead:

tap:
  ingress:
    enabled: false
  extraObjects:
    # A mapping entry, templated field by field.
    - apiVersion: route.openshift.io/v1
      kind: Route
      metadata:
        name: kubeshark-front
        namespace: '{{ .Release.Namespace }}'
        labels:
          app.kubeshark.com/app: front
      spec:
        host: kubeshark.apps.example.com
        to:
          kind: Service
          name: kubeshark-front
        port:
          targetPort: kubeshark-front
        tls:
          termination: edge
          insecureEdgeTerminationPolicy: Redirect
    # A raw YAML string entry, templated as a whole.
    - |
      apiVersion: v1
      kind: ConfigMap
      metadata:
        name: {{ .Release.Name }}-extra
        namespace: {{ .Release.Namespace }}
      data:
        note: rendered by tap.extraObjects

The chart never parses these manifests, it only renders them, so anything the cluster accepts works here, including CRDs the chart knows nothing about.

Disabling IPV6

Not all have IPV6 enabled, hence this has to be disabled as follows:

helm install kubeshark kubeshark/kubeshark \
  --set tap.ipv6=false

Prometheus Metrics

Please refer to metrics documentation for details.

Override Tag, Tags, Images

In addition to using a private registry, you can further override the images' tag, specific image tags and specific image names.

Example for overriding image names:

  docker:
    overrideImage:
      worker: docker.io/kubeshark/worker:v52.3.87
      front:  docker.io/kubeshark/front:v52.3.87
      hub:    docker.io/kubeshark/hub:v52.3.87

Configuration

ParameterDescriptionDefault
tap.docker.registryDocker registry to pull fromdocker.io/kubeshark
tap.docker.tagTag of the Docker imageslatest
tap.docker.tagLockedLock the Docker image tags to prevent automatic upgrades to the latest branch image version.true
tap.docker.tagLockedIf false - use latest minor tagtrue
tap.docker.imagePullPolicyKubernetes image pull policyAlways
tap.docker.imagePullSecretsKubernetes secrets to pull the images[]
tap.docker.overrideImageCan be used to directly override image names""
tap.docker.overrideTagCan be used to override image tags""
tap.proxy.hub.srvPortHub server port. Change if already occupied.8898
tap.proxy.worker.srvPortWorker server port. Change if already occupied.48999
tap.proxy.front.portFront service port. Change if already occupied.8899
tap.proxy.hostChange to 0.0.0.0 top open up to the world.127.0.0.1
tap.regexTarget (process traffic from) pods that match regex.*
tap.namespacesTarget pods in namespaces[]
tap.excludedNamespacesExclude pods in namespaces[]
tap.bpfOverrideWhen using AF_PACKET as a traffic capture backend, override any existing pod targeting rules and set explicit BPF expression (e.g. net 0.0.0.0/0).[]
tap.capture.dissection.enabledSet to true to have L7 protocol dissection start automatically. When set to false, dissection is disabled by default. This property can be dynamically controlled via the dashboard.true
tap.capture.dissection.stopAfterSet to a duration (e.g. 30s) to have L7 dissection stop after no activity.5m
tap.capture.raw.enabledEnable raw capture of packets and syscalls to disk for offline analysistrue
tap.capture.raw.storageSizeMaximum storage size for raw capture files (supports K8s quantity format: 1Gi, 500Mi, etc.)1Gi
tap.capture.captureSelfInclude Kubeshark's own traffic in capturefalse
tap.capture.dbMaxSizeMaximum size for capture database (e.g., 4Gi, 2000Mi).500Mi
tap.snapshots.local.storageClassStorage class for local snapshots volume. When empty, uses emptyDir. When set, creates a PVC with this storage class""
tap.snapshots.local.storageSizeStorage size for local snapshots volume (supports K8s quantity format: 1Gi, 500Mi, etc.)20Gi
tap.snapshots.cloud.providerCloud storage provider for snapshots: s3, azblob, or gcs. Empty string disables cloud storage. See Cloud Storage docs.""
tap.snapshots.cloud.prefixKey prefix in the bucket/container (e.g. snapshots/). See Cloud Storage docs.""

Deploy kubeshark with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has kubeshark on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartkubeshark is pinned at v53.6.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply