🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

kubemotelib

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kubemotelib

Kubernetes API Client for node.js

latest
npmnpm
Version
1.0.13
Version published
Weekly downloads
27
575%
Maintainers
2
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 22 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts