This is part of the How-To guide collection. This guide covers KNE first time
setup on a Linux machine. Specifically the Ubuntu Focal 20.04 (LTS)
base
image. Modifications may need to be made to the commands listed below in order
to work with your Linux distribution.
The following dependencies and required to use KNE:
- Golang
- Docker
- Kubectl
- Kind
- Make
-
If golang is already installed then check the version using
go version
. If1.21
or newer then golang installation is complete. -
Install the new version:
curl -O https://dl.google.com/go/go1.21.3.linux-amd64.tar.gz sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.21.3.linux-amd64.tar.gz rm go1.21.3.linux-amd64.tar.gz export PATH=$PATH:/usr/local/go/bin export PATH=$PATH:$(go env GOPATH)/bin
Consider adding the
export
commands to~/.bashrc
or similar.
NOTE: This will install version
20.10.16
which was known to work with KNE at some point in time. You can instead install a newer version if you need new features or are having problems.
-
Follow the installation instructions using version string
5:20.10.16~3-0~ubuntu-focal
or the equivalent20.10.16
version for the corresponding OS. -
Follow the post-installation steps for Linux. Specifically manager docker as a non-root user.
sudo groupadd docker sudo usermod -aG docker $USER
NOTE: This will install version
1.27.3
which was known to work with KNE at some point in time. You can instead install a newer version if you need new features or are having problems.
curl -LO https://dl.k8s.io/release/v1.27.3/bin/linux/amd64/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
NOTE: This will install version
0.19.0
which was known to work with KNE at some point in time. You can instead install a newer version if you need new features or are having problems.
go install sigs.k8s.io/kind@v0.19.0
Clone the repo:
git clone https://github.com/openconfig/kne.git
Install the kne
binary:
make install
This will build the kne
binary and move it to /usr/local/bin
(which should
be in your $PATH
). Now run:
kne help
To verify that the kne
is built and accessible from your $PATH
.