User Tools

Site Tools


kubernetes_on_fedora

Getting Kubernetes

kubernetes.io

Installation script

Script is here, run one of:

$ wget -q -O - https://get.k8s.io | bash
$ curl -fsSL https://get.k8s.io | bash

Installation tarballs

Installation

Base tarball

Given kubernetes.tar.gz:

$ tar xzf kubernetes.tar.gz

then script runs:

  • download_kube_binaries
  • create_cluster

download_kube_binaries()

Invokes get-kube-binaries.sh:

# Use the script from inside the Kubernetes tarball to fetch the client and
# server binaries (if not included in kubernetes.tar.gz).
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
  )
}

create_cluster()

Invokes kube-up.sh:

function create_cluster {
  if [[ -n "${KUBERNETES_SKIP_CREATE_CLUSTER-}" ]]; then
    exit 0
  fi
  echo "Creating a kubernetes on ${KUBERNETES_PROVIDER:-gce}..."
  (
    cd kubernetes
    ./cluster/kube-up.sh
    echo "Kubernetes binaries at ${PWD}/cluster/"
    if [[ ":$PATH:" != *":${PWD}/cluster:"* ]]; then
      echo "You may want to add this directory to your PATH in \$HOME/.profile"
    fi

    echo "Installation successful!"
  )
}

cluster/get-kube-binaries.sh

KUBE_ROOT=$(cd $(dirname "${BASH_SOURCE}")/.. && pwd)
KUBE_VERSION=$(cat "${KUBE_ROOT}/version")
CLIENT_PLATFORM="linux"
CLIENT_ARCH="amd64"
SERVER_TAR="kubernetes-server-${SERVER_PLATFORM}-${SERVER_ARCH}.tar.gz"
CLIENT_TAR="kubernetes-client-${CLIENT_PLATFORM}-${CLIENT_ARCH}.tar.gz"

Result:

Will download kubernetes-server-linux-amd64.tar.gz from https://dl.k8s.io/v1.10.0
Will download and extract kubernetes-client-linux-amd64.tar.gz from https://dl.k8s.io/v1.10.0

cluster/kube-up.sh

Misc

kubernetes_on_fedora.txt · Last modified: 2018/04/08 10:23 by rpjday