new NodesEndpoint()
Kubernetes API Endpoint for Nodes
Define a new NodesEndpoint
object.
Extends
Members
-
client :module:client.KubernetesClient
-
Reference to the parent client object
Type:
- Inherited From:
-
<nullable> options :object
-
Endpoint option overrides
Type:
- object
- Inherited From:
-
resource :string
-
Server resource name
Type:
- string
- Inherited From:
Methods
-
create(body, opts, next) → {Promise.<KubernetesResource>}
-
Create new resource on the API server
Corresponds to the 'POST' http method.
This:
Parameters:
Name Type Argument Description body
KubernetesResource | * Resource object to send
opts
object <optional>
<nullable>
Method options
next
function | * <optional>
Node.js callback (replaces Promise output)
- Inherited From:
Returns:
- Type
- Promise.<KubernetesResource>
-
delete(query, opts, next) → {Promise.<KubernetesResource>}
-
Delete resource on the API server
Corresponds to the 'DELETE' http method.
This:
Parameters:
Name Type Argument Description query
string Server resource resource
opts
object <optional>
<nullable>
Method options
next
function | * <optional>
Node.js callback (replaces Promise output)
- Inherited From:
Returns:
- Type
- Promise.<KubernetesResource>
-
deletePods(query, opts, next) → {Promise.<KubernetesList>}
-
Delete all pods on the given node
Parameters:
Name Type Argument Description query
string Server resource resource
opts
object <optional>
<nullable>
Method options
next
function | * <optional>
Node.js callback (replaces Promise output)
Returns:
- Resolves to the response body from the API server
- Type
- Promise.<KubernetesList>
-
evacuate(query, opts, next) → {Promise.<KubernetesResource>}
-
Remove a node from the scheduling pool and remove its pods
Parameters:
Name Type Argument Description query
string Server resource resource
opts
object <optional>
<nullable>
Method options
next
function | * <optional>
Node.js callback (replaces Promise output)
Returns:
- Resolves to the response body from the API server
- Type
- Promise.<KubernetesResource>
-
get(query, opts, next) → {Promise.<(KubernetesResource|KubernetesList)>}
-
Request resources from the API server
Corresponds to the 'GET' http method.
Missing parameters can be stripped from the beginning of the parameter list and will be checked for type appropriately. If
query
is not defined, the returnedPromise
will be for a KubernetesList. Otherwise it will be aPromise
for a KubernetesResource.This:
Parameters:
Name Type Argument Description query
string <optional>
<nullable>
Server resource name
opts
object <optional>
<nullable>
Method options
next
function | * <optional>
Node.js callback (replaces Promise output)
- Inherited From:
Returns:
- Type
- Promise.<(KubernetesResource|KubernetesList)>
-
getPods(query, opts, next) → {Promise.<KubernetesList>}
-
Find all pods running on the given node
Parameters:
Name Type Argument Description query
string Server resource resource
opts
object <optional>
<nullable>
Method options
next
function | * <optional>
Node.js callback (replaces Promise output)
Returns:
- Resolves to the response body from the API server
- Type
- Promise.<KubernetesList>
-
patch(query, body, opts, next) → {Promise.<KubernetesResource>}
-
Partially update resource on the API server
Corresponds to the 'PATCH' http method.
Currently only the
application/strategic-merge-patch+json
content type is supported by default, but other types may be used by manually setting theContent-Type
header in the method options.This:
Parameters:
Name Type Argument Description query
string Server resource resource
body
object Resource patch to send
opts
object <optional>
<nullable>
Method options
next
function | * <optional>
Node.js callback (replaces Promise output)
- Inherited From:
Returns:
- Type
- Promise.<KubernetesResource>
-
patchPods(query, body, opts, next) → {Promise.<KubernetesList>}
-
Apply the same patch to all pods on a node
Parameters:
Name Type Argument Description query
string Server resource resource
body
object The patch object to apply
opts
object <optional>
<nullable>
Method options
next
function | * <optional>
Node.js callback (replaces Promise output)
Returns:
- Resolves to the response body from the API server
- Type
- Promise.<KubernetesList>
-
schedule(query, opts, next) → {Promise.<KubernetesResource>}
-
Define a node as schedulable by the API server
Parameters:
Name Type Argument Description query
string Server resource name
opts
object <optional>
<nullable>
Method options
next
function | * <optional>
Node.js callback (replaces Promise output)
Returns:
- Resolves to the response body from the API server
- Type
- Promise.<KubernetesResource>
-
update(query, body, opts, next) → {Promise.<KubernetesResource>}
-
Update resource on the API server
Corresponds to the 'PUT' http method.
This:
Parameters:
Name Type Argument Description query
string Server resource resource
body
KubernetesResource | * Resource object to send
opts
object <optional>
<nullable>
Method options
next
function | * <optional>
Node.js callback (replaces Promise output)
- Inherited From:
Returns:
- Type
- Promise.<KubernetesResource>
-
watch(query, opts, next) → {module.endpoints~WatchEmitter}
-
Watch server resource(s) for changes
Corresponds to the 'GET' http method with the
watch
query parameter set.Gets the current state of the requested resources and returns a custom event emitter (see below) with the current state set to the
initialState
property. Watch events will not be received until thestart
method is called on the emitter. This allows the user to define all event listeners before requesting events from the API server and prevent events from being missed during the initial setup.Missing parameters can be stripped from the beginning of the parameter list and will be checked for type appropriately. If query is not defined, the watched resource will be a KubernetesList. Otherwise it will be a KubernetesResource.
This:
Parameters:
Name Type Argument Description query
string <optional>
<nullable>
Server resource resource
opts
object | * <optional>
Method options
Properties
Name Type Argument Default Description verbose
boolean <optional>
false Return full response instead of body only
child
string <optional>
<nullable>
Name of nested child resource
next
function | * <optional>
Node.js callback (replaces Promise output)
- Inherited From:
Returns:
- Type
- module.endpoints~WatchEmitter