Building Kind - linux-on-ibm-z/docs GitHub Wiki
The instructions provided below specify the steps to build Kind 0.31.0 on Linux on IBM Z for the following distributions:
- RHEL (8.10, 9.4, 9.6, 9.7)
- SLES (15 SP7)
- Ubuntu (22.04, 24.04, 25.10)
General Notes:
-
When following the steps below please use a standard permission user unless otherwise specified.
-
A directory
/<source_root>/will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it.
Note: Kind(0.31.0) was verified with docker version 29.2.1 at the time of creation of these instructions.
- Ensure the current user belongs to group
docker:
Use the below command to add group docker if it does not exist:
sudo groupadd dockerUse the below command to add current user to group docker if it has not been done:
sudo usermod -aG docker $USER && newgrp dockerIf you want to build Kind using manual steps, go to STEP 3.
Use the following commands to build Kind using the build script. Please make sure you have wget installed.
wget https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Kind/0.31.0/build_kind.sh
# Build Kind
bash build_kind.sh [Provide -t option for executing build with tests]If the build and tests complete successfully, go to STEP 6. In case of error, check logs at <source_root>/logs/ for more details or go to STEP 3 to follow manual build steps.
export SOURCE_ROOT=/<source_root>/
export PATCH_URL="https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Kind/0.31.0/patch"-
RHEL (8.10, 9.4, 9.6, 9.7)
sudo yum remove -y podman buildah sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo sudo yum install -y curl git make wget tar gcc glibc.s390x docker-ce docker-ce-cli containerd.io make which patch export CC=gcc -
SLES 15 SP7
sudo zypper install -y curl git make wget tar gcc glibc-devel-static make which patch docker containerd docker-buildx export CC=gcc -
Ubuntu (22.04, 24.04, 25.10)
sudo apt-get update sudo apt-get install -y ca-certificates curl gnupg sudo install -m 0755 -d /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg sudo chmod a+r /etc/apt/keyrings/docker.gpg echo \ "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null sudo apt-get update sudo apt-get install -y patch git curl make tar gcc wget make docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin clang
sudo service docker startcd $SOURCE_ROOT
git clone -b v0.31.0 https://github.com/kubernetes-sigs/kind.git
cd $SOURCE_ROOT/kind
curl -s $PATCH_URL/kind.patch | git apply --ignore-whitespace -cd $SOURCE_ROOT/kind
make build
export PATH=${SOURCE_ROOT}/kind/bin:$PATHcd $SOURCE_ROOT/kind
make -C images/base quick REGISTRY=kindest
make -C images/kindnetd REGISTRY=kindest TAG=v20251212-v0.29.0-alpha-105-g20ccfc88 quick
make -C images/local-path-provisioner REGISTRY=kindest TAG=v20251212-v0.29.0-alpha-105-g20ccfc88 quickcd $SOURCE_ROOT/kind
make test
make unit
make integrationcd $SOURCE_ROOT
git clone -b v0.19.0 https://github.com/kubernetes/release.git
cd release
curl -s $PATCH_URL/release.patch | git apply --ignore-whitespace -
export REGISTRY=<registry-url>
docker buildx inspect
cd images/build/cross/
TARGETPLATFORM=s390x make containercd $SOURCE_ROOT
git clone -b v1.35.1 https://github.com/kubernetes/kubernetes.git
cd kubernetes
sed -i 's,v1.35.0-go1.25.6-bullseye.0,v1.35.0-go1.25.6-bookworm.0,g' build/build-image/cross/VERSION
docker buildx use default
KUBE_CROSS_IMAGE=${REGISTRY}/kube-cross-s390x kind build node-image
docker tag kindest/node:latest ${REGISTRY}/kindest/node:latestkind create cluster --image=<node image>kind load docker-image kindest/kindnetd:v20251212-v0.29.0-alpha-105-g20ccfc88
kind load docker-image kindest/local-path-provisioner:v20251212-v0.29.0-alpha-105-g20ccfc88Following example shows logs for a successful cluster creation:
Creating cluster "kind" ...
â Ensuring node image (kindest/node:latest) đŧ
â Preparing nodes đĻ
â Writing configuration đ
â Starting control-plane đšī¸
â Installing CNI đ
â Installing StorageClass đž
Set kubectl context to "kind-kind"
You can now use your cluster with:
kubectl cluster-info --context kind-kind
Thanks for using kind! đFollowing pods are expected after successful cluster creation:
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-7d764666f9-6rs8x 1/1 Running 0 24s
kube-system coredns-7d764666f9-v4c9c 1/1 Running 0 24s
kube-system etcd-kind-control-plane 1/1 Running 0 32s
kube-system kindnet-rmzv8 1/1 Running 0 24s
kube-system kube-apiserver-kind-control-plane 1/1 Running 0 32s
kube-system kube-controller-manager-kind-control-plane 1/1 Running 0 32s
kube-system kube-proxy-qkthw 1/1 Running 0 24s
kube-system kube-scheduler-kind-control-plane 1/1 Running 0 32s
local-path-storage local-path-provisioner-67b8995b4b-hlcqf 1/1 Running 0 24s