Help needed for the Tutorial on https://book.kubebuilder.io/

41 views
Skip to first unread message

Michael Gaede

unread,
Aug 17, 2022, 6:47:53 AM8/17/22
to kubebuilder
Hello,

i am trying to understand the Kubebuilder Framework. For this i try to go through the Book for the introduction to Kubebuilder.

Unluckily on Point 1.7  i got some errors while i tried to create the Webhooks.
Now i have the Situation i cannot go on and cannot go one step back to solve this Issue.

Hopefully someone can help me. i really wan't to undertand the Kubebuilder approch for building up own Operators.

The error i have is:

tutorial.kubebuilder.io/project/api/v1 imports
    k8s.io/apimachinery/pkg.apis/meta/v1: module k8s.io/apimachinery@latest found (v0.24.3), but does not contain package k8s.io/apimachinery/pkg.apis/meta/v1
Error: failed to create webhook: unable to run post-scaffold tasks of "base.go.kubebuilder.io/v3": exit status 1
Usage:
  kubebuilder create webhook [flags]



Kind Regards
Michael

Camila Macedo

unread,
Aug 17, 2022, 7:07:27 AM8/17/22
to Michael Gaede, kubebuilder
Hi Michael, 

Regards the error: 

The error i have is:
tutorial.kubebuilder.io/project/api/v1 imports
    k8s.io/apimachinery/pkg.apis/meta/v1: module k8s.io/apimachinery@latest found (v0.24.3), but does not contain package k8s.io/apimachinery/pkg.apis/meta/v1
Error: failed to create webhook: unable to run post-scaffold tasks of "base.go.kubebuilder.io/v3": exit status 1
Usage:
  kubebuilder create webhook [flags]

If we create a new project, create the api and then the webhook then, the issue will not occurs. Am I right? 
Therefore, to help you out we need further information i.e:
  • What is the Kubebuilder CLI version used?
  • Could you help us out by proving the steps to reproduce this issue? 
  • Is possible to reproduce it from a project created from the scratch?  If not, what changes do we need to reproduce this one?
  • Can you share the repo for your project so we can try to reproduce the scenario and check it better?  OR Are you using the tutorial sample? 
In this case, could you please create an issue in the repo(https://github.com/kubernetes-sigs/kubebuilder/issues) and provide all info on it?

Also, after tracking the issue with all details wdyt about ping on in the slack channel #kubebuilder under the org kubernetes.slack.com/? So, you might get faster help in an easier way since further questions can be made either. 

I hope that can helps you out. 

Cheers, 

CAMILA MACEDO

SR. SOFTWARE ENGINEER 

RED HAT Operator framework

Red Hat UK

She / Her / Hers

IM: cmacedo

I respect your work-life balance. Therefore there is no need to answer this email out of your office hours.





--
You received this message because you are subscribed to the Google Groups "kubebuilder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubebuilder...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubebuilder/fa8b041b-fdf7-48e4-ad32-56dbd6ac359dn%40googlegroups.com.

Michael Gaede

unread,
Aug 17, 2022, 9:34:26 AM8/17/22
to kubebuilder
Hello Camila,

seems i had a copy paste error somewhere in the code. Now i am over step  creating webhook.

thanks for your fast reply.

Camila Macedo

unread,
Aug 17, 2022, 10:07:42 AM8/17/22
to Michael Gaede, kubebuilder
That is great to know,
Thank you for the feedback.
Reply all
Reply to author
Forward
0 new messages