Skip to content

bug: make install-kubectl fails — missing install_kubectl.sh script #31

@magicsunday

Description

@magicsunday

Problem

make install-kubectl fails with:

./scripts/install_kubectl.sh
make: ./scripts/install_kubectl.sh: No such file or directory
make: *** [Makefile.d/user.mk:163: install-kubectl] Error 127

Root Cause

The target in Makefile.d/user.mk:163 calls ./scripts/install_kubectl.sh, but this script does not exist. The catalog entry catalog/kubectl.json defines install_method: "github_release_binary", and the backend installer scripts/installers/github_release_binary.sh exists.

The generic scripts/install_tool.sh already supports this tool:

$ ./scripts/install_tool.sh kubectl install

Fix

Option A (recommended): Change the Makefile target to use the generic installer:

install-kubectl: scripts-perms ## Install Kubernetes CLI
	./scripts/install_tool.sh kubectl install

Option B: Create a thin scripts/install_kubectl.sh wrapper:

#!/usr/bin/env bash
set -euo pipefail
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ACTION="${1:-install}"
exec "$DIR/install_tool.sh" kubectl "$ACTION"

Option A is preferred — it reduces script proliferation and uses the catalog system consistently.

Also affected

The dynamic targets make upgrade-kubectl and make uninstall-kubectl call ./scripts/install_kubectl.sh update / uninstall and fail for the same reason.

Files to modify

  • Makefile.d/user.mk — update install-kubectl: target

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions