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

"Can't connect to the Kubernetes API" should print actual error #461

Open
aep opened this issue Jul 24, 2024 · 1 comment
Open

"Can't connect to the Kubernetes API" should print actual error #461

aep opened this issue Jul 24, 2024 · 1 comment

Comments

@aep
Copy link

aep commented Jul 24, 2024

would be nice if "Can't connect to the Kubernetes API" would print the actual error instead.

logger.log("Can't connect to the Kubernetes API", 'ERROR');

unfortunately its just eaten here

@aep
Copy link
Author

aep commented Jul 24, 2024

but for anyone finding this issue and wondering what to do:

k exec -ti  flame-0 -- /bin/sh  
/app # node
Welcome to Node.js v16.20.1.
Type ".help" for more information.

const k8s = require('@kubernetes/client-node');
const kc = new k8s.KubeConfig();
kc.loadFromCluster();
const k8sNetworkingV1Api = kc.makeApiClient(k8s.NetworkingV1Api);
await k8sNetworkingV1Api.listIngressForAllNamespaces().then((res) => {
 ingresses = res.body.items;
});

this will print the actual error. in my case it was an incorrect rbac

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

No branches or pull requests

1 participant