Skip to content

cannot find module providing package k8s.io/api/resource/v1alpha1 #2336

Closed

Description

@tonyliu666

Hello,folks.when i try to run the codes on [https://pkg.go.dev/sigs.k8s.io/controller-runtime#example-package ](https://pkg.go.dev/sigs.k8s.io/controller-runtime#example-package) and use go build to install modules.I found there was a problem of installing controller-runtime.

Screenshot from 2023-05-22 09-20-16
I found I cannot find module providing package k8s.io/api/resource/v1alpha1.Did anyone face this issue before?please tell me if anyone knows thanks.

Activity

  1. pmalek commented on May 22, 2023

    @pmalek

    I also encountered this issue and what helped me was adding the following exclude to get k8s.io/api to use one of v0.26.x versions

    exclude k8s.io/api v0.27.2
    

    This is related and when that gets released as part of v0.15.0 the example should also be fixed: #2189.

  2. troy0820 commented on Aug 25, 2023

    @troy0820
    Member

    /kind support

    Is this still an issue for you @tonyliu666 ?

  3. troy0820 commented on Sep 19, 2023

    @troy0820
    Member

    Issue has been fixed in above PR link. The example on pkg.go.dev points to k8s.io/api/resource/v1alpha2 with the latest controller-runtime.

    If this issue is still a problem, please reopen this issue.

    /close

  4. k8s-ci-robot commented on Sep 19, 2023

    @k8s-ci-robot
    Contributor

    @troy0820: Closing this issue.

    Details

    In response to this:

    Issue has been fixed in above PR link. The example on pkg.go.dev points to k8s.io/api/resource/v1alpha2 with the latest controller-runtime.

    If this issue is still a problem, please reopen this issue.

    /close

    Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/supportCategorizes issue or PR as a support question.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions