error: unable to recognize "kubeedge-counter-model.yaml": no matches for kind "DeviceModel" in version "devices.kubeedge.io/v1alpha2"
Hi, I was trying to test the kubeedge-counter-model example on my kubeedge master node, my cluster has got 3 ndoes. I followed the instructions on the README.md. But when I executed the following command
kubectl create -f kubeedge-counter-model.yaml
I got this error:
error: unable to recognize "kubeedge-counter-model.yaml": no matches for kind "DeviceModel" in version "devices.kubeedge.io/v1alpha2"
I tried to search it in Google but not even found one answer.
This is the output of kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
k8s-master Ready master 16h v1.18.0 192.168.1.157 <none> Ubuntu 21.04 5.11.0-34-generic docker://20.10.8
taowei-k8s-node1 Ready agent,edge 14h v1.19.3-kubeedge-v1.6.0 192.168.1.172 <none> Ubuntu 21.04 5.11.0-16-generic docker://20.10.7
ubuntu Ready agent,edge 15h v1.19.3-kubeedge-v1.6.0 192.168.1.130 <none> Ubuntu 21.04 5.11.0-34-generic docker://20.10.7
This is the output of kubectl get pods -o wide -A
NAMESPACE NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
default nginx-deployment-c85df76f4-tdxb9 1/1 Running 0 13m 172.17.0.2 taowei-k8s-node1 <none> <none>
kube-system calico-kube-controllers-65f8bc95db-87qsq 1/1 Running 0 16h 172.18.235.195 k8s-master <none> <none>
kube-system calico-node-2vlqr 0/1 Init:Error 98 14h 192.168.1.172 taowei-k8s-node1 <none> <none>
kube-system calico-node-b24dh 1/1 Running 0 16h 192.168.1.157 k8s-master <none> <none>
kube-system calico-node-vx5tf 0/1 Init:Error 49 15h 192.168.1.130 ubuntu <none> <none>
kube-system coredns-7ff77c879f-77fcc 1/1 Running 0 16h 172.18.235.194 k8s-master <none> <none>
kube-system coredns-7ff77c879f-b66zr 1/1 Running 0 16h 172.18.235.193 k8s-master <none> <none>
kube-system etcd-k8s-master 1/1 Running 0 16h 192.168.1.157 k8s-master <none> <none>
kube-system kube-apiserver-k8s-master 1/1 Running 0 16h 192.168.1.157 k8s-master <none> <none>
kube-system kube-controller-manager-k8s-master 1/1 Running 0 16h 192.168.1.157 k8s-master <none> <none>
kube-system kube-proxy-84rbb 0/1 ContainerCreating 0 14h 192.168.1.172 taowei-k8s-node1 <none> <none>
kube-system kube-proxy-pg5vn 1/1 Running 0 16h 192.168.1.157 k8s-master <none> <none>
kube-system kube-proxy-zj9nd 0/1 ContainerCreating 0 15h 192.168.1.130 ubuntu <none> <none>
kube-system kube-scheduler-k8s-master 1/1 Running 0 16h 192.168.1.157 k8s-master <none> <none>
My system is ubuntu21.04, kubernetes v1.18.0, kubedge v1.6.0, docker 20.10.8.
https://github.com/kubeedge/examples/issues/102#issuecomment-909897251
hello. do you create the CRD of DeviceModel first? please use kubectl get crd |grep devicemodels to check it.