-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Add remote support for SSH and TLS docker contexts #20981
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
Conversation
CLA Signed
The committers listed above are authorized under a signed CLA.
- ✅ login: medyagh / name: Medya Ghazizadeh (0483850)
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: einyx
Once this PR has been reviewed and has the lgtm label, please assign spowelljr for approval. For more information see the Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
Welcome @einyx!
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. 😃
Hi @einyx. 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.
Can one of the admins verify this patch?
96de3d5
to
a1ec633
Compare
@einyx interessting PR ! I am curious do you mind sharing what are your use cases, why did you think about using a remote context ?
0b4a985
to
c8b67f6
Compare
Hi @medyagh!
The motivation here is that selfishly I frequently work across multiple machines,
mostly a decent Linux workstation and a more modests Mac Mini and Macbook.
Since my Linux workstation has significantly more resources (CPU, RAM, etc.),
I use it as a remote docker host for resource-intensive builds, distcc and generally for compute.
Use cases this enables:
- Developers on lightweight laptops can provision minikube clusters on more powerful remote machines
- Teams can share development infrastructure while maintaining isolated minikube environments
- I use Terraform to interact with minikube, which this makes even more convenient for extra compute
Attached log from latest minikube run over TLS docker context:
log1.txt
Happy to discuss any concerns or alternative approaches!
/ok-to-test
Hi @medyagh!
The motivation here is that selfishly I frequently work across multiple machines, mostly a decent Linux workstation and a more modests Mac Mini and Macbook.
Since my Linux workstation has significantly more resources (CPU, RAM, etc.), I use it as a remote docker host for resource-intensive builds, distcc and generally for compute.
Use cases this enables:
- Developers on lightweight laptops can provision minikube clusters on more powerful remote machines
- Teams can share development infrastructure while maintaining isolated minikube environments
- I use Terraform to interact with minikube, which this makes even more convenient for extra compute
Attached log from latest minikube run over TLS docker context: log1.txt
Happy to discuss any concerns or alternative approaches!
thank you that makes sense ! I am curious have you tried it on only mac ? does it also work on linux to linux or windows to linux ?
if this opens any "remote listening" on minikube vm ?
d956355
to
66f099f
Compare
/retest
The following users are mentioned in OWNERS file(s) but are untrusted for the following reasons. One way to make the user trusted is to add them as members of the kubernetes org. You can then trigger verification by writing /verify-owners
in a comment.
- nirs
- User is not a member of the org. Satisfy at least one of these conditions to make the user trusted.
Hi @medyagh!
The motivation here is that selfishly I frequently work across multiple machines, mostly a decent Linux workstation and a more modests Mac Mini and Macbook.
Since my Linux workstation has significantly more resources (CPU, RAM, etc.), I use it as a remote docker host for resource-intensive builds, distcc and generally for compute.
Use cases this enables:
- Developers on lightweight laptops can provision minikube clusters on more powerful remote machines
- Teams can share development infrastructure while maintaining isolated minikube environments
- I use Terraform to interact with minikube, which this makes even more convenient for extra compute
Attached log from latest minikube run over TLS docker context: log1.txt
Happy to discuss any concerns or alternative approaches!thank you that makes sense ! I am curious have you tried it on only mac ? does it also work on linux to linux or windows to linux ?
if this opens any "remote listening" on minikube vm ?
Hi @medyagh!
Currently yes,
When using remote Docker contexts or external Docker hosts, it configures the remote to listen on 0.0.0.0
(as I use multiple interface I found this useful) how would you approach the selection here for the user otherwise?
This is explicitly warned about in the code with a user-visible warning only when a remote context is detected:
"Listening to 0.0.0.0 on {{.host}}. Please be advised"
We could potentially add a detection mechanism for the remote docker daemon or let the user decide with a flag
I personally don't like the SSH implementation for production use, is something I did initially for easy of use and is nice to have, maybe, but I am happy to amend as you see fit, admittedly TLS is much more solid and performant for this so I stopped using the SSH remote context myself after a while.
Can test this on a vm and get back to you soon.
Cheers!
PR needs rebase.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@einyx thanks for your patience, could you please add a follow example of using this feature in the PR description
including setting up the Docker remote contexts and the output so I can decide better ?
and also plz rebase the PR for the merge conflict, thanks
@einyx once examples added and merge conflict fixed, we could fit it not in this release (coming days) but the one after that
@einyx: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
Uh oh!
There was an error while loading. Please reload this page.
This PR extends the existing remote Docker context support to handle TLS-secured Docker daemons, enabling minikube to work with both SSH and TLS remote Docker contexts.
TLS Certificate Management (
pkg/drivers/kic/oci/context.go
):Connection Routing (
pkg/drivers/kic/kic.go
):Environment Configuration:
DOCKER_TLS_VERIFY=1
andDOCKER_CERT_PATH
for TLS contextsTesting: