-
Notifications
You must be signed in to change notification settings - Fork 56
Building Kind
The instructions provided below specify the steps to build Kind 0.30.0 on Linux on IBM Z for the following distributions:
- RHEL (8.10, 9.4, 9.6)
- SLES (15 SP6, 15 SP7)
- Ubuntu (22.04, 24.04, 25.04)
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.30.0) was verified with docker version 28.5.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.30.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.30.0/patch"-
RHEL (8.10, 9.4, 9.6)
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 SP6, 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.04)
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.30.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
make -C images/kindnetd TAG=v20250512-df8de77b quick
make -C images/local-path-provisioner TAG=v20250214-acbabc1a quickcd $SOURCE_ROOT/kind
make test
make unit
make integrationcd $SOURCE_ROOT
git clone -b v0.18.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.33.1 https://github.com/kubernetes/kubernetes.git
cd kubernetes
sed -i 's,v1.33.0-go1.24.2-bullseye.0,v1.33.0-go1.24.2-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:v20250512-df8de77b
kind load docker-image kindest/local-path-provisioner:v20250214-acbabc1aFollowing 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
Have a question, bug, or feature request? Let us know! https://kind.sigs.k8s.io/#community 🙂
Following pods are expected after successful cluster creation:
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-674b8bbfcf-slflx 1/1 Running 0 20m
kube-system coredns-674b8bbfcf-zcpwt 1/1 Running 0 20m
kube-system etcd-kind-control-plane 1/1 Running 0 21m
kube-system kindnet-c8p5v 1/1 Running 0 20m
kube-system kube-apiserver-kind-control-plane 1/1 Running 0 21m
kube-system kube-controller-manager-kind-control-plane 1/1 Running 0 21m
kube-system kube-proxy-bznr9 1/1 Running 0 20m
kube-system kube-scheduler-kind-control-plane 1/1 Running 0 21m
local-path-storage local-path-provisioner-7dc846544d-kxlzm 1/1 Running 0 20mThe information provided in this article is accurate at the time of writing, but on-going development in the open-source projects involved may make the information incorrect or obsolete. Please open issue or contact us on IBM Z Community if you have any questions or feedback.