Skip to content

Instantly share code, notes, and snippets.

@moshiurH
Created June 6, 2025 06:20
Show Gist options
  • Save moshiurH/35c60629f4656d41f51c485624653cda to your computer and use it in GitHub Desktop.
Save moshiurH/35c60629f4656d41f51c485624653cda to your computer and use it in GitHub Desktop.
Check the pre-reqs for k0rdent airgap is installed in given node
#!/bin/bash
echo "Checking tool versions..."
echo -n "bash: "
bash --version | head -n 1
echo -n "coreutils (ls): "
ls --version | head -n 1
echo -n "tar: "
tar --version | head -n 1
echo -n "wget: "
wget --version | head -n 1
echo -n "skopeo: "
if command -v skopeo &>/dev/null; then
skopeo --version 2>/dev/null || ldd $(which skopeo) || echo "Error: skopeo is installed but has missing libraries"
else
echo "skopeo not found"
fi
echo -n "cosign: "
if command -v cosign &>/dev/null; then
cosign version || echo "cosign found but version check failed"
else
echo "cosign not found"
fi
echo -n "kubectl: "
if command -v kubectl &>/dev/null; then
kubectl version --client=true
else
echo "kubectl not found"
fi
echo -n "kustomize: "
if command -v kustomize &>/dev/null; then
kustomize version
else
echo "kustomize not found"
fi
echo -n "helm: "
if command -v helm &>/dev/null; then
helm version --short
else
echo "helm not found"
fi
echo ""
echo "Environment check completed."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment