This is part of the How-To guide collection. This guide covers KNE first time setup on a Linux machine. The guide has been verified on a Linux host with Debian 6.10.11-1rodete2. 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.23or newer then golang installation is complete. Otherwise please follow the instructions to install golang. Please export GOPATH and add the export commands to ~/.bashrc or similar.export PATH=$PATH:$(go env GOPATH)/bin
NOTE: This will install version
20.10.21which 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
-
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.32.3which 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
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectlNOTE: This will install version
0.27.0which 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/[email protected]Clone the repo:
git clone https://github.com/openconfig/kne.gitInstall the kne binary:
cd kne
make installThis will build the kne binary and move it to /usr/local/bin (which should
be in your $PATH). Now run:
kne helpTo verify that the kne is built and accessible from your $PATH.