# https://www.kubeflow.org/docs/pipelines/installation/localcluster-deployment/#deploying-kubeflow-pipelines
# env/platform-agnostic-pns hasn't been publically released, so we install from master temporarily
export PIPELINE_VERSION=1.0.1
kubectl apply -k "github.com/kubeflow/pipelines/manifests/kustomize/cluster-scoped-resources?ref=$PIPELINE_VERSION"
kubectl wait --for condition=established --timeout=60s crd/applications.app.k8s.io
kubectl apply -k "github.com/kubeflow/pipelines/manifests/kustomize/env/platform-agnostic-pns?ref=$PIPELINE_VERSION"
# expose gui
kubectl port-forward -n kubeflow --address 0.0.0.0 svc/ml-pipeline-ui 8080:80