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

civo kubernetes config fails #26

Closed
mladedav opened this issue Sep 7, 2020 · 5 comments
Closed

civo kubernetes config fails #26

mladedav opened this issue Sep 7, 2020 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@mladedav
Copy link

mladedav commented Sep 7, 2020

I tried getting the kubernetes context but the command fails with:

civo kubernetes config <cluster> --merge --switch --save
Merged with main kubernetes config: C:\Users\Username/.kube/config
Error: Saving the cluster config failed with could not remove temporary kubeconfig file: C:\Users\Username\AppData\Local\Temp\civo-temp-311490687, exit status 1

The kubeconfig file was not updated and the temporary file contains only the downloaded cluster information.

@alejandrojnm
Copy link
Member

I tested in windows, but i will check this again, could you tell me what OS you use, and how to reproduce the error

@mladedav
Copy link
Author

Sorry for the late reply. I was using Windows 10 0 18363 0
It still happens for me. I am using Powershell Core 7.0.1. Can't find any way to infer civo cli version (but I installed it the day I opened this so it should be the newest version available at that time). I can't really provide any steps to reproduce, I just downloaded the cli, set up apikey and then tried this and it never worked for me. I just merged the two configs manually after getting the issue.

@mladedav
Copy link
Author

I just checked the code and this seems like the culprit based on the outputs

_, err = exec.Command("powershell", "remove-item", file.Name()).Output()

I tried the same command with the file name provided from the error and it worked just fine when invoked directly from my terminal.

I see the CLI discards the output which is a shame because it could tell us what is happening. I guess this ties into #1 . I have no experience with Go so I don't feel comfortable debugging this on my own at this time

@alejandrojnm
Copy link
Member

alejandrojnm commented Sep 18, 2020

Ok, Thx @mladedav i will check this this weekend

@alejandrojnm alejandrojnm self-assigned this Sep 18, 2020
@alejandrojnm alejandrojnm added the bug Something isn't working label Sep 18, 2020
@alejandrojnm
Copy link
Member

This fix in the release v0.6.38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants