Skip to content

Commit 55384ff

Browse files
committed
Look for kubeadm instead of kubectl for k8s
The kubernetes installer (kubeadm) requires the other packages, so look for it being installed instead... It has dependencies on both kubectl and kubelet, as well as cri-tools (crictl) and kubernetes-cni (/opt/cni/bin) Signed-off-by: Anders F Björklund <[email protected]>
1 parent b40d4c3 commit 55384ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/k8s.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ provision:
4040
script: |
4141
#!/bin/bash
4242
set -eux -o pipefail
43-
command -v kubectl >/dev/null 2>&1 && exit 0
43+
command -v kubeadm >/dev/null 2>&1 && exit 0
4444
# Installing kubeadm on your hosts
4545
cat <<EOF | sudo tee /etc/modules-load.d/containerd.conf
4646
overlay
@@ -88,12 +88,12 @@ provision:
8888
sed -e "s/${LIMA_CIDATA_SLIRP_IP_ADDRESS:-192.168.5.15}/127.0.0.1/" -i $KUBECONFIG
8989
mkdir -p ${HOME:-/root}/.kube && cp -f $KUBECONFIG ${HOME:-/root}/.kube/config
9090
probes:
91-
- description: "kubectl to be installed"
91+
- description: "kubeadm to be installed"
9292
script: |
9393
#!/bin/bash
9494
set -eux -o pipefail
95-
if ! timeout 30s bash -c "until command -v kubectl >/dev/null 2>&1; do sleep 3; done"; then
96-
echo >&2 "kubectl is not installed yet"
95+
if ! timeout 30s bash -c "until command -v kubeadm >/dev/null 2>&1; do sleep 3; done"; then
96+
echo >&2 "kubeadm is not installed yet"
9797
exit 1
9898
fi
9999
hint: |

0 commit comments

Comments
 (0)