cloud-ark / kubeplus

Kubernetes Operator for multi-instance multi-tenancy
https://cloudark.io/
Apache License 2.0
662 stars 81 forks source link

Unable create the CRD #1364

Open Prageeth-Wickramaarachchi opened 1 day ago

Prageeth-Wickramaarachchi commented 1 day ago

prageeth@DESKTOP-3KD6R77:/mnt/c/Users/prage$ kubectl create -f mysql-service-crd.yaml -n $KUBEPLUS_NS --kubeconfig=kubeplus-saas-provider.json Error from server: error when creating "mysql-service-crd.yaml": admission webhook "platform-as-code.crd-binding.v1" denied the request: Chart https://github.com/cloud-ark/operatorcharts/blob/master/mysqlcluster-stack-0.0.1.tgz?raw=true not found. Use kubectl upload chart to upload the chart first.

devdattakulkarni commented 1 day ago

@Prageeth-Wickramaarachchi As the error points out, you must first upload the chart to KubePlus if you use a local chart. We provide a kubectl plugin to upload local charts to KubePlus. Have you set up KubePlus kubectl plugins in your environment? If not, check the README file for the steps.

Prageeth-Wickramaarachchi commented 1 day ago

@devdattakulkarni I did that too but still unable to create the CRD.

prageeth@DESKTOP-3KD6R77:/mnt/c/Users/prage$ kubectl upload chart hello-world-chart-0.0.2.tgz kubeplus-saas-provider.json prageeth@DESKTOP-3KD6R77:/mnt/c/Users/prage$ kubectl create -f hello-world-resource-composition.yaml -n $KUBEPLUS_NS --kubeconfig=kubeplus-saas-provider.json Error from server: error when creating "hello-world-resource-composition.yaml": admission webhook "platform-as-code.crd-binding.v1" denied the request: Chart not found. Use kubectl upload chart to upload the chart first.

devdattakulkarni commented 1 day ago

@Prageeth-Wickramaarachchi Can you verify the path of the chart (chartURL) in hello-world-resource-composition.yaml is file:///hello-world-chart-0.0.2.tgz ?

Also, can you share the version of KubePlus that you have installed and the version of Kubernetes and how the cluster is created (minikube/kind/cloud provider).

Prageeth-Wickramaarachchi commented 1 day ago

@devdattakulkarni I am using minikube currently

prageeth@DESKTOP-3KD6R77:/mnt/c/Users/prage$ pwd /mnt/c/Users/prage prageeth@DESKTOP-3KD6R77:/mnt/c/Users/prage$ ls /mnt/c/Users/prage/hello-world-resource-composition.yaml /mnt/c/Users/prage/hello-world-resource-composition.yaml prageeth@DESKTOP-3KD6R77:/mnt/c/Users/prage$ ls /mnt/c/Users/prage/hello-world-chart-0.0.2.tgz /mnt/c/Users/prage/hello-world-chart-0.0.2.tgz prageeth@DESKTOP-3KD6R77:/mnt/c/Users/prage$

devdattakulkarni commented 1 day ago

Can you check inside hello-world-resource-composition.yaml and share what you see as the value of the chartURL field?

Prageeth-Wickramaarachchi commented 1 day ago

@devdattakulkarni Initially I used the default charturl given in the repo since it causing errors I download it upload my repo and add the following chaturl chartURL: https://github.com/Prageeth-Wickramaarachchi/kubeplus-charts/blob/main/hello-world-chart-0.0.2.tgz?raw=true

since this also didn't work I used the upload chart plugin when i use that plugin i commented this chaturl and try to create the CRD

devdattakulkarni commented 23 hours ago

Ok, thanks for the details. We will see if we are able to re-create the issue on our side. You might want to join our Slack channel which will be easier for discussion.

Prageeth-Wickramaarachchi commented 23 hours ago

@devdattakulkarni thanks, can you send me an invitation

devdattakulkarni commented 23 hours ago

It is in the main README.. Check towards the end of the README. We are in #kubeplus channel in CNCF workspace.