Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Error when spinning up kubeless: cronjob-trigger-controller v1.0.3 crashes with Unable to read the configmap: Error while fetching config location: v1beta1. #1245

Closed
sklarsa opened this issue Aug 8, 2021 · 6 comments

Comments

@sklarsa
Copy link

sklarsa commented Aug 8, 2021

Is this a BUG REPORT or FEATURE REQUEST?:
BUG REPORT

What happened:
Spun up single node digital ocean k8s cluster v1.21.2. Then attempted to install kubeless using the following command:

RELEASE=v1.0.8
kubectl create -f https://github.com/kubeless/kubeless/releases/download/$RELEASE/kubeless-$RELEASE.yaml

All resources are created but the cronjob-trigger-controller container is failing with the following error:

"Unable to read the configmap: Error while fetching config location: v1beta1.CustomResourceDefinition: ObjectMeta: v1.ObjectMeta: readObjectFieldAsBytes: expect : after object field, parsing 534 ...s\":{\"k:{\\\"... at {\"kind\":\"CustomResourceDefinition\",\"apiVersion\":\"apiextensions.k8s.io/v1beta1\",\"metadata\":{\"name\":\"functions.kubeless.io\",\"uid\":\"fe6530ee-c0a7-4a6b-acef-840578ccc5b8\",\"resourceVersion\":\"40441\",\"generation\":1,\"creationTimestamp\":\"2021-08-07T23:59:57Z\",\"managedFields\":[{\"manager\":\"kube-apiserver\",\"operation\":\"Update\",\"apiVersion\":\"apiextensions.k8s.io/v1\",\"time\":\"2021-08-07T23:59:57Z\",\"fieldsType\":\"FieldsV1\",\"fieldsV1\":{\"f:status\":{\"f:acceptedNames\":{\"f:kind\":{},\"f:listKind\":{},\"f:plural\":{},\"f:singular\":{}},\"f:conditions\":{\"k:{\\\"type\\\":\\\"Established\\\"}\":{\".\":{},\"f:lastTransitionTime\":{},\"f:message\":{},\"f:reason\":{},\"f:status\":{},\"f:type\":{}},\"k:{\\\"type\\\":\\\"NamesAccepted\\\"}\":{\".\":{},\"f:lastTransitionTime\":{},\"f:message\":{},\"f:reason\":{},\"f:status\":{},\"f:type\":{}},\"k:{\\\"type\\\":\\\"NonStructuralSchema\\\"}\":{\".\":{},\"f:lastTransitionTime\":{},\"f:message\":{},\"f:reason\":{},\"f:status\":{},\"f:type\":{}}}}}},{\"manager\":\"kubectl-create\",\"operation\":\"Update\",\"apiVersion\":\"apiextensions.k8s.io/v1beta1\",\"time\":\"2021-08-07T23:59:57Z\",\"fieldsType\":\"FieldsV1\",\"fieldsV1\":{\"f:spec\":{\"f:conversion\":{\".\":{},\"f:strategy\":{}},\"f:group\":{},\"f:names\":{\"f:kind\":{},\"f:listKind\":{},\"f:plural\":{},\"f:singular\":{}},\"f:preserveUnknownFields\":{},\"f:scope\":{},\"f:version\":{},\"f:versions\":{}}}}]},\"spec\":{\"group\":\"kubeless.io\",\"version\":\"v1beta1\",\"names\":{\"plural\":\"functions\",\"singular\":\"function\",\"kind\":\"Function\",\"listKind\":\"FunctionList\"},\"scope\":\"Namespaced\",\"versions\":[{\"name\":\"v1beta1\",\"served\":true,\"storage\":true}],\"conversion\":{\"strategy\":\"None\"},\"preserveUnknownFields\":true},\"status\":{\"conditions\":[{\"type\":\"NamesAccepted\",\"status\":\"True\",\"lastTransitionTime\":\"2021-08-07T23:59:57Z\",\"reason\":\"NoConflicts\",\"message\":\"no conflicts found\"},{\"type\":\"Established\",\"status\":\"True\",\"lastTransitionTime\":\"2021-08-07T23:59:57Z\",\"reason\":\"InitialNamesAccepted\",\"message\":\"the initial names have been accepted\"},{\"type\":\"NonStructuralSchema\",\"status\":\"True\",\"lastTransitionTime\":\"2021-08-07T23:59:57Z\",\"reason\":\"Violations\",\"message\":\"spec.preserveUnknownFields: Invalid value: true: must be false\"}],\"acceptedNames\":{\"plural\":\"functions\",\"singular\":\"function\",\"kind\":\"Function\",\"listKind\":\"FunctionList\"},\"storedVersions\":[\"v1beta1\"]}}"

What you expected to happen:
The application to launch successfully

How to reproduce it (as minimally and precisely as possible):
Run the command on a brand new digital ocean cluster

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version): client==v1.22.0, server==v1.21.2
  • Kubeless version (use kubeless version): n/a
  • Cloud provider or physical cluster: DIgital Ocean
@sklarsa
Copy link
Author

sklarsa commented Aug 8, 2021

I do get a couple of warnings though, I wonder if these are related?

% kubectl create -f https://github.com/kubeless/kubeless/releases/download/v1.0.8/kubeless-v1.0.8.yaml

configmap/kubeless-config created
deployment.apps/kubeless-controller-manager created
serviceaccount/controller-acct created
Warning: rbac.authorization.k8s.io/v1beta1 ClusterRole is deprecated in v1.17+, unavailable in v1.22+; use rbac.authorization.k8s.io/v1 ClusterRole
clusterrole.rbac.authorization.k8s.io/kubeless-controller-deployer created
Warning: rbac.authorization.k8s.io/v1beta1 ClusterRoleBinding is deprecated in v1.17+, unavailable in v1.22+; use rbac.authorization.k8s.io/v1 ClusterRoleBinding
clusterrolebinding.rbac.authorization.k8s.io/kubeless-controller-deployer created
Warning: apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
customresourcedefinition.apiextensions.k8s.io/functions.kubeless.io created
customresourcedefinition.apiextensions.k8s.io/httptriggers.kubeless.io created
customresourcedefinition.apiextensions.k8s.io/cronjobtriggers.kubeless.io created

@sklarsa
Copy link
Author

sklarsa commented Aug 8, 2021

And I received this error when trying to launch a kubeless function: #1221

@manchuwook
Copy link

RBAC seems to be using deprecated schemas. They may have to be downloaded and manually updated

@sklarsa
Copy link
Author

sklarsa commented Aug 8, 2021

RBAC seems to be using deprecated schemas. They may have to be downloaded and manually updated

# k api-resources | grep rbac
clusterrolebindings                               rbac.authorization.k8s.io/v1           false        ClusterRoleBinding
clusterroles                                      rbac.authorization.k8s.io/v1           false        ClusterRole
rolebindings                                      rbac.authorization.k8s.io/v1           true         RoleBinding
roles                                             rbac.authorization.k8s.io/v1           true         Role

These appear to be the latest schemas...

k api-resources -n kubeless | grep custom
customresourcedefinitions          crd,crds       apiextensions.k8s.io/v1                false        CustomResourceDefinition

What about the crd api schema? The error specifies v1beta1.CustomResourceDefinition but I have v1 installed

@manchuwook
Copy link

When I downloaded it, I saw v1beta1

@huangjiasingle
Copy link

huangjiasingle commented Aug 10, 2021

@sklarsa you can reference this issue:#1152

@sklarsa sklarsa closed this as completed Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants