A compact Kubernetes API library
npm install git://[email protected]:codefresh-io/kubemote.git
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
Returns a list of the cluster's nodes
- Selector - The label selector
Returns a list of services
- Selector - The label selector
Returns a list of pods
- podName - The name of the pod to retrieve logs for
Returns the logs for a pod
- Selector - The label selector
Returns a list of deployments
- options -
name
andspec
Updates a deployment
Deletes a deployment
Creates a new deployment
- jobSpecJson - The job spec
Creates a new job
- options -
jobname
Watches a job
- options -
jobname
Deletes a job