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

[Feature] Choose random API Port by default #279

Merged
merged 3 commits into from
Jun 12, 2020

Conversation

iwilltry42
Copy link
Member

If no --api-port was specified or it's set to random, we will now try to get a random free port from the OS/Kernel and use that one. If this fails, we'll fallback to the default (6443), just to at least have a chance.

Benefits:
k3d create cluster one && k3d create cluster two works without having to worry about choosing free ports to avoid port collisions.

- this makes it easier to create multiple clusters without having to
worry about choosing a different port every time
- This is for you @ibuildthecloud ;)
... instead of leaving this up to docker, since then we don't know about
it when creating the labels, etc. used e.g. for updating the kubeconfig with
the correct port
@iwilltry42 iwilltry42 added enhancement New feature or request v3 labels Jun 12, 2020
@iwilltry42 iwilltry42 self-assigned this Jun 12, 2020
@iwilltry42 iwilltry42 added this to the v3.0 - FROM scratch milestone Jun 12, 2020
@iwilltry42 iwilltry42 merged commit 178fe6d into master Jun 12, 2020
@iwilltry42 iwilltry42 deleted the feature/random-api-port branch June 12, 2020 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant