kubernetes-retired / kubefed

Kubernetes Cluster Federation
Apache License 2.0
2.5k stars 531 forks source link

Fail to install via helm on GKE due to missing field in k8s api #919

Closed kigawas closed 5 years ago

kigawas commented 5 years ago

What happened:

$ helm install kubefed-charts/federation-v2 --name kubefed --namespace kube-federation-system
Error: error validating "": error validating data: [ValidationError(CustomResourceDefinition.status): missing required field "conditions" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionStatus, ValidationError(CustomResourceDefinition.status): missing required field "storedVersions" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionStatus]

What you expected to happen: Successful installation How to reproduce it (as minimally and precisely as possible):

  1. Create a GKE cluster with version 1.13.5-gke.10
  2. Follow the helm instruction guide

Anything else we need to know?:

Environment:

K8s:

Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.2", GitCommit:"66049e3b21efe110454d67df4fa62b08ea79a19b", GitTreeState:"clean", BuildDate:"2019-05-16T16:23:09Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.5-gke.10", GitCommit:"f5949b3427099d4e410ef96d6e0fea3cd4794e10", GitTreeState:"clean", BuildDate:"2019-04-10T19:05:37Z", GoVersion:"go1.11.5b4", Compiler:"gc", Platform:"linux/amd64"}

Helm:

Client: &version.Version{SemVer:"v2.14.0", GitCommit:"05811b84a3f93603dd6c2fcfe57944dfa7ab7fd0", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.14.0", GitCommit:"05811b84a3f93603dd6c2fcfe57944dfa7ab7fd0", GitTreeState:"clean"}

/kind bug

marun commented 5 years ago

Deployment of kubefed CRDs works for non-GKE kube 13.x, so I'm assuming this problem is specific to GKE. Someone familiar with GKE's support of CRDs will need to investigate.

kigawas commented 5 years ago

@marun

Thanks for your reply. I also encountered this problem via installing on the cluster set up with kubeadm, so maybe it's not GKE-specific.

Kubectl version:

Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.2", GitCommit:"66049e3b21efe110454d67df4fa62b08ea79a19b", GitTreeState:"clean", BuildDate:"2019-05-16T16:23:09Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.2", GitCommit:"66049e3b21efe110454d67df4fa62b08ea79a19b", GitTreeState:"clean", BuildDate:"2019-05-16T16:14:56Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
yongzhedamaoxian commented 5 years ago

using helm,v2.13.1 may be helpful.I have problems using helm,v2.14 a few days ago.But it is ok using v2.13.1.However,I have problem using gke joining a cluster

marun commented 5 years ago

@yongzhedamaoxian What problems have you experienced with helm 2.14? kubefed is using it in CI without problems as of yesterday. Also, would you be willing to file a separate issue for the problem you are experiencing with joining a gke cluster?

marun commented 5 years ago

@kigawas Can you please try again with v0.1.0-rc2? Note that the chart install instructions have been updated to reflect the new name of the chart (i.e. kubefed-charts/kubefed instead of kubefed-charts/federation-v2).

Also, did you configure helm with RBAC as per the instructions in the chart readme? That can prevent deployment of the chart.

I encourage you to reach out on #sig-multicluster on kubernetes.slack.com if you are able - I may be able to help diagnose the problem more effectively if we can chat interactively.

yongzhedamaoxian commented 5 years ago

@yongzhedamaoxian What problems have you experienced with helm 2.14? kubefed is using it in CI without problems as of yesterday. Also, would you be willing to file a separate issue for the problem you are experiencing with joining a gke cluster?

I remember Federation is 0.0.10.I forget others

qinpingli commented 5 years ago

@kigawas Yeah, this should not be GKE-specific.

Hit the same issue with the cluster created by minikube, when kubefed version is 0.0.10. $ helm version Client: &version.Version{SemVer:"v2.14.0", GitCommit:"05811b84a3f93603dd6c2fcfe57944dfa7ab7fd0", GitTreeState:"clean"} Server: &version.Version{SemVer:"v2.14.0", GitCommit:"05811b84a3f93603dd6c2fcfe57944dfa7ab7fd0", GitTreeState:"clean"}

$ helm install kubefed-charts/federation-v2 --name kubefed --version=0.0.10 --namespace kube-federation-system Error: error validating "": error validating data: [ValidationError(CustomResourceDefinition.status): missing required field "conditions" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionStatus, ValidationError(CustomResourceDefinition.status): missing required field "storedVersions" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionStatus]

@marun 0.1.0-rc2 does not have this issue for the cluster created by minikube.

marun commented 5 years ago

@qinpingli Thank you for confirming that this is fixed in the latest release.