This guide covers setting up a Kubeowler development and build environment on Linux from scratch, including proxy and offline-friendly setups and common enterprise distributions (RHEL/CentOS/Alma/Rocky, Debian/Ubuntu).
- Linux x86_64 host with a kubeconfig that can access the cluster (
kubectl get nodes) - Access to crates.io or a configured HTTP/HTTPS proxy
sudo(or root)
Add to ~/.bashrc and source it:
export HTTP_PROXY=http://<proxy-host>:<port>
export HTTPS_PROXY=http://<proxy-host>:<port>
export NO_PROXY=127.0.0.1,localhost,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,.svc,.cluster.local
# Optional: CARGO_HTTP_PROXY=$HTTPS_PROXY
source ~/.bashrcFor corporate CAs, install the root certificate into the system trust store:
# RHEL/CentOS 9+
sudo cp corp-root-ca.crt /etc/pki/ca-trust/source/anchors/
sudo update-ca-trust
# Debian/Ubuntu
sudo cp corp-root-ca.crt /usr/local/share/ca-certificates/
sudo update-ca-certificatesInstall the toolchain, OpenSSL development files, pkg-config, curl, and git:
# RHEL / CentOS / Alma / Rocky (dnf)
sudo dnf -y install gcc gcc-c++ make pkgconfig openssl-devel ca-certificates curl git clang
sudo update-ca-trust || true
# Debian / Ubuntu (apt)
sudo apt-get update -y
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential pkg-config libssl-dev ca-certificates curl git clang
sudo update-ca-certificates || trueVerify:
gcc --version
pkg-config --versionWith proxy configured if needed:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
rustc --version
cargo --versionRust 1.70+ is recommended; use the latest stable channel.
From the project root:
cd /path/to/kubeowler
source ~/.bashrc || true
source "$HOME/.cargo/env" || true
cargo build --release
ls -lh target/release/kubeowlerEnsure network or proxy is available for the first dependency fetch.
To build both amd64 and arm64:
rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu
chmod +x build-multi-arch.sh
./build-multi-arch.sh --releaseArtifacts: target/x86_64-unknown-linux-gnu/release/kubeowler and target/aarch64-unknown-linux-gnu/release/kubeowler. For arm64 cross-compilation, some systems need the target linker (e.g. gcc-aarch64-linux-gnu on Debian/Ubuntu); see installation.md.
./target/release/kubeowler check
./target/release/kubeowler check -i nodes
./target/release/kubeowler check -i security
./target/release/kubeowler check -n kube-system
./target/release/kubeowler check -o my-report.md
./target/release/kubeowler check -c ~/.kube/configOutput: main report and optional summary (same base name with -summary.md).
docker build -t kubeowler:latest .
docker run --rm \
-v ~/.kube/config:/home/kubeowler/.kube/config:ro \
-v $(pwd)/reports:/app/reports \
kubeowler:latest check -o /app/reports/report.mdSee docker-and-kubernetes.md for full Docker and Kubernetes usage.
- OpenSSL headers missing: install
openssl-devel(dnf) orlibssl-dev(apt). - pkg-config missing: install
pkgconfig(dnf) orpkg-config(apt). - Proxy/CA: set proxy env vars and install corporate CA; ensure
NO_PROXYincludes cluster CIDRs. - Slow crates.io: use a proxy or a Cargo mirror if available.
- Kubeconfig: use
-c /path/to/configor setKUBECONFIG.
For detailed troubleshooting, see troubleshooting.md.