1.0.13 • Published 5 years ago

kubemotelib v1.0.13

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Kubemote

A compact Kubernetes API library

Installation

npm install git://git@github.com:codefresh-io/kubemote.git

Usage

let remote = new Kubemote();

Will search for a config file using KUBECONFIG environment variable, then in the user's home folder. The context will be derived from its "current-context".

let remote = new Kubemote(Kubemote.CONFIGURATION_FILE({ context: "my-context" }));

Will search the file in the same manner as before, but will use "my-context" as the selected context.

let remote = new Kubemote({
    host: "api.mykube.com",
    port: 8001,
    certificate_authority: [Buffer],
    client_key: [Buffer],
    client_certificate: [Buffer]
});

Will connect according to the manual configuration specified.

The full list of configuration options are:

host port protocol certificate_authority client_key client_certificate username password insecure_tls namespace

Methods

Cluster

getNodes

Returns a list of the cluster's nodes

Discovery

getServices

  • Selector - The label selector

Returns a list of services

Workloads

getPods

  • Selector - The label selector

Returns a list of pods

getPodLogs

  • podName - The name of the pod to retrieve logs for

Returns the logs for a pod

getDeployments

  • Selector - The label selector

Returns a list of deployments

patchDeployment

  • options - name and spec

Updates a deployment

deleteDeployment

Deletes a deployment

createDeployment

Creates a new deployment

createJob

  • jobSpecJson - The job spec

Creates a new job

watchJob

  • options - jobname

Watches a job

deleteJob

  • options - jobname

Deletes a job

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

6 years ago