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

Expose exec Standard error #1266

Closed
IvanJosipovic opened this issue Apr 17, 2023 · 1 comment · Fixed by #1267
Closed

Expose exec Standard error #1266

IvanJosipovic opened this issue Apr 17, 2023 · 1 comment · Fixed by #1267

Comments

@IvanJosipovic
Copy link
Contributor

IvanJosipovic commented Apr 17, 2023

Describe the bug
When connecting to a new Azure AKS instance, kubelogin exposes a URL that we must open. I think we have to somehow expose this in the client so the user can interact with the URL as needed. Kubelogin exposes this output as Standard Error.
image

Kubernetes C# SDK Client Version
10.1.19

Server Kubernetes Version
1.25.4

Dotnet Runtime Version
net6

To Reproduce
Steps to reproduce the behavior:
Install Azure CLI

az aks get-credentials --resource-group $ResourceGroup --name $Name --subscription $Subscription

Load Kubeconfig with the client and attempt to list Pods etc.

Expected behavior
Client should expose standard error for exec and keep the process open and allow us view the output.

Where do you run your app with Kubernetes SDK (please complete the following information):

  • OS: Windows
  • Cloud: Azure
@IvanJosipovic
Copy link
Contributor Author

IvanJosipovic commented Apr 17, 2023

It appears that there is code in this library that should handle this scenario. However, it appears that its hanging on

var stdout = process.StandardOutput.ReadToEnd();
var stderr = process.StandardError.ReadToEnd();

See PR fix here, #1267

Its also worth noting that due to the blocking above, the following line doesn't appear work. This is actually a good thing as the user needs time to go through the auth flow that is required by AKS.

// Wait for a maximum of 5 seconds, if a response takes longer probably something went wrong...
process.WaitForExit(5);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant