This is an old revision of the document!
Overview
How to install Kubernetes on Fedora 28 using downloadable binary tarballs, based on the installation script you can find here. What this page does is explain what that script accomplishes. Note this does not allow you to build the source, only to run the binaries.
The tarballs
The ones you need:
The rest (not sure you need these):
kubernetes.tar.gz
This tarball kicks things off, as the installation script ends with:
echo "Unpacking kubernetes release ${KUBE_VERSION}"
rm -rf "${PWD}/kubernetes"
tar -xzf ${file}
download_kube_binaries
create_cluster
download_kube_binaries
From the script
function download_kube_binaries {
(
cd kubernetes
if [[ -x ./cluster/get-kube-binaries.sh ]]; then
# Make sure to use the same download URL in get-kube-binaries.sh
KUBERNETES_RELEASE_URL="${KUBERNETES_RELEASE_URL}" \
./cluster/get-kube-binaries.sh
fi
)
}
cluster/get-kube-binaries.sh
The server tarball is downloaded and simply left under server/ for later:
if "${DOWNLOAD_SERVER_TAR}"; then
download_tarball "${KUBE_ROOT}/server" "${SERVER_TAR}"
fi
On the other client, the client tarball is downloaded under client/ and then “extracted”:
if "${DOWNLOAD_CLIENT_TAR}"; then
download_tarball "${KUBE_ROOT}/client" "${CLIENT_TAR}"
extract_arch_tarball "${KUBE_ROOT}/client/${CLIENT_TAR}" "${CLIENT_PLATFORM}" "${CLIENT_ARCH}"
fi
What happens:
function extract_arch_tarball() {
local -r tarfile="$1"
local -r platform="$2"
local -r arch="$3"
platforms_dir="${KUBE_ROOT}/platforms/${platform}/${arch}"
echo "Extracting ${tarfile} into ${platforms_dir}"
mkdir -p "${platforms_dir}"
# Tarball looks like kubernetes/{client,server}/bin/BINARY"
tar -xzf "${tarfile}" --strip-components 3 -C "${platforms_dir}"
# Create convenience symlink
ln -sf "${platforms_dir}" "$(dirname ${tarfile})/bin"
echo "Add '$(dirname ${tarfile})/bin' to your PATH to use newly-installed binaries."
}
The client tarball consists of nothing but kubernetes/client/bin/kubectl.