Skip to content

Commit

Permalink
Look for kubeadm instead of kubectl for k8s
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
afbjorklund committed Apr 19, 2022
1 parent b40d4c3 commit 55384ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF | sudo tee /etc/modules-load.d/containerd.conf
overlay
Expand Down Expand Up @@ -88,12 +88,12 @@ provision:
sed -e "s/${LIMA_CIDATA_SLIRP_IP_ADDRESS:-192.168.5.15}/127.0.0.1/" -i $KUBECONFIG
mkdir -p ${HOME:-/root}/.kube && cp -f $KUBECONFIG ${HOME:-/root}/.kube/config
probes:
- description: "kubectl to be installed"
- description: "kubeadm to be installed"
script: |
#!/bin/bash
set -eux -o pipefail
if ! timeout 30s bash -c "until command -v kubectl >/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: |
Expand Down

0 comments on commit 55384ff

Please sign in to comment.