Skip to content

Accessing to Kubernetes cluster using TypeScript

Notifications You must be signed in to change notification settings

bsnux/k8listns-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k8listns-ts

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.

Setup

Installing dependencies for development and building

$ npm install

Compiling and running

Compiling:

$ npm run build

Running the script:

$ npm run start

JS code generation

Creating standalone with no dependencies and ready to distribute and run with node:

$ npm run bundle

Usage

Execute JS code with no dependencies:

node dist/index.js