Skip to content

Install

You can install the pre-compiled binary (in several different ways), use Docker or compile from source. Below you can find the steps for each of them.

Install the pre-compiled binary

brew install raffis/kjournal/kjournal
go install github.com/raffis/kjournal/cli/cmd@latest
curl -sfL https://raw.githubusercontent.com/raffis/kjournal/main/cli/install/kjournal.sh | bash
docker pull ghcr.io/raffis/kjournal/cli

Specific version

Due server compatibility reasons (or any other) you may want to install anoher version rather than the latest. Here version v0.0.1 gets installed.

brew install raffis/kjournal/kjournal@v0.0.1
go install github.com/raffis/kjournal/cli/cmd@v0.0.1
curl -sfL https://raw.githubusercontent.com/raffis/kjournal/main/cli/install/kjournal.sh | VERSION=0.0.1 bash
docker pull ghcr.io/raffis/kjournal/cli:v0.0.1

Compatibility with apiserver

The kjornal cli gurantees compatibility for three minor versions with the apiserver. The previous minor release, the same and a newer apiserver. That said this guarantees full compatibility, a bigger version gap will likely still work.

Example:

cli apiserver Fully compatible
v1.1.0 v1.0.0 yes
v1.1.0 v1.1.0 yes
v1.1.0 v1.2.0 yes
v1.1.0 v1.3.0 no
v1.0.0 v1.2.0 no

Note

Releases from 0.x do not offer any compatibility guarantees between different versions of the cli and the apiserver.

Enable shell completion

kjournal completion bash
kjournal completion zsh
kjournal completion fish
kjournal completion powershell

Bash Additional Options

You can also set the VERSION, OS, and ARCH variables to specify a version instead of using latest.

curl -sfL https://raw.githubusercontent.com/raffis/kjournal/main/cli/install/kjournal.sh |
    VERSION=__VERSION__  bash -s -- check

Verifying the artifacts

Binaries

All artifacts are checksummed and the checksum file is signed with cosign.

  1. Download the files you want, and the checksums.txt, checksum.txt.pem and checksums.txt.sig files from the [releases][releases] page:
    wget https://github.com/raffis/kjournal/releases/download/__VERSION__/checksums.txt
    wget https://github.com/raffis/kjournal/releases/download/__VERSION__/checksums.txt.sig
    wget https://github.com/raffis/kjournal/releases/download/__VERSION__/checksums.txt.pem
    
  2. Verify the signature:
    cosign verify-blob \
    --cert checksums.txt.pem \
    --signature checksums.txt.sig \
    checksums.txt
    
  3. If the signature is valid, you can then verify the SHA256 sums match with the downloaded binary:
    sha256sum --ignore-missing -c checksums.txt
    

Container images

Likewise are the container images signed with cosign.

Verify the signatures:

cosign verify ghcr.io/raffis/kjournal/cli

Info

The .pem and .sig files are the image name:tag, replacing / and : with -.

Running with Docker

You can also use the cli within a Docker container. Example usage:

docker run 
    -v ~/.kube:/home/alpine/.kube \
    ghcr.io/raffis/kjournal/cli

Compiling from source

Here you have two options:

If you want to contribute to the project, please follow the steps on our contributing guide.

If you just want to build from source for whatever reason, follow these steps:

clone:

git clone https://github.com/goreleaser/goreleaser
cd goreleaser

get the dependencies:

go mod tidy

build:

go build -o goreleaser .

verify it works:

./goreleaser --version