Grafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
Writing Jsonnet
Advanced features
Frequently asked questionsKnown issues

Known Issues

Below is a list of common errors and how to address them.

Evaluating jsonnet: RUNTIME ERROR: Undefined external variable: __ksonnet/components

When migrating from ksonnet, this error might occur, because Tanka does not provide the global __ksonnet variable, nor does it strictly have the concept of components.
You will need to use the plain Jsonnet import feature instead. Note that this requires your code to be inside of one of the import paths.

Evaluating jsonnet: RUNTIME ERROR: couldn't open import "k.libsonnet": no match locally or in the Jsonnet library paths

This error can occur when the ksonnet kubernetes libraries are missing in the import paths. While ksonnet used to magically include them, Tanka follows a more explicit approach and requires you to install them using jb:

$ jb install
$ echo "import ''" > lib/k.libsonnet

This does 2 things:

1) It installs the ksonnet library (in vendor/ If you need a specific version, take a look at When a pre-compiled version is available, install it using jb, otherwise compile it yourself and place it under lib/.

2) It makes an alias for libraries importing k.libsonnet directly. See for the alias rationale.

Unexpected diff if the same port number is used for UDP and TCP

A long-standing bug in kubectl results in an incorrect diff output if the same port number is used multiple times in differently named ports, which commonly happens if a port is specified using both protocols, tcp and udp. Nevertheless, tk apply will still work correctly.