Platform-Specific Binaries

Platform-Specific Kubernetes Binaries #

This document provides details on how to build Kubernetes binaries and run kwokctl locally.

Overview #

When running kwokctl with binary runtime (kwokctl create cluster --runtime=binary), kwokctl will download Kubernetes binaries from and use them to create cluster. but that only works on Linux.

For Non-Linux #

Building Kubernetes Binaries and setting up kwokctl defaults to use them

mkdir -p "${SRC_DIR}" && cd "${SRC_DIR}" &&
wget "${KUBE_VERSION}/kubernetes-src.tar.gz" -O - | tar xz &&
make WHAT="cmd/kube-apiserver cmd/kube-controller-manager cmd/kube-scheduler" &&
cat <<EOF >> ~/.kwok/kwok.yaml
kind: KwokctlConfiguration
  kubeBinaryPrefix: $(pwd)/_output/local/bin/$(go env GOOS)/$(go env GOARCH)

The binaries will be located in ~/.kwok/cache/kubernetes/${KUBE_VERSION}/_output/local/bin/$(go env GOOS)/$(go env GOARCH).

Now, we can create cluster using kwokctl with binary runtime.

kwokctl create cluster \