close
The Wayback Machine - https://web.archive.org/web/20201106190017/https://github.com/rancher/k3d/issues/323
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] specify the kube config file as a new flag #323

Open
sgandon opened this issue Aug 7, 2020 · 3 comments
Open

[FEATURE] specify the kube config file as a new flag #323

sgandon opened this issue Aug 7, 2020 · 3 comments
Assignees
Milestone

Comments

@sgandon
Copy link

@sgandon sgandon commented Aug 7, 2020

Scope of your request

this would be nice to have a flag to specify the config file to use when creating a cluster.
I am playing with multiple clusters and I have chosen to use a different config file for each of my clusters. So when I create a cluster I don't want k3d to update the default config file I was using but I'd rather specify the file on the command line.

suggested flag : --kubeconfig

This need to be thought through to make sure all combination of this flag and existing ones that deal with kubeconfig such as --update-default-kubeconfig and --switch-context are not conflicting somehow.

@sgandon sgandon added the enhancement label Aug 7, 2020
@sgandon
Copy link
Author

@sgandon sgandon commented Aug 7, 2020

the only solution I found today it to export the KUBECONFIG environment variable to a file that does not exists and that will be created when the cluster starts but this a bit cumbersome and also make my prompt fail because the file does not exists.

@iwilltry42
Copy link
Collaborator

@iwilltry42 iwilltry42 commented Aug 12, 2020

Hi @sgandon, thanks for opening this issue!
The kubeconfig modifications in the cluster create command are only meant for the most common use cases.
For every other use case, you may want to disable them (like you already do) and then use the k3d kubeconfig <verb> commands to handle kubeconfigs in whatever way you like 👍

@iwilltry42 iwilltry42 self-assigned this Aug 12, 2020
@sgandon
Copy link
Author

@sgandon sgandon commented Aug 12, 2020

@iwilltry42 thanks for you answer.
Indeed that is another possiblity but it requires 2 steps instead of one, hence my proposal.

@iwilltry42 iwilltry42 added this to the 3.2.0 milestone Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.