Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including openshift-config-loader with all npm packages installed. Try it out:

var openshiftConfigLoader = require("openshift-config-loader")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

openshift-config-loader v0.4.0

Loading of Openshift configurations

Build Status Coverage Status

Openshift Config Loader

Greenkeeper badge

Node.js based client for loading an Openshift config file.

Defaults to the ~/.kube/config file

Example Usage

Install the dependecy

npm install openshift-config-loader


'use strict';

const openshiftConfigLoader = require('openshift-config-loader');

openshiftConfigLoader().then((config) => {

How It Works

First, the config loader will look, by default, a file named ~/.kube/config . If it can't find it, then the config loader will try loading the config as a service account.

You can turn off the service account lookup by either passing an options object with the property options.tryServiceAccount equal to false or set an environment variable named KUBERNETES_AUTH_TRYSERVICEACCOUNT equal to false

For Example:

const options = {
  tryServiceAccount: false

openshiftConfigLoader(options).then((config) => {


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free