Goyoo / node-k8s-client

kubernetes client of node.js
MIT License
164 stars 59 forks source link

Added ability to configure kubectl via kubeconfig rather than point a… #2

Closed timcrider closed 8 years ago

timcrider commented 8 years ago

…t an endpoint.

var k = require('k8s');

// Configure using endpoint
var kube = k.kubectl({
    endpoint: 'http://my-cluster'
    ,binary: '/bin/kubectl'
    ,version: 'v1'
});

// Configure using kubeconfig
var kube = k.kubectl({
    binary: '/bin/kubectl'
    ,kubeconfig: '/etc/cluster1.yaml'
    ,version: 'v1'
});