Open stoked10 opened 2 years ago
I finally figured out a workaround, it's not the greatest though. I basically had to cut the typings out of it:
import pkg from 'kubernetes-client/lib/index';
const kubeconfig = new KubeConfig();
kubeconfig.loadFromCluster();
const backend = new Request({ kubeconfig });
const { Client1_13 } = pkg;
return new Client1_13({ backend, version: '1.13' });
I pulled the code directly from the typescript example in the README:
My only difference is loading the kubeconfig from the cluster:
When I run this typescript gives me an error:
Error initializing client: TypeError: Client is not a constructor
I tried everything I could think of and searched the googles and couldn't come up with anything, any help would be greatly appreciated!
node: 16.15.0 typescript: 4.6.2