vmware-archive / kafka-trigger

Kubernetes CRD controller for Kafka topic as event source for Kubeless functions
Apache License 2.0
28 stars 34 forks source link

no matches for kind "Deployment" in version "apps/v1beta1" #18

Closed yvz5 closed 4 years ago

yvz5 commented 4 years ago

Is this a BUG REPORT or FEATURE REQUEST?: BUG

What happened: Tried to create the resources using the release yaml and got errors:

Installing kubeless...
namespace/kubeless created
configmap/kubeless-config created
deployment.apps/kubeless-controller-manager created
serviceaccount/controller-acct created
clusterrole.rbac.authorization.k8s.io/kubeless-controller-deployer created
clusterrolebinding.rbac.authorization.k8s.io/kubeless-controller-deployer created
customresourcedefinition.apiextensions.k8s.io/functions.kubeless.io created
customresourcedefinition.apiextensions.k8s.io/httptriggers.kubeless.io created
customresourcedefinition.apiextensions.k8s.io/cronjobtriggers.kubeless.io created
service/kafka created
service/zoo created
clusterrole.rbac.authorization.k8s.io/kafka-controller-deployer created
clusterrolebinding.rbac.authorization.k8s.io/kafka-controller-deployer created
customresourcedefinition.apiextensions.k8s.io/kafkatriggers.kubeless.io created
service/broker created
service/zookeeper created
unable to recognize "https://github.com/kubeless/kafka-trigger/releases/download/v1.0.2/kafka-zookeeper-v1.0.2.yaml": no matches for kind "Deployment" in version
"apps/v1beta1"
unable to recognize "https://github.com/kubeless/kafka-trigger/releases/download/v1.0.2/kafka-zookeeper-v1.0.2.yaml": no matches for kind "StatefulSet" in version "apps/v1beta1"
unable to recognize "https://github.com/kubeless/kafka-trigger/releases/download/v1.0.2/kafka-zookeeper-v1.0.2.yaml": no matches for kind "StatefulSet" in version "apps/v1beta1"

What you expected to happen: That the deployment, StatefulSet created.

How to reproduce it (as minimally and precisely as possible): use latest kubernetes binaries or minikube and kubectl create kafka trigger

Anything else we need to know?: maybe updating the yaml files would solve this. Check this : https://stackoverflow.com/a/58482194

Environment:

andresmgot commented 4 years ago

Hi @yvz5, thanks for reporting the issue. To check if it's just a manifest issue, can you execute this?

curl -L https://github.com/kubeless/kafka-trigger/releases/download/v1.0.2/kafka-zookeeper-v1.0.2.yaml | sed 's/apiVersion: apps\/v1beta1/apiVersion: apps\/v1/g' | kubectl apply -f - 

We can just fix the manifest if that's the case with the above.

yvz5 commented 4 years ago

I did try it but statefulset needs selector property so it doesnt work. You also need to adapt the new statefulset.

You must set the .spec.selector field of a StatefulSet to match the labels of its .spec.template.metadata.labels. Prior to Kubernetes 1.8, the .spec.selector field was defaulted when omitted. In 1.8 and later versions, failing to specify a matching Pod Selector will result in a validation error during StatefulSet creation.

andresmgot commented 4 years ago

Thanks for checking, I have also fixed that issue and uploaded the new manifest to the release page so you should be able to install those as usual. Let me know if you find more issues.