From 55384ff69697f3f7f3aebe4575febf721271f7bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Tue, 19 Apr 2022 21:29:50 +0200 Subject: [PATCH] Look for kubeadm instead of kubectl for k8s MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- examples/k8s.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/k8s.yaml b/examples/k8s.yaml index 5b4ffb5ebba..9946cec98b8 100644 --- a/examples/k8s.yaml +++ b/examples/k8s.yaml @@ -40,7 +40,7 @@ provision: script: | #!/bin/bash set -eux -o pipefail - command -v kubectl >/dev/null 2>&1 && exit 0 + command -v kubeadm >/dev/null 2>&1 && exit 0 # Installing kubeadm on your hosts cat </dev/null 2>&1; do sleep 3; done"; then - echo >&2 "kubectl is not installed yet" + if ! timeout 30s bash -c "until command -v kubeadm >/dev/null 2>&1; do sleep 3; done"; then + echo >&2 "kubeadm is not installed yet" exit 1 fi hint: |