-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crds/restores.yaml is a invalid yaml format file #372
Comments
Is it possible that the file crds/restores.yaml too big? |
Could you try this one https://github.com/vmware-tanzu/velero/blob/main/config/crd/v1/bases/velero.io_restores.yaml? |
Try to do kubectl apply -f it, but failed. And yesterday, kubectl create -f crds/restores.yaml, it will success. |
I see, would you mind try kubeadm or k3s or other Kubernetes distro with the same version |
I think the kubectl client version is not the root cause. Because we refer the helm client lib to deploy Velero helm chart to target cluster in our program. The following is our program's log |
I research the Transport code of golang. When TLS connection has no response in 15 seconds, the client side will close the connection and return 'http2: client connection lost' error. So for this case, the cluster will blocked when install CRD stores.yaml, then kubectl or helm client will return error. |
I think there must be something wrong with the restores.yaml manifest on Kubernetes 1.21.2, that why I encourage you to try the other Kubernetes distros or different Kubernetes versions to see if it's reproducible. The reproduce steps to should be like this kubectl apply -f https://raw.githubusercontent.com/vmware-tanzu/velero/v1.8.1/config/crd/v1/bases/velero.io_restores.yaml Correct? |
yes |
Not all the cluster will meet this issue. It happens on our customer's cluster, which version is 1.21.2 And I wonder why the crd file stores.yaml is invalid yaml format file, excluding it's too big 111K. Do you know the difference between kubectl apply and create? For the issue cluster, kubectl create works, but kubectl apply will report this error. |
Ref to https://www.theserverside.com/answer/Kubectl-apply-vs-create-Whats-the-difference If the resource doesn't exist, Kubernetes prefers to use |
Probably related to vmware-tanzu/velero#5089
Related to vmware-tanzu/velero#4916 |
We have decreased the crds/restores.yaml size in v1.10 version, closing this issue. |
What steps did you take and what happened:
[A clear and concise description of what the bug is, and what commands you ran.)
When helm install velero, it will failed with 'http2: client connection lost'.
if use 'kubectl apply -f crds/restores.yaml', it also failed.
What did you expect to happen:
Velero should installed successfully on cluster.
The output of the following commands will help us better understand what's going on:
(Pasting long output into a GitHub gist or other pastebin is fine.)
kubectl -n velero apply -f restores.yaml
Warning: apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
error: error when creating “restores.yaml”: Post “https://10.10.10.21:6443/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions?fieldManager=kubectl-client-side-apply”: http2: client connection lost
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
correct the json format of crds/restores.yaml
The invalid line from 205.
Environment:
kubernetes version: 1.21.2
helm version
):helm list -n <YOUR NAMESPACE>
):kubectl version
):/etc/os-release
):The text was updated successfully, but these errors were encountered: