kubeflow: kfctl.sh generate all fails at current master on minikube

Hello, I am trying to deploy the current master version. I am following the steps at getting-started-minikube. The step kfctl.sh generate all fails:

${KUBEFLOW_SRC}/scripts/kfctl.sh generate all
+ ENV_FILE=env.sh
+ SKIP_INIT_PROJECT=false
+ GKE_API_VERSION=v1beta1
+ GCP_DEFAULT_ZONE=us-east1-d
+++ dirname /home/kube/kubeflow_src_master/scripts/kfctl.sh
++ cd /home/kube/kubeflow_src_master/scripts
++ pwd
+ DIR=/home/kube/kubeflow_src_master/scripts
+ source /home/kube/kubeflow_src_master/scripts/util.sh
+ source /home/kube/kubeflow_src_master/scripts/gke/util.sh
++ set -xe
+ source /home/kube/kubeflow_src_master/scripts/azure/util.sh
++ set -xe
+ source /home/kube/kubeflow_src_master/scripts/aws/util.sh
++ set -xe
+ source /home/kube/kubeflow_src_master/scripts/util-minikube.sh
++ RED='\033[0;31m'
++ GREEN='\033[0;32m'
++ YELLOW='\033[0;33m'
++ NC='\033[0m'
++ MOUNT_LOCAL=false
+ INPUT=()
+ FORMAT=()
+ export 'KUBEFLOW_COMPONENTS="ambassador","jupyter","notebook-controller","jupyter-web-app","profiles","centraldashboard","tf-job-operator","pytorch-operator","spartakus","argo","pipeline"'
+ KUBEFLOW_COMPONENTS='"ambassador","jupyter","notebook-controller","jupyter-web-app","profiles","centraldashboard","tf-job-operator","pytorch-operator","spartakus","argo","pipeline"'
+ export KUBEFLOW_EXTENDEDINFO=false
+ KUBEFLOW_EXTENDEDINFO=false
+ which envsubst
+ [[ 2 -lt 2 ]]
+ COMMAND=generate
+ WHAT=all
+ shift
+ shift
+ main
+ [[ generate == \i\n\i\t ]]
+ source env.sh
++ PLATFORM=minikube
++ KUBEFLOW_REPO=/home/kube/kubeflow_src_master
++ KUBEFLOW_VERSION=master
++ KUBEFLOW_COMPONENTS='"ambassador","jupyter","notebook-controller","jupyter-web-app","profiles","centraldashboard","tf-job-operator","pytorch-operator","spartakus","argo","pipeline"'
++ KUBEFLOW_EXTENDEDINFO=false
++ KUBEFLOW_KS_DIR=/home/kube/kubeflow_src_master/kfapp/ks_app
++ KUBEFLOW_DOCKER_REGISTRY=
++ DOCKER_REGISTRY_KATIB_NAMESPACE=
++ K8S_NAMESPACE=kubeflow
++ KUBEFLOW_PLATFORM=minikube
++ MOUNT_LOCAL=false
++ DEPLOYMENT_NAME=kfapp
+ [[ -z generate ]]
+ [[ -z all ]]
+ check_installed_deps
+ kf_deps=("ks" "kubectl")
+ declare -a kf_deps
+ kf_dep=ks
+ min_ks_ver=0.11.0
++ ks version
++ cut '-d ' -f3
++ head -1
+ ks_ver=0.13.1
+ '[' 0.13.1 '<' 0.11.0 ']'
+ [[ minikube == \g\c\p ]]
+ [[ minikube == \a\z\u\r\e ]]
+ [[ minikube == \a\w\s ]]
+ [[ generate == \g\e\n\e\r\a\t\e ]]
+ [[ all == \p\l\a\t\f\o\r\m ]]
+ [[ all == \a\l\l ]]
+ [[ minikube == \g\c\p ]]
+ [[ minikube == \a\z\u\r\e ]]
+ [[ minikube == \a\w\s ]]
+ [[ all == \k\8\s ]]
+ [[ all == \a\l\l ]]
+ createKsApp
+ pushd .
~/kubeflow_src_master/kfapp ~/kubeflow_src_master/kfapp
++ dirname /home/kube/kubeflow_src_master/kfapp/ks_app
+ cd /home/kube/kubeflow_src_master/kfapp
++ basename /home/kube/kubeflow_src_master/kfapp/ks_app
+ eval ks init ks_app --skip-default-registries
++ ks init ks_app --skip-default-registries
INFO Using context "minikube" from kubeconfig file "/home/kube/.kube/config" 
INFO Creating environment "default" with namespace "default", pointing to "version:v1.15.0" cluster at address "https://192.168.99.104:8443" 
INFO Generating ksonnet-lib data at path '/home/kube/kubeflow_src_master/kfapp/ks_app/lib/ksonnet-lib/v1.15.0' 
+ cd /home/kube/kubeflow_src_master/kfapp/ks_app
+ ks env rm default
INFO Deleting environment "default" with metadata at path "/home/kube/kubeflow_src_master/kfapp/ks_app/environments/default" 
INFO Successfully removed environment 'default'   
+ ks registry add kubeflow /home/kube/kubeflow_src_master/kubeflow
+ ks pkg install kubeflow/argo
INFO Retrieved 6 files                            
+ ks pkg install kubeflow/pipeline
INFO Retrieved 15 files                           
+ ks pkg install kubeflow/common
INFO Retrieved 22 files                           
+ ks pkg install kubeflow/examples
INFO Retrieved 9 files                            
+ ks pkg install kubeflow/jupyter
INFO Retrieved 49 files                           
+ ks pkg install kubeflow/katib
INFO Retrieved 7 files                            
+ ks pkg install kubeflow/mpi-job
INFO Retrieved 9 files                            
+ ks pkg install kubeflow/pytorch-job
INFO Retrieved 6 files                            
+ ks pkg install kubeflow/seldon
INFO Retrieved 17 files                           
+ ks pkg install kubeflow/tf-serving
INFO Retrieved 12 files                           
+ ks pkg install kubeflow/openvino
INFO Retrieved 4 files                            
+ ks pkg install kubeflow/tensorboard
INFO Retrieved 8 files                            
+ ks pkg install kubeflow/tf-training
INFO Retrieved 4 files                            
+ ks pkg install kubeflow/metacontroller
INFO Retrieved 4 files                            
+ ks pkg install kubeflow/profiles
INFO Retrieved 18 files                           
+ ks pkg install kubeflow/application
INFO Retrieved 9 files                            
+ ks pkg install kubeflow/modeldb
INFO Retrieved 4 files                            
+ ks generate pytorch-operator pytorch-operator
INFO Writing component at '/home/kube/kubeflow_src_master/kfapp/ks_app/components/pytorch-operator.jsonnet' 
+ ks generate ambassador ambassador
INFO Writing component at '/home/kube/kubeflow_src_master/kfapp/ks_app/components/ambassador.jsonnet' 
+ ks generate openvino openvino
INFO Writing component at '/home/kube/kubeflow_src_master/kfapp/ks_app/components/openvino.jsonnet' 
+ ks generate jupyter jupyter
INFO Writing component at '/home/kube/kubeflow_src_master/kfapp/ks_app/components/jupyter.jsonnet' 
+ ks generate notebook-controller notebook-controller
INFO Writing component at '/home/kube/kubeflow_src_master/kfapp/ks_app/components/notebook-controller.jsonnet' 
+ ks generate jupyter-web-app jupyter-web-app --injectIstio false
INFO Writing component at '/home/kube/kubeflow_src_master/kfapp/ks_app/components/jupyter-web-app.jsonnet' 
+ ks generate centraldashboard centraldashboard --injectIstio false
INFO Writing component at '/home/kube/kubeflow_src_master/kfapp/ks_app/components/centraldashboard.jsonnet' 
+ ks generate tf-job-operator tf-job-operator --injectIstio false
INFO Writing component at '/home/kube/kubeflow_src_master/kfapp/ks_app/components/tf-job-operator.jsonnet' 
+ ks generate tensorboard tensorboard --injectIstio false
INFO Writing component at '/home/kube/kubeflow_src_master/kfapp/ks_app/components/tensorboard.jsonnet' 
+ ks generate metacontroller metacontroller
INFO Writing component at '/home/kube/kubeflow_src_master/kfapp/ks_app/components/metacontroller.jsonnet' 
+ ks generate profiles profiles
ERROR failed to instantiate prototype "io.ksonnet.pkg.profiles". The following required parameters are missing:
--admin=<admin> cluster admin user id [type: string] 

