Simple example for using TypeScript for accessing to Kubernetes.
This script displays namespaces names for default configured context.
We assuming you have a valid ~/.kube/config
file and access to given
Kubernentes cluster.
Installing dependencies for development and building
$ npm install
Compiling:
$ npm run build
Running the script:
$ npm run start
Creating standalone with no dependencies and ready to distribute and run with
node
:
$ npm run bundle
Execute JS code with no dependencies:
node dist/index.js