-
Notifications
You must be signed in to change notification settings - Fork 56
Building Kubernetes Minikube
Kubernetes Minikube binaries are available and the instructions provided below specify the steps to install the version 1.34.0 on Linux on IBM Z.
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.
-
RHEL (8.8, 8.10)
sudo yum install -y wget curl git make
-
RHEL (9.2, 9.4, 9.5)
sudo yum install -y --allowerasing wget curl git make
-
SLES (15 SP6)
sudo zypper install -y wget curl git make
-
Ubuntu (20.04, 22.04, 24.04)
sudo apt-get update sudo apt-get install -y wget curl git make
cd $SOURCE_ROOT
export KUBERNETES_VERSION=v1.23.16
curl -LO https://github.com/kubernetes/minikube/releases/download/v1.34.0/minikube-linux-s390x && sudo install minikube-linux-s390x /usr/bin/minikube && rm -rf minikube-linux-s390x
curl -LO https://storage.googleapis.com/kubernetes-release/release/$KUBERNETES_VERSION/bin/linux/s390x/kubectl && chmod +x kubectl && sudo cp kubectl /usr/bin/ && rm -rf kubectl
sudo usermod -aG docker $USER && newgrp docker
minikube start --driver=docker --kubernetes-version=$KUBERNETES_VERSION
Note:
If minikube fails to start with the following:
Unfortunately, an error has occurred:
timed out waiting for the condition
This error is likely caused by:
- The kubelet is not running
- The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)
This is due to an SELinux permission issue, which can be temporarily disabled to start minikube then re-enabled via:
sudo setenforce 0
minikube start --driver=docker --kubernetes-version=$KUBERNETES_VERSION
Note:
Above command will start a single kubernetes cluster. The cluster can be viewed using the following command:
kubectl get pods --all-namespaces
Output should look similar to this:
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-bd6b6df9f-qwfmk 1/1 Running 0 12s
kube-system etcd-minikube 1/1 Running 0 25s
kube-system kube-apiserver-minikube 1/1 Running 0 27s
kube-system kube-controller-manager-minikube 1/1 Running 0 24s
kube-system kube-proxy-9pw8f 1/1 Running 0 12s
kube-system kube-scheduler-minikube 1/1 Running 0 24s
kube-system storage-provisioner 1/1 Running 0 24s
For additional insight into your cluster state, minikube bundles the Kubernetes Dashboard, allowing you to get easily acclimated to your new environment:
minikube dashboard --url=true &
If accessing the dashboard remotely, a local proxy server needs to be started:
kubectl proxy --address='0.0.0.0' --disable-filter=true &
The dashboard can then be accessed via http://<host_ip>:8001/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/
.
cd $SOURCE_ROOT
git clone --depth 1 --single-branch --branch v1.24.0 https://github.com/kubernetes/kubernetes.git
cd kubernetes/test/images/
make all WHAT=echoserver
docker tag k8s.gcr.io/e2e-test-images/echoserver:2.5-linux-s390x echoserver:2.5
minikube image load echoserver:2.5
kubectl create deployment hello-minikube --image=echoserver:2.5
kubectl expose deployment hello-minikube --type=NodePort --port=8080
It may take a moment, but your deployment will soon show up when you run:
kubectl get services hello-minikube
To access a LoadBalancer deployment, use the minikube tunnel
command. Here is an example deployment:
kubectl create deployment balanced --image=echoserver:2.5
kubectl expose deployment balanced --type=LoadBalancer --port=8080
In another window, start the tunnel to create a routable IP for the ‘balanced’ deployment:
minikube tunnel
To access this service, run the following command:
kubectl get services balanced
The 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.