Some specs: minikube version: v1.2.0 kubectl: v1.15.0 ksonnet version: 0.13.1 jsonnet version: v0.11.2 client-go version: kubernetes-1.10.4

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (4 by maintainers)

Commits related to this issue

Most upvoted comments

@ferrgo we were only able to solve when we used the same user for creation and configuration. after that you can use the cluster from any other user

Thanks man! I was creating everything with the same user here, unless there is something else that inputs an user. But using minikube and creating with my user, then using the kfctl.sh still as the same user. Couldn’t find a user setting on any of those. Below is my script fix that got me out of this issue (and into the #2863 and then into #3544 … Lots of issues after fixing this one)

  • At file kubeflow_src/scripts/kfctl.sh do the following editions:
      # builds a set of inputs to be used with envsubst for env.sh
      # writeEnv updates env.sh when any env var changes
      # eg: envsubst < input.tmpl > env.sh
      INPUT+=('PLATFORM=$PLATFORM\n'
              'KUBEFLOW_REPO=$KUBEFLOW_REPO\n'
              'KUBEFLOW_VERSION=$KUBEFLOW_VERSION\n'
              "KUBEFLOW_COMPONENTS='$KUBEFLOW_COMPONENTS'\n"
              'KUBEFLOW_EXTENDEDINFO=$KUBEFLOW_EXTENDEDINFO\n'
              'KUBEFLOW_KS_DIR=$KUBEFLOW_KS_DIR\n'
              'KUBEFLOW_DOCKER_REGISTRY=$KUBEFLOW_DOCKER_REGISTRY\n'
              'DOCKER_REGISTRY_KATIB_NAMESPACE=$DOCKER_REGISTRY_KATIB_NAMESPACE\n'
              'CLUSTER_ADMIN=${CLUSTER_ADMIN}\n'
              'K8S_NAMESPACE=$K8S_NAMESPACE\n'
              'KUBEFLOW_PLATFORM=$KUBEFLOW_PLATFORM\n'
              'MOUNT_LOCAL=$MOUNT_LOCAL\n'
              'DEPLOYMENT_NAME=$DEPLOYMENT_NAME\n')
      FORMAT+=('$PLATFORM$KUBEFLOW_REPO'
               '$KUBEFLOW_VERSION'
               '$KUBEFLOW_KS_DIR'
               '$KUBEFLOW_DOCKER_REGISTRY'
               '$KUBEFLOW_COMPONENTS'
               '$DOCKER_REGISTRY_KATIB_NAMESPACE'
               '$CLUSTER_ADMIN'
               '$K8S_NAMESPACE'
               '$KUBEFLOW_PLATFORM$MOUNT_LOCAL'
               '$DEPLOYMENT_NAME'
               '$KUBEFLOW_EXTENDEDINFO')
    
      export PLATFORM=${PLATFORM:-""}
      export GKE_API_VERSION=${GKE_API_VERSION:-""}
      export KUBEFLOW_REPO=${KUBEFLOW_REPO:-"${DEFAULT_KUBEFLOW_REPO}"}
      export KUBEFLOW_VERSION=${KUBEFLOW_VERSION:-"master"}
      export KUBEFLOW_KS_DIR=${KUBEFLOW_KS_DIR:-"$(pwd)/ks_app"}
      export KUBEFLOW_DOCKER_REGISTRY=${KUBEFLOW_DOCKER_REGISTRY:-""}
      export DOCKER_REGISTRY_KATIB_NAMESPACE=${DOCKER_REGISTRY_KATIB_NAMESPACE:-""}
      export CLUSTER_ADMIN=${CLUSTER_ADMIN-`whoami`}
    
    And:
          --email)
            shift
            EMAIL=$1
            ;;
          --clusterAdmin)
            shift
            CLUSTER_ADMIN=$1
            ;;
          --gkeApiVersion)
            shift
            GKE_API_VERSION=$1
            ;;
    
    • At file kubeflow_src/scripts/util.sh:
      ks generate metacontroller metacontroller
      ks generate profiles profiles --admin ${CLUSTER_ADMIN}
      ks generate notebooks notebooks
    

Afterwards I’m able to init with --clusterAdmin <name> or if left empty use current users by whoami

kfctl.sh is no longer supported; it is using ksonnet which has been archived by HeptIO and doesn’t work with later version of Kubernetes.

If there isn’t Cloud specific instructions for your install then the recommendation is to follow https://www.kubeflow.org/docs/started/getting-started-k8s/