Installation
Tanka is distributed as a single binary called tk. It already includes the Jsonnet compiler, but requires some tools to be available:
kubectl: Tanka useskubectlto communicate to your cluster. This meanskubectlmust be available somewhere on your$PATH. If you ever have worked with Kubernetes before, this should be the case anyways.diff: To compute differences, standard UNIXdiff(1)is required.- (recommended)
jb: #Jsonnet Bundler, the Jsonnet package manager - (recommended)
helm: Helm, required for Helm support
On macOS, Tanka is best installed using brew:
brew install tankaThis downloads the most recent version of Tanka and installs it.
Also, Tanka is automatically kept up to date as part of brew upgrade.
We maintain two AUR packages, one building from source and another one using a pre-compiled binary.
These can be installed using any AUR helper, e.g. yay:
yay tankayay tanka-binFor all other operating systems, we provide pre-compiled binaries for Tanka at GitHub Releases.
Just grab the latest version from there, download it and put somewhere in your $PATH (e.g. to /usr/local/bin/tk)
Linux, macOS
Section titled “Linux, macOS”For Linux and macOS, download the binary for your architecture, put it somewhere on your $PATH, and make it an executable:
sudo curl -Lo /usr/local/bin/tk https://github.com/grafana/tanka/releases/latest/download/tk-linux-amd64sudo chmod a+x /usr/local/bin/tksudo curl -Lo /usr/local/bin/tk https://github.com/grafana/tanka/releases/latest/download/tk-linux-armsudo curl -Lo /usr/local/bin/tk https://github.com/grafana/tanka/releases/latest/download/tk-linux-arm64sudo chmod a+x /usr/local/bin/tksudo curl -Lo /usr/local/bin/tk https://github.com/grafana/tanka/releases/latest/download/tk-darwin-amd64sudo chmod a+x /usr/local/bin/tkIf you happen to have a local Go toolchain, you can also build Tanka from source using go install:
cd /tmpgo install github.com/grafana/tanka/cmd/tk@latestIf that does not work for whatever reason (Go modules, etc), clone and compile manually:
git clone https://github.com/grafana/tankacd tankamake installJsonnet Bundler
Section titled “Jsonnet Bundler”The Jsonnet Bundler project creates a package manager for Jsonnet
to share and reuse code across the internet, similar to npm or go mod.
Tanka uses this tool by default, so it’s recommended to install it as well:
On macOS, Jsonnet Bundler is best installed using brew:
brew install jsonnet-bundlerThis downloads the most recent version of Jsonnet Bundler and installs it.
Also, Jsonnet Bundler is automatically kept up to date as part of brew upgrade.
On ArchLinux, install using the jsonnet-bundler-bin AUR package:
yay jsonnet-bundler-binThe jb binary is primarily distributed using GitHub releases.
Linux, macOS
Section titled “Linux, macOS”For Linux and macOS, download the binary for your architecture, put it somewhere on your $PATH, and make it an executable:
sudo curl -Lo /usr/local/bin/jb https://github.com/jsonnet-bundler/jsonnet-bundler/releases/latest/download/jb-linux-amd64sudo chmod a+x /usr/local/bin/jbsudo curl -Lo /usr/local/bin/jb https://github.com/jsonnet-bundler/jsonnet-bundler/releases/latest/download/jb-linux-armsudo curl -Lo /usr/local/bin/jb https://github.com/jsonnet-bundler/jsonnet-bundler/releases/latest/download/jb-linux-arm64sudo chmod a+x /usr/local/bin/jbsudo curl -Lo /usr/local/bin/jb https://github.com/jsonnet-bundler/jsonnet-bundler/releases/latest/download/jb-darwin-amd64sudo chmod a+x /usr/local/bin/jbIf you happen to have a local Go toolchain available, you can build from source using go install:
$ cd /tmp$ go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest