遇到错误应用程序应用程序的错误:( kubeflow.error):带有消息的代码500

发布于 2025-02-12 06:32:26 字数 9119 浏览 2 评论 0原文

我正在尝试使用此yaml文件 https://raw.githubusercontent.com/kubeflow/manifests/v1.2branch/kfdef/kfdef/kfctl_k8s_istio.v1.2.0.yaml 。 但是我有下面的错误,我不知道如何修复它。 我准确地遵循了 https://www.kubeflow。 org/doc/distributions/azure/deploy/install-kubeflow/ 这是我关注的配置:

##### create a local dir
mkdir ~/test-mvp
cd ~/test-mvp

##### login and set subscription
az login
az account set --subscription 63h2dd53-fdf6-4c11-8edf-593ed487c85d

##### create a resource group
az group create -n test-mvp -l westus


##### create a AKS cluster (takes several minutes)
az aks create -g test-mvp -n test-mvp -s Standard_D4s_v3 -c 2 -l westus --generate-ssh-keys

##### create user credentials (this places entries in ~/.kube/config)
az aks get-credentials -n test-mvp -g test-mvp

##### get kfctl and unzip/untar
wget https://github.com/kubeflow/kfctl/releases/download/v1.2.0/kfctl_v1.2.0-0-0gbc038f9_linux.tar.gz

gunzip kfctl_v1.2.0-0-gbc038f9_linux.tar.gz 
tar xvf kfctl_v1.2.0-0-gbc038f9_linux.tar
rm -f kfctl_v1.2.0-0-gbc038f9_linux.tar

##### setup kubeflow
export PATH=$PATH:"/home/abderrahim/test-mvp"
export KF_NAME=test-mvp
export BASE_DIR=/home/abderrahim/test-mvp
export KF_DIR=${BASE_DIR}/${KF_NAME}
export CONFIG_URI="https://raw.githubusercontent.com/kubeflow/manifests/v1.2-branch/kfdef/kfctl_k8s_istio.v1.2.0.yaml"
mkdir -p ${KF_DIR}
cd ${KF_DIR}

##### deploy kubeflow
kfctl apply -V -f ${CONFIG_URI}

