Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚠️ Action Required: Replace Deprecated gcr.io/kubebuilder/kube-rbac-proxy #1905

Closed
camilamacedo86 opened this issue Nov 30, 2024 · 3 comments · Fixed by #1913
Closed
Assignees

Comments

@camilamacedo86
Copy link

Description

⚠️ The image gcr.io/kubebuilder/kube-rbac-proxy is deprecated and will become unavailable.
You must move as soon as possible, sometime from early 2025, the GCR will go away.

Unfortunately, we're unable to provide any guarantees regarding timelines or potential extensions at this time. Images provided under GRC will be unavailable from March 18, 2025, as per announcement. However, gcr.io/kubebuilder/may be unavailable before this date due to efforts to deprecate infrastructure.

  • If your project uses gcr.io/kubebuilder/kube-rbac-proxy, it will be affected.
    Your project may fail to work if the image cannot be pulled. You must take action as soon as possible.

  • However, if your project is no longer using this image, no action is required, and you can close this issue.

Using the image gcr.io/kubebuilder/kube-rbac-proxy?

kube-rbac-proxy was historically used to protect the metrics endpoint. However, its usage has been discontinued in Kubebuilder. The default scaffold now leverages the WithAuthenticationAndAuthorization feature provided by Controller-Runtime.

This feature provides integrated support for securing metrics endpoints by embedding authentication (authn) and authorization (authz) mechanisms directly into the controller manager's metrics server, replacing the need for (https://github.com/brancz/kube-rbac-proxy) to secure metrics endpoints.

What To Do?

You must replace the deprecated image gcr.io/kubebuilder/kube-rbac-proxy with an alternative approach. For example:

  • Update your project to use WithAuthenticationAndAuthorization:

    You can fully upgrade your project to use the latest scaffolds provided by the tool or manually make the necessary changes. Refer to the FAQ and Discussion for detailed instructions on how to manually update your project and test the changes.

  • Alternatively, replace the image with another trusted source at your own risk, as its usage has been discontinued in Kubebuilder.

For further information, suggestions, and guidance:

NOTE: This issue was opened automatically as part of our efforts to identify projects that might be affected and to raise awareness about this change within the community. If your project is no longer using this image, feel free to close this issue.

We sincerely apologize for any inconvenience this may cause.

Thank you for your cooperation and understanding! 🙏

@abhashsolanki18
Copy link

/assign @daemon1024 @rksharma95 @camilamacedo86

To address the deprecation of gcr.io/kubebuilder/kube-rbac-proxy, I propose the following options to move forward:

  1. Migrate to WithAuthenticationAndAuthorization:

    • This approach leverages the Controller-Runtime's built-in support for authentication and authorization to secure metrics endpoints.
    • It aligns with the latest scaffolding recommendations from Kubebuilder, eliminating the need for external tools like kube-rbac-proxy.
  2. Replace the Image:

    • If an immediate upgrade is not feasible, we can replace the deprecated image with a trusted alternative, such as quay.io/brancz/kube-rbac-proxy:latest.
    • This would ensure continuity while we plan for a more comprehensive migration.

Could you please confirm which approach you'd prefer to proceed with? Additionally, if there are any specific constraints or considerations for the project, let me know so I can factor them into the implementation.

Looking forward to your guidance!

@camilamacedo86
Copy link
Author

Hi @abhashsolanki18,

Thank you for looking into that. As described in: kubernetes-sigs/kubebuilder#3907

The best option to move forward is by adopting WithAuthenticationAndAuthorization with the following recommended steps:

  • You can upgrade your project to the latest release by re-scaffolding it and reintegrating your custom code. (regenerate all with the latest version of the tool and then add your code back on top again using an IDE for example)

You can use kubebuilder alpha generate to regenerate the project from the PROJECT config.
This ensures a default implementation (similar to kube-rbac-proxy) with options to improve production readiness, such as configuring certificates securely. This approach also allows you to take advantage of other improvements, bug fixes, and the latest updates.

  • If you are unable to do that:

Check out the FAQ section: "How can I manually change my project to switch to Controller-Runtime's built-in auth protection?" for detailed instructions.

Please, let me know if you need any further information or help to move forward here.

@rksharma95
Copy link
Collaborator

@camilamacedo86 @abhashsolanki18 thanks for reporting this issue 🙌 . we're looking into the suggested solutions. will let you know if any help needed. thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants