KEMBAR78
Deprecate HyperKit driver with warning by divysinghvi · Pull Request #21024 · kubernetes/minikube · GitHub
Skip to content

Conversation

@divysinghvi
Copy link
Contributor

This PR deprecates the HyperKit driver by displaying a user-facing warning when it is selected via --driver=hyperkit.

  • Warns users that HyperKit is deprecated and may be removed in future releases.
  • Suggests using alternative drivers such as docker, qemu, or vfkit.
  • Includes documentation links for migration.

Partially addresses #21012

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 3, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jul 3, 2025
@k8s-ci-robot k8s-ci-robot requested review from medyagh and prezha July 3, 2025 14:16
@k8s-ci-robot
Copy link
Contributor

Welcome @divysinghvi!

It looks like this is your first PR to kubernetes/minikube 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/minikube has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @divysinghvi. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 3, 2025
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jul 3, 2025
Copy link
Contributor

@nirs nirs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warning looks good, but we also need to mark the driver.Priority to Deprecated in pkg/minikube/registry/drvs/hyperkit/hyperkit.go.

return
}
out.WarningT(`The 'hyperkit' driver is deprecated and will be removed in a future release.
Please consider using an alternative driver such as 'docker', 'qemu', or 'vfkit'.`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The preferred driver for macOS is vfkit, and then qemu. docker requires docker desktop which is not open source, so we should not recommend it.

So let's use "such as vfkit, qemu, or docker"

Copy link
Collaborator

@afbjorklund afbjorklund Jul 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kubernetes project does not have a problem with recommending using Docker in various places, though.

@nirs
Copy link
Contributor

nirs commented Jul 3, 2025

@divysinghvi I think this change can fix #21012. We don't need to do any other change now. The driver build works, and we want to remove it later, but for now marking it as depracated and recommending other drivers is all we need to do.

We also need to update hyperkit docs:
site/content/en/docs/drivers/hyperkit.md

It should have as similar warning that the driver will be removed in future version and recommend other drivers, linking to the other drivers docs.

@divysinghvi
Copy link
Contributor Author

@nirs Thanks a lot for your help! 🙌
I've applied the suggested changes.

Regarding the HyperKit documentation — I’d be happy to work on it and add a similar warning to that too

@divysinghvi
Copy link
Contributor Author

@nirs While working on this, I noticed that the VirtualBox driver documentation page also does not mention that the driver is deprecated: https://minikube.sigs.k8s.io/docs/drivers/virtualbox/.

It might be helpful to update that page as well.

suggestedDriver := driver.HyperKit
suggestedDriver := driver.VFKit
if runtime.GOARCH == "arm64" {
suggestedDriver = driver.QEMU
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong, vfkit is the preferred driver on both arm64 and amd64.

}
out.WarningT(`The 'hyperkit' driver is deprecated and will be removed in a future release.
Please consider using an alternative driver such as 'docker', 'qemu', or 'vfkit'.`)
Please consider using an alternative driver such as vfkit, qemu, or docker`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep the quoting, unless most other warnings do not quote driver names.

suggestedDriver := driver.VFKit
if runtime.GOARCH == "arm64" {
suggestedDriver = driver.QEMU
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to update the warning bellow - it says:

You can use alternative drivers such as docker or {{.driver}}.
https://minikube.sigs.k8s.io/docs/drivers/docker/
https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}/

It should say:

You can use alternative drivers such as vfkit, qemu, or docker.
https://minikube.sigs.k8s.io/docs/drivers/vfkit/
https://minikube.sigs.k8s.io/docs/drivers/qemu/
https://minikube.sigs.k8s.io/docs/drivers/docker/

return
}
suggestedDriver := driver.HyperKit
suggestedDriver := driver.VFKit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also remove this variable and the {{.driver}} template, since we don't need to select a driver based on arch, and we have several recommendations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay so i will change it to list it like you suggested
You can use alternative drivers such as vfkit, qemu, or docker. https://minikube.sigs.k8s.io/docs/drivers/vfkit/ https://minikube.sigs.k8s.io/docs/drivers/qemu/ https://minikube.sigs.k8s.io/docs/drivers/docker/
i will also add this to HyperKit warning too

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 3, 2025
@nirs
Copy link
Contributor

nirs commented Jul 3, 2025

The warning looks good, but we also need to mark the driver.Priority to Deprecated in pkg/minikube/registry/drvs/hyperkit/hyperkit.go.

@divysinghvi did you miss this comment?

@divysinghvi
Copy link
Contributor Author

@nirs You're right — I missed that, apologies! I'll update driver.Priority to Deprecated in pkg/minikube/registry/drvs/hyperkit/hyperkit.go and push the change shortly. Thanks for pointing it out!

@nirs
Copy link
Contributor

nirs commented Jul 5, 2025

/lgtm

@k8s-ci-robot
Copy link
Contributor

@nirs: changing LGTM is restricted to collaborators

In response to this:

/lgtm

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-sigs/prow repository.

@divysinghvi divysinghvi requested a review from medyagh July 9, 2025 11:42
@medyagh
Copy link
Member

medyagh commented Jul 14, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 14, 2025
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 21024) |
+----------------+----------+---------------------+
| minikube start | 50.9s    | 50.9s               |
| enable ingress | 15.0s    | 15.9s               |
+----------------+----------+---------------------+

Times for minikube start: 52.3s 51.5s 51.5s 51.1s 47.9s
Times for minikube (PR 21024) start: 51.2s 52.5s 50.0s 50.8s 50.0s

Times for minikube ingress: 15.0s 15.0s 14.5s 15.5s 15.0s
Times for minikube (PR 21024) ingress: 15.1s 15.0s 19.5s 15.5s 14.5s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 21024) |
+----------------+----------+---------------------+
| minikube start | 23.8s    | 23.2s               |
| enable ingress | 12.8s    | 13.0s               |
+----------------+----------+---------------------+

Times for minikube start: 23.6s 23.4s 23.5s 23.0s 25.5s
Times for minikube (PR 21024) start: 22.2s 25.8s 22.4s 22.3s 23.4s

Times for minikube ingress: 13.8s 13.3s 13.3s 12.3s 11.3s
Times for minikube (PR 21024) ingress: 12.3s 13.3s 12.8s 13.3s 13.3s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 21024) |
+----------------+----------+---------------------+
| minikube start | 22.2s    | 23.0s               |
| enable ingress | 27.4s    | 26.6s               |
+----------------+----------+---------------------+

Times for minikube ingress: 23.8s 39.8s 22.8s 22.8s 27.8s
Times for minikube (PR 21024) ingress: 39.8s 23.8s 23.8s 22.9s 22.8s

Times for minikube (PR 21024) start: 24.2s 21.7s 22.4s 25.5s 21.4s
Times for minikube start: 20.8s 24.2s 22.5s 21.8s 21.8s

@medyagh
Copy link
Member

medyagh commented Jul 14, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 14, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afbjorklund, divysinghvi, medyagh, nirs

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 14, 2025
@medyagh
Copy link
Member

medyagh commented Jul 14, 2025

@divysinghvi thank you for this contribution, look forward to see more :)

@medyagh medyagh merged commit 2a49119 into kubernetes:master Jul 14, 2025
29 of 37 checks passed
@divysinghvi
Copy link
Contributor Author

Thanks @medyagh @nirs for helping me with this PR looking forward to making a lot more contributions to minikube in future :)

@divysinghvi divysinghvi deleted the deprecate-hyperkit branch July 15, 2025 03:47
pavansaikrishna78 pushed a commit to pavansaikrishna78/minikube that referenced this pull request Aug 18, 2025
* deprecate hyperkit driver with user-facing warning

* apply review suggestions from PR kubernetes#21024

* apply review suggestions from PR kubernetes#21024

* apply review suggestions from PR kubernetes#21024-updating registery priority
pavansaikrishna78 pushed a commit to pavansaikrishna78/minikube that referenced this pull request Sep 9, 2025
* deprecate hyperkit driver with user-facing warning

* apply review suggestions from PR kubernetes#21024

* apply review suggestions from PR kubernetes#21024

* apply review suggestions from PR kubernetes#21024-updating registery priority
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants