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
Cannot connect to Azure kubernetes cluster using c# sdk #1480
Comments
could you please paste any error you saw? |
I do not see any error, the code just hangs and I just see messages with thread exited in output window |
kubelogin in kubeconfig? |
kuebconfig |
i mean are you using kubelogin? most likely caused by waiting for stdin |
I am not using kubelogin. I am just using kubeconfig to connect to cluster and check the namespace |
what should i do if the process is waiting for stdin? I verified there is no kubelogin in kubeconfg file |
could you please share your kubeconfig? remove all sensitive info before paste |
apiVersion: v1
|
any update here ? @tg123 |
cant repro, could you please do a dump to see what stuck? |
I'm having similar problem . Trying to get a list of namespaces of a microk8s remote server. Using code from example in project page:
It just hangs with no error in that last line of code. Tried in .net7 and .net framework 4.8 (classic lib) versions. Same thing on both. Also tried with multiple servers running microk8s 1.26, same thing on all of them. |
exactly same place where my code is stuck too. I am totally blocked by this. |
please see #1523, i added an example and the code was used for long time in production env |
@tg123 The example you provided is using |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
Describe the bug
A clear and concise description of what the bug is.
Kubernetes C# SDK Client Version
e.g.
12.1.1
Server Kubernetes Version
e.g.
1.25.5
Dotnet Runtime Version
e.g. net6
To Reproduce
Following this doc: https://github.com/kubernetes-client/csharp/blob/master/README.md
var namespaces = client.CoreV1.ListNamespace();
foreach (var ns in namespaces.Items) {
Console.WriteLine(ns.Metadata.Name);
var list = client.CoreV1.ListNamespacedPod(ns.Metadata.Name);
foreach (var item in list.Items)
{
Console.WriteLine(item.Metadata.Name);
}
}
The above code does not work on the line : var namespaces = client.CoreV1.ListNamespace();
Code/visual studio 2022 hangs there
I am using this c# kubernetes client library with client.CoreV1.ListNamespace(); I tried setting KUBECTL_PROXY and updating the host to http: //proxyip:8001 and I am not using kube login. code execution stops at the above line and my visual studio 2022 hangs and I see messages thread exited in the output window. I can get all the details by connecting to cluster using kubectl commands in the terminal window. but not through c# libraray.
Expected behavior
expect to list namespaces
KubeConfig
normal AKS kube config file , which I can be able to connect using kubectl
Where do you run your app with Kubernetes SDK (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: