Closed
Description
Describe the bug
exec_auth spawns the command synchronously.
When the exec command sends information to stdout/stderr to inform the user what to do to authenticate, the program is blocked waiting indefinitely, because the spawn is done synchronously.
** Client Version **
1.0.0-rc7
** Server Version **
Azure 1.29.9
To Reproduce
- Start an Azure cluster with 'Microsoft Entra ID authentication with Kubernetes RBAC' authn & authz
- get the credentials
- do not execute any request to the cluster, so the token is not cached (or you can remove it:
rm ~/.kube/cache/kubelogin/yourID.json
- make a request to the API
- the program is blocked executing the
kubelogin
app, which is blocked, waiting for the user to authenticate
Expected behavior
The call should be done async
bonus: the information provided by kubelogin should be displayed to the user
** Example Code**
import { CoreV1Api, KubeConfig } from "@kubernetes/client-node";
const kc = new KubeConfig();
kc.loadFromDefault();
const k8sApi = kc.makeApiClient(CoreV1Api);
const result = k8sApi.listNamespace();
Environment (please complete the following information):
- OS: MacOS
- NodeJS Version: v20.15.1
- Cloud runtime: Azure
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
No labels