这是我现在遇到的错误


    abderrahim@Azure:~/mykf$ kfctl apply -V -f ${CONFIG_URI}
    INFO[0000] Downloading https://raw.githubusercontent.com/kubeflow/manifests/v1.2-branch/kfdef/kfctl_k8s_istio.v1.2.0.yaml to /tmp/025648159/tmp.yaml  filename="utils/k8utils.go:178"
    INFO[0000] Downloading https://raw.githubusercontent.com/kubeflow/manifests/v1.2-branch/kfdef/kfctl_k8s_istio.v1.2.0.yaml to /tmp/414875378/tmp_app.yaml  filename="loaders/loaders.go:71"
    INFO[0000] App directory /home/abderrahim/mykf already exists  filename="coordinator/coordinator.go:270"
    INFO[0000] Writing KfDef to kfctl_k8s_istio.v1.2.0.yaml  filename="coordinator/coordinator.go:273"
    INFO[0000] No name specified in KfDef.Metadata.Name; defaulting to mykf based on location of config file: /home/abderrahim/mykf/kfctl_k8s_istio.v1.2.0.yaml.  filename="coordinator/coordinator.go:202"
    INFO[0000] 
    ****************************************************************
    Notice anonymous usage reporting enabled using spartakus
    To disable it
    If you have already deployed it run the following commands:
      cd $(pwd)
      kubectl -n ${K8S_NAMESPACE} delete deploy -l app=spartakus
    
    For more info: https://www.kubeflow.org/docs/other-guides/usage-reporting/
    ****************************************************************
      filename="coordinator/coordinator.go:120"
    INFO[0000] Deleting cachedir /home/abderrahim/mykf/.cache/manifests because Status.ReposCache is out of date  filename="kfconfig/types.go:477"
    INFO[0000] Fetching https://github.com/kubeflow/manifests/archive/v1.2.0.tar.gz to /home/abderrahim/mykf/.cache/manifests  filename="kfconfig/types.go:498"
    INFO[0001] Updating localPath to /home/abderrahim/mykf/.cache/manifests/manifests-1.2.0  filename="kfconfig/types.go:569"
    INFO[0001] Fetch succeeded; LocalPath /home/abderrahim/mykf/.cache/manifests/manifests-1.2.0  filename="kfconfig/types.go:590"
    INFO[0001] Processing application: namespaces            filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/namespaces  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: application           filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/application  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: istio-stack           filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/istio-stack  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: cluster-local-gateway  filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/cluster-local-gateway  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: istio                 filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/istio  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: cert-manager-crds     filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/cert-manager-crds  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: cert-manager-kube-system-resources  filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/cert-manager-kube-system-resources  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: cert-manager          filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/cert-manager  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: add-anonymous-user-filter  filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/add-anonymous-user-filter  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: metacontroller        filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/metacontroller  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: bootstrap             filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/bootstrap  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: spark-operator        filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/spark-operator  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: kubeflow-apps         filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/kubeflow-apps  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: knative               filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/knative  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: kfserving             filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/kfserving  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: spartakus             filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/spartakus  filename="kustomize/kustomize.go:667"
    INFO[0001] /home/abderrahim/mykf/.cache/manifests exists; not resyncing   filename="kfconfig/types.go:473"
    INFO[0001] namespace: kubeflow                           filename="utils/k8utils.go:433"
    INFO[0002] Log cluster name into KfDef: test-mvp         filename="kustomize/kustomize.go:253"
    INFO[0002] Deploying application namespaces              filename="kustomize/kustomize.go:266"
    namespace/cert-manager unchanged
    namespace/kubeflow unchanged
    INFO[0003] Successfully applied application namespaces   filename="kustomize/kustomize.go:291"
    INFO[0003] Deploying application application             filename="kustomize/kustomize.go:266"
    serviceaccount/application-controller-service-account unchanged
    clusterrole.rbac.authorization.k8s.io/application-controller-cluster-role unchanged
    clusterrolebinding.rbac.authorization.k8s.io/application-controller-cluster-role-binding unchanged
    service/application-controller-service unchanged
    statefulset.apps/application-controller-stateful-set configured
    WARN[0006] Encountered error applying application application:  (kubeflow.error): Code 500 with message: Apply.Run : [unable to recognize "/tmp/kout005506118": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1", unable to recognize "/tmp/kout005506118": no matches for kind "Application" in version "app.k8s.io/v1beta1"]  filename="kustomize/kustomize.go:284"
    WARN[0006] Will retry in 2 seconds.                      filename="kustomize/kustomize.go:285"
    serviceaccount/application-controller-service-account unchanged
    clusterrole.rbac.authorization.k8s.io/application-controller-cluster-role unchanged
    clusterrolebinding.rbac.authorization.k8s.io/application-controller-cluster-role-binding unchanged
    service/application-controller-service unchanged
    statefulset.apps/application-controller-stateful-set configured

I'm trying to deplo kubeflow on AKS using this YAML file https://raw.githubusercontent.com/kubeflow/manifests/v1.2branch/kfdef/kfctl_k8s_istio.v1.2.0.yaml.
But I'm having the error below I could not know how to fix it .
I followed exactly what was mentioned in https://www.kubeflow.org/docs/distributions/azure/deploy/install-kubeflow/
This is the configuration that I'm following :

##### create a local dir
mkdir ~/test-mvp
cd ~/test-mvp

##### login and set subscription
az login
az account set --subscription 63h2dd53-fdf6-4c11-8edf-593ed487c85d

##### create a resource group
az group create -n test-mvp -l westus


##### create a AKS cluster (takes several minutes)
az aks create -g test-mvp -n test-mvp -s Standard_D4s_v3 -c 2 -l westus --generate-ssh-keys

##### create user credentials (this places entries in ~/.kube/config)
az aks get-credentials -n test-mvp -g test-mvp

##### get kfctl and unzip/untar
wget https://github.com/kubeflow/kfctl/releases/download/v1.2.0/kfctl_v1.2.0-0-0gbc038f9_linux.tar.gz

gunzip kfctl_v1.2.0-0-gbc038f9_linux.tar.gz 
tar xvf kfctl_v1.2.0-0-gbc038f9_linux.tar
rm -f kfctl_v1.2.0-0-gbc038f9_linux.tar

##### setup kubeflow
export PATH=$PATH:"/home/abderrahim/test-mvp"
export KF_NAME=test-mvp
export BASE_DIR=/home/abderrahim/test-mvp
export KF_DIR=${BASE_DIR}/${KF_NAME}
export CONFIG_URI="https://raw.githubusercontent.com/kubeflow/manifests/v1.2-branch/kfdef/kfctl_k8s_istio.v1.2.0.yaml"
mkdir -p ${KF_DIR}
cd ${KF_DIR}

##### deploy kubeflow
kfctl apply -V -f ${CONFIG_URI}

Thiss is the error that i'm having right now


    abderrahim@Azure:~/mykf$ kfctl apply -V -f ${CONFIG_URI}
    INFO[0000] Downloading https://raw.githubusercontent.com/kubeflow/manifests/v1.2-branch/kfdef/kfctl_k8s_istio.v1.2.0.yaml to /tmp/025648159/tmp.yaml  filename="utils/k8utils.go:178"
    INFO[0000] Downloading https://raw.githubusercontent.com/kubeflow/manifests/v1.2-branch/kfdef/kfctl_k8s_istio.v1.2.0.yaml to /tmp/414875378/tmp_app.yaml  filename="loaders/loaders.go:71"
    INFO[0000] App directory /home/abderrahim/mykf already exists  filename="coordinator/coordinator.go:270"
    INFO[0000] Writing KfDef to kfctl_k8s_istio.v1.2.0.yaml  filename="coordinator/coordinator.go:273"
    INFO[0000] No name specified in KfDef.Metadata.Name; defaulting to mykf based on location of config file: /home/abderrahim/mykf/kfctl_k8s_istio.v1.2.0.yaml.  filename="coordinator/coordinator.go:202"
    INFO[0000] 
    ****************************************************************
    Notice anonymous usage reporting enabled using spartakus
    To disable it
    If you have already deployed it run the following commands:
      cd $(pwd)
      kubectl -n ${K8S_NAMESPACE} delete deploy -l app=spartakus
    
    For more info: https://www.kubeflow.org/docs/other-guides/usage-reporting/
    ****************************************************************
      filename="coordinator/coordinator.go:120"
    INFO[0000] Deleting cachedir /home/abderrahim/mykf/.cache/manifests because Status.ReposCache is out of date  filename="kfconfig/types.go:477"
    INFO[0000] Fetching https://github.com/kubeflow/manifests/archive/v1.2.0.tar.gz to /home/abderrahim/mykf/.cache/manifests  filename="kfconfig/types.go:498"
    INFO[0001] Updating localPath to /home/abderrahim/mykf/.cache/manifests/manifests-1.2.0  filename="kfconfig/types.go:569"
    INFO[0001] Fetch succeeded; LocalPath /home/abderrahim/mykf/.cache/manifests/manifests-1.2.0  filename="kfconfig/types.go:590"
    INFO[0001] Processing application: namespaces            filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/namespaces  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: application           filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/application  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: istio-stack           filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/istio-stack  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: cluster-local-gateway  filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/cluster-local-gateway  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: istio                 filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/istio  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: cert-manager-crds     filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/cert-manager-crds  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: cert-manager-kube-system-resources  filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/cert-manager-kube-system-resources  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: cert-manager          filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/cert-manager  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: add-anonymous-user-filter  filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/add-anonymous-user-filter  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: metacontroller        filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/metacontroller  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: bootstrap             filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/bootstrap  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: spark-operator        filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/spark-operator  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: kubeflow-apps         filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/kubeflow-apps  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: knative               filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/knative  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: kfserving             filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/kfserving  filename="kustomize/kustomize.go:667"
    INFO[0001] Processing application: spartakus             filename="kustomize/kustomize.go:569"
    INFO[0001] Creating folder /home/abderrahim/mykf/kustomize/spartakus  filename="kustomize/kustomize.go:667"
    INFO[0001] /home/abderrahim/mykf/.cache/manifests exists; not resyncing   filename="kfconfig/types.go:473"
    INFO[0001] namespace: kubeflow                           filename="utils/k8utils.go:433"
    INFO[0002] Log cluster name into KfDef: test-mvp         filename="kustomize/kustomize.go:253"
    INFO[0002] Deploying application namespaces              filename="kustomize/kustomize.go:266"
    namespace/cert-manager unchanged
    namespace/kubeflow unchanged
    INFO[0003] Successfully applied application namespaces   filename="kustomize/kustomize.go:291"
    INFO[0003] Deploying application application             filename="kustomize/kustomize.go:266"
    serviceaccount/application-controller-service-account unchanged
    clusterrole.rbac.authorization.k8s.io/application-controller-cluster-role unchanged
    clusterrolebinding.rbac.authorization.k8s.io/application-controller-cluster-role-binding unchanged
    service/application-controller-service unchanged
    statefulset.apps/application-controller-stateful-set configured
    WARN[0006] Encountered error applying application application:  (kubeflow.error): Code 500 with message: Apply.Run : [unable to recognize "/tmp/kout005506118": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1", unable to recognize "/tmp/kout005506118": no matches for kind "Application" in version "app.k8s.io/v1beta1"]  filename="kustomize/kustomize.go:284"
    WARN[0006] Will retry in 2 seconds.                      filename="kustomize/kustomize.go:285"
    serviceaccount/application-controller-service-account unchanged
    clusterrole.rbac.authorization.k8s.io/application-controller-cluster-role unchanged
    clusterrolebinding.rbac.authorization.k8s.io/application-controller-cluster-role-binding unchanged
    service/application-controller-service unchanged
    statefulset.apps/application-controller-stateful-set configured

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

堇年纸鸢 2025-02-19 06:32:33

似乎K8在1.22中删除了Beta casta customResourcedefinition api: https://kubernetes.io/blog/2021/07/14/upcoming-changes-changes-in-kubernetes-1-22/#api-changes

和默认AK引起了问题。

解决此问题的工作是创建具有1.21的AK。*版本的K8S。

例如:

az aks create -g <RESOURCE_GROUP_NAME> -n <NAME> -s <AGENT_SIZE> -c <AGENT_COUNT> -l <LOCATION> --kubernetes-version 1.21.14 --generate-ssh-keys

Seems K8s removed beta CustomResourceDefinition API in 1.22: https://kubernetes.io/blog/2021/07/14/upcoming-changes-in-kubernetes-1-22/#api-changes

And default AKS are using k8s with 1.22.11 which caused the problem.

A work around for this problem is to create an AKS with 1.21.* version of k8s.

Eg:

az aks create -g <RESOURCE_GROUP_NAME> -n <NAME> -s <AGENT_SIZE> -c <AGENT_COUNT> -l <LOCATION> --kubernetes-version 1.21.14 --generate-ssh-keys
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文