no matches for kind "NatsCluster" in version "nats.io/v1alpha2"
Brijeshlakkad opened this issue · 2 comments
Brijeshlakkad commented
% kubectl logs deployment/nats-operator
time="2022-05-20T00:37:20Z" level=info msg="nats-operator Version: 0.8.2"
time="2022-05-20T00:37:20Z" level=info msg="Git SHA: 4f36153"
time="2022-05-20T00:37:20Z" level=info msg="Go Version: go1.15.6"
time="2022-05-20T00:37:20Z" level=info msg="Go OS/Arch: linux/amd64"
time="2022-05-20T00:37:20Z" level=info msg="nats-operator is operating at the namespace scope in the \"default\" namespace"
E0520 00:37:20.723740 1 event.go:296] Could not construct reference to: '&v1.Endpoints{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"nats-operator", GenerateName:"", Namespace:"default", SelfLink:"", UID:"3b83caed-d4ef-4bfd-b61f-abe4fe0d647a", ResourceVersion:"111650", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:63788597310, loc:(*time.Location)(0x1dec6c0)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string{"control-plane.alpha.kubernetes.io/leader":"{\"holderIdentity\":\"nats-operator-74f4c74ff9-wfzrb\",\"leaseDurationSeconds\":15,\"acquireTime\":\"2022-05-20T00:34:27Z\",\"renewTime\":\"2022-05-20T00:37:20Z\",\"leaderTransitions\":7}"}, OwnerReferences:[]v1.OwnerReference(nil), Initializers:(*v1.Initializers)(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry{v1.ManagedFieldsEntry{Manager:"nats-operator", Operation:"Update", APIVersion:"v1", Time:(*v1.Time)(0xc00046c180), Fields:(*v1.Fields)(nil)}}}, Subsets:[]v1.EndpointSubset(nil)}' due to: 'selfLink was empty, can't make reference'. Will not report event: 'Normal' 'LeaderElection' 'nats-operator-74f4c74ff9-wfzrb became leader'
time="2022-05-20T00:37:20Z" level=fatal msg="unexpected error while running the main control loop: the server could not find the requested resource"
Seems like NATS CRD was not installed successfully. (referred https://github.com/nats-io/nats-operator/blob/master/README.md )
kubectl get crd
doesn't show nats CRD as well.
I am running kubernetes on minikube vm-driver = docker.
Brijeshlakkad commented
I also followed the steps for deployment-rbac.yaml.
$ kubectl get -n nats-io pods
NAME READY STATUS RESTARTS AGE
nats-operator-58885f8dd6-tcq5n 1/1 Running 0 6m12s
$ kubectl logs nats-operator-58885f8dd6-tcq5n -n nats-io
time="2022-05-20T00:52:58Z" level=info msg="nats-operator Version: 0.2.0-v1alpha2+git"
time="2022-05-20T00:52:58Z" level=info msg="Git SHA: 4040d87"
time="2022-05-20T00:52:58Z" level=info msg="Go Version: go1.9"
time="2022-05-20T00:52:58Z" level=info msg="Go OS/Arch: linux/amd64"
E0520 00:52:58.214157 1 event.go:260] Could not construct reference to: '&v1.Endpoints{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"nats-operator", GenerateName:"", Namespace:"nats-io", SelfLink:"", UID:"10d14d01-c2d4-49fc-b290-5f4164823c0f", ResourceVersion:"112496", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:63788604778, loc:(*time.Location)(0x1d49d80)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string{"control-plane.alpha.kubernetes.io/leader":"{\"holderIdentity\":\"nats-operator-58885f8dd6-tcq5n\",\"leaseDurationSeconds\":15,\"acquireTime\":\"2022-05-20T00:52:58Z\",\"renewTime\":\"2022-05-20T00:52:58Z\",\"leaderTransitions\":0}"}, OwnerReferences:[]v1.OwnerReference(nil), Initializers:(*v1.Initializers)(nil), Finalizers:[]string(nil), ClusterName:""}, Subsets:[]v1.EndpointSubset(nil)}' due to: 'selfLink was empty, can't make reference'. Will not report event: 'Normal' 'LeaderElection' 'nats-operator-58885f8dd6-tcq5n became leader'
time="2022-05-20T00:52:58Z" level=error msg="initialization failed: fail to create CRD: the server could not find the requested resource" pkg=controller
time="2022-05-20T00:52:58Z" level=info msg="retry in 30s..." pkg=controller
time="2022-05-20T00:53:28Z" level=error msg="initialization failed: fail to create CRD: the server could not find the requested resource" pkg=controller
time="2022-05-20T00:53:28Z" level=info msg="retry in 30s..." pkg=controller
time="2022-05-20T00:53:58Z" level=error msg="initialization failed: fail to create CRD: the server could not find the requested resource" pkg=controller
time="2022-05-20T00:53:58Z" level=info msg="retry in 30s..." pkg=controller
time="2022-05-20T00:54:28Z" level=error msg="initialization failed: fail to create CRD: the server could not find the requested resource" pkg=controller
time="2022-05-20T00:54:28Z" level=info msg="retry in 30s..." pkg=controller
time="2022-05-20T00:54:58Z" level=error msg="initialization failed: fail to create CRD: the server could not find the requested resource" pkg=controller
time="2022-05-20T00:54:58Z" level=info msg="retry in 30s..." pkg=controller
time="2022-05-20T00:55:28Z" level=error msg="initialization failed: fail to create CRD: the server could not find the requested resource" pkg=controller
time="2022-05-20T00:55:28Z" level=info msg="retry in 30s..." pkg=controller
time="2022-05-20T00:55:58Z" level=error msg="initialization failed: fail to create CRD: the server could not find the requested resource" pkg=controller
time="2022-05-20T00:55:58Z" level=info msg="retry in 30s..." pkg=controller
time="2022-05-20T00:56:28Z" level=error msg="initialization failed: fail to create CRD: the server could not find the requested resource" pkg=controller
time="2022-05-20T00:56:28Z" level=info msg="retry in 30s..." pkg=controller
time="2022-05-20T00:56:58Z" level=error msg="initialization failed: fail to create CRD: the server could not find the requested resource" pkg=controller
time="2022-05-20T00:56:58Z" level=info msg="retry in 30s..." pkg=controller
time="2022-05-20T00:57:28Z" level=error msg="initialization failed: fail to create CRD: the server could not find the requested resource" pkg=controller
time="2022-05-20T00:57:28Z" level=info msg="retry in 30s..." pkg=controller
time="2022-05-20T00:57:58Z" level=error msg="initialization failed: fail to create CRD: the server could not find the requested resource" pkg=controller
time="2022-05-20T00:57:58Z" level=info msg="retry in 30s..." pkg=controller
time="2022-05-20T00:58:28Z" level=error msg="initialization failed: fail to create CRD: the server could not find the requested resource" pkg=controller
time="2022-05-20T00:58:28Z" level=info msg="retry in 30s..." pkg=controller
time="2022-05-20T00:58:58Z" level=error msg="initialization failed: fail to create CRD: the server could not find the requested resource" pkg=controller
time="2022-05-20T00:58:58Z" level=info msg="retry in 30s..." pkg=controller
time="2022-05-20T00:59:28Z" level=error msg="initialization failed: fail to create CRD: the server could not find the requested resource" pkg=controller
time="2022-05-20T00:59:28Z" level=info msg="retry in 30s..." pkg=controller
Thanks for looking into this!!!
jsirianni commented
This is still an issue in 2024.