2

I downloaded Kubernetes and hit make release.

From the handbook thats all for installation. Unfortunately if I enter kuberctl linux tells me

kuberctl: command not found

I downloaded kubernetes into /root/kubernetes. I noticed that there is a shell-script called kuberctl located in /root/kubernetes/cluster.

Unfortunately if I enter the directory /root/kubernetes/cluster and hit ./kubectl.sh cluster-info the script sais:

/root/kubernetes/hack/lib/util.sh: line 226: kube::log::error: command not found

The corresponding line is

# looks for $1 in well-known output locations for the platform ($2)
# $KUBE_ROOT must be set
kube::util::find-binary-for-platform() {
  local -r lookfor="$1"
  local -r platform="$2"
  local locations=(
    "${KUBE_ROOT}/_output/bin/${lookfor}"
    "${KUBE_ROOT}/_output/dockerized/bin/${platform}/${lookfor}"
    "${KUBE_ROOT}/_output/local/bin/${platform}/${lookfor}"
    "${KUBE_ROOT}/platforms/${platform}/${lookfor}"
  )
  # if we're looking for the host platform, add local non-platform-qualified search paths
  if [[ "${platform}" = "$(kube::util::host_platform)" ]]; then
    locations+=(
      "${KUBE_ROOT}/_output/local/go/bin/${lookfor}"
      "${KUBE_ROOT}/_output/dockerized/go/bin/${lookfor}"
    );
  fi

  # List most recently-updated location.
  local -r bin=$( (ls -t "${locations[@]}" 2>/dev/null || true) | head -1 )

  if [[ -z "${bin}" ]]; then
    kube::log::error "Failed to find binary ${lookfor} for platform ${platform}"
    return 1
  fi

  echo -n "${bin}"
}

As the description of the method suggested I set the kubernetes-home by export KUBE_HOME=/root/kubernetes/ but the err does not disappear.

Any suggestions?

Grim
  • 193
  • 1
  • 16
  • @SeñorCMasMas Intranet DMZ, :D – Grim Apr 03 '21 at 15:10
  • I am admittedly ignorant as to how to build this product.. but I have been building UNIX apps for 30 years now. Have you tried `make install` ? – Señor CMasMas Apr 03 '21 at 15:16
  • @SeñorCMasMas `make: *** No rule to make target 'install'. Stop.` Nice try – Grim Apr 03 '21 at 16:24
  • 1
    DOUGH! I gave your question a point.. – Señor CMasMas Apr 03 '21 at 17:20
  • although there's no `install` rule in that makefile, the `release` one doesn't install anything, it finishes up creating a tarball => https://github.com/kubernetes/kubernetes/blob/master/build/release.sh . Look into your working directory `release-tar` subdir – SYN Jun 16 '21 at 14:56

1 Answers1

0

kuberctl: command not found

The program is called kubectl and not kube*r*ctl.

Also

As the description of the method suggested I set the kubernetes-home by export KUBE_HOME=/root/kubernetes/ but the err does not disappear.

The snippet of code you pasted states you need the variable to be called KUBE_ROOT and not KUBE_HOME.

fswings
  • 833
  • 1
  • 11
  • 27