Skip to content

Instantly share code, notes, and snippets.

@veggiemonk
Created September 13, 2020 10:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veggiemonk/5edc443d70fbbae2dd7c49cfa8a21857 to your computer and use it in GitHub Desktop.
Save veggiemonk/5edc443d70fbbae2dd7c49cfa8a21857 to your computer and use it in GitHub Desktop.
Generate KubeFlow manifest
#!/usr/bin/env bash
command -v kfctl >/dev/null 2>&1 || { echo; echo >&2"command kfctl is missing"; exit 1; }
command -v wget >/dev/null 2>&1 || { echo; echo >&2"command wget is missing"; exit 1; }
# Set the following kfctl configuration file:
# Other config can be found here: https://www.kubeflow.org/docs/started/getting-started/
export CONFIG_URI="https://raw.githubusercontent.com/kubeflow/manifests/v1.1-branch/kfdef/kfctl_k8s_istio.v1.1.0.yaml"
# Set KF_NAME to the name of your Kubeflow deployment. You also use this
# value as directory name when creating your configuration directory.
# For example, your deployment name can be 'my-kubeflow' or 'kf-test'.
export KF_NAME=kfml
# Set the path to the base directory where you want to store one or more
# Kubeflow deployments. For example, /opt.
# Then set the Kubeflow application directory for this deployment.
export BASE_DIR="$(pwd)"
export KF_DIR="${BASE_DIR}/${KF_NAME}"
mkdir -p "${KF_DIR}"
export CONFIG_FILE="${KF_DIR}/kfdef.yaml"
# Download the config file
wget -O "${CONFIG_FILE}" "${CONFIG_URI}"
cd "${KF_DIR}" || exit 1
kfctl build -V -f "${CONFIG_FILE}"
kfctl build -V -f "${CONFIG_FILE}" -d > manifest.yaml
echo
echo "All the resources are in manifest.yaml"
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment