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

Is it possible to select network interface(eth0, eth1, ens192 etc.) in none driver? #15102

Closed
m18unet opened this issue Oct 11, 2022 · 13 comments
Labels
co/none-driver kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@m18unet
Copy link

m18unet commented Oct 11, 2022

What Happened?

I have two network interfaces on my computer. Their names are eth0 and eth1.

+--------------------------------------------------+
|                     My Computer                  |
|                                                  |
|  eth0                                       eth1 |
|   +                                          +   |
+--------------------------------------------------+
    |                                          |
    |                                          |
    |                                          |
    |                                          |
    v                                          v
10.10.22.50                               192.168.29.50
(minikube selects it automatically)       (I want you to select this)

eth0 network interface is selected automatically when I start minikube with the following command: (I prefer none driver for some special reasons.)

$ sudo -E minikube start \
  --driver=none \
  --kubernetes-version=1.24.3 \
  --container-runtime=docker \
$ minikube ip
10.10.22.50

I want to select eth1 network interface(192.168.29.50). Is this possible?

Attach the log file

N/A

Operating System

Ubuntu

Driver

--driver=none

@RA489
Copy link

RA489 commented Oct 28, 2022

/kind support

@k8s-ci-robot k8s-ci-robot added the kind/support Categorizes issue or PR as a support question. label Oct 28, 2022
@vonProteus
Copy link

vonProteus commented Dec 13, 2022

I would also like to know the answer to this question
@m18unet did you find a solution to this problem?

@afbjorklund
Copy link
Collaborator

afbjorklund commented Dec 13, 2022

Currently the node IP comes from ChooseHostInterface, which I think chooses the one with the gateway.

// GetIP returns an IP or hostname that this host is available at
func (d *Driver) GetIP() (string, error) {
        ip, err := knet.ChooseHostInterface()
        if err != nil {
                return "", err
        }
        return ip.String(), nil
}

https://pkg.go.dev/k8s.io/apimachinery@v0.25.3/pkg/util/net#ChooseHostInterface

In the original docker-machine, it was a flag (confusingly called --url)

@m18unet
Copy link
Author

m18unet commented Dec 13, 2022

I would also like to know the answer to this question
@m18unet did you find a solution to this problem?

@vonProteus

Unfortunately, I couldn't find a solution.

@m18unet
Copy link
Author

m18unet commented Dec 13, 2022

Currently the node IP comes from ChooseHostInterface, which I think chooses the one with the gateway.

// GetIP returns an IP or hostname that this host is available at
func (d *Driver) GetIP() (string, error) {
        ip, err := knet.ChooseHostInterface()
        if err != nil {
                return "", err
        }
        return ip.String(), nil
}

https://pkg.go.dev/k8s.io/apimachinery@v0.25.3/pkg/util/net#ChooseHostInterface

In the original docker-machine, it was a flag (confusingly called --url)

@afbjorklund

Thank you very much for your reply. I don't think there is a solution for now. Am I right?

@afbjorklund
Copy link
Collaborator

afbjorklund commented Dec 14, 2022

Only workarounds*, as far as I know. All flags are hardcoded in the minikube "registry"

So it needs to have a new flag for the IP, and then propagate that to the "none2" driver:

@afbjorklund afbjorklund added kind/feature Categorizes issue or PR as related to a new feature. co/none-driver and removed kind/support Categorizes issue or PR as a support question. labels Dec 14, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 14, 2023
@m18unet
Copy link
Author

m18unet commented Mar 16, 2023

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 16, 2023
@m18unet
Copy link
Author

m18unet commented Jun 13, 2023

Anything worth noting?

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 22, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 21, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

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.

@k8s-ci-robot k8s-ci-robot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/none-driver kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

6 participants