Service
createNamespacedService
V1Service createNamespacedService(body)
create a Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiCreateNamespacedServiceRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiCreateNamespacedServiceRequest = {
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
body: { apiVersion: "v1", kind: "Service", metadata: { name: "example" }, spec: { selector: { app: "example" }, ports: [{ port: 80 }] } }, // See full type: /models/core#v1service,
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
// fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional)
fieldManager: "fieldManager_example",
// ...1 more optional parameter(s)
};
const data = await apiInstance.createNamespacedService(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | V1Service | ||
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| fieldManager | [string] | fieldManager is a name associated with the actor or entity that is making these changes. More info | (optional) defaults to undefined |
| fieldValidation | [string] | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. More info | (optional) defaults to undefined |
Return type
readNamespacedService
V1Service readNamespacedService()
read the specified Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiReadNamespacedServiceRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiReadNamespacedServiceRequest = {
// name of the Service
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
};
const data = await apiInstance.readNamespacedService(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | name of the Service | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
Return type
listNamespacedService
V1ServiceList listNamespacedService()
list or watch objects of kind Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiListNamespacedServiceRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiListNamespacedServiceRequest = {
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. (optional)
allowWatchBookmarks: true,
// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional)
_continue: "continue_example",
// ...8 more optional parameter(s)
};
const data = await apiInstance.listNamespacedService(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| allowWatchBookmarks | [boolean] | allowWatchBookmarks requests watch events with type "BOOKMARK". More info | (optional) defaults to undefined |
| _continue | [string] | The continue option should be set when retrieving more results from the server. More info | (optional) defaults to undefined |
| fieldSelector | [string] | A selector to restrict the list of returned objects by their fields. Defaults to everything. More info | (optional) defaults to undefined |
| labelSelector | [string] | A selector to restrict the list of returned objects by their labels. Defaults to everything. More info | (optional) defaults to undefined |
| limit | [number] | limit is a maximum number of responses to return for a list call. More info | (optional) defaults to undefined |
| resourceVersion | [string] | resourceVersion sets a constraint on what resource versions a request may be served from. More info | (optional) defaults to undefined |
| resourceVersionMatch | [string] | resourceVersionMatch determines how resourceVersion is applied to list calls. More info | (optional) defaults to undefined |
| sendInitialEvents | [boolean] | sendInitialEvents=true may be set together with watch=true. More info | (optional) defaults to undefined |
| timeoutSeconds | [number] | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. More info | (optional) defaults to undefined |
| watch | [boolean] | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. More info | (optional) defaults to undefined |
Return type
readNamespacedServiceStatus
V1Service readNamespacedServiceStatus()
read status of the specified Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiReadNamespacedServiceStatusRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiReadNamespacedServiceStatusRequest = {
// name of the Service
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
};
const data = await apiInstance.readNamespacedServiceStatus(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | name of the Service | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
Return type
listServiceForAllNamespaces
V1ServiceList listServiceForAllNamespaces()
list or watch objects of kind Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiListServiceForAllNamespacesRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiListServiceForAllNamespacesRequest = {
// allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. (optional)
allowWatchBookmarks: true,
// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional)
_continue: "continue_example",
// A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
fieldSelector: "fieldSelector_example",
// ...8 more optional parameter(s)
};
const data = await apiInstance.listServiceForAllNamespaces(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| allowWatchBookmarks | [boolean] | allowWatchBookmarks requests watch events with type "BOOKMARK". More info | (optional) defaults to undefined |
| _continue | [string] | The continue option should be set when retrieving more results from the server. More info | (optional) defaults to undefined |
| fieldSelector | [string] | A selector to restrict the list of returned objects by their fields. Defaults to everything. More info | (optional) defaults to undefined |
| labelSelector | [string] | A selector to restrict the list of returned objects by their labels. Defaults to everything. More info | (optional) defaults to undefined |
| limit | [number] | limit is a maximum number of responses to return for a list call. More info | (optional) defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| resourceVersion | [string] | resourceVersion sets a constraint on what resource versions a request may be served from. More info | (optional) defaults to undefined |
| resourceVersionMatch | [string] | resourceVersionMatch determines how resourceVersion is applied to list calls. More info | (optional) defaults to undefined |
| sendInitialEvents | [boolean] | sendInitialEvents=true may be set together with watch=true. More info | (optional) defaults to undefined |
| timeoutSeconds | [number] | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. More info | (optional) defaults to undefined |
| watch | [boolean] | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. More info | (optional) defaults to undefined |
Return type
patchNamespacedService
V1Service patchNamespacedService(body)
partially update the specified Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiPatchNamespacedServiceRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiPatchNamespacedServiceRequest = {
// name of the Service
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
body: { /* See type definition in parameter table */ },
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
// fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional)
fieldManager: "fieldManager_example",
// ...2 more optional parameter(s)
};
const data = await apiInstance.patchNamespacedService(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | any | ||
| name | [string] | name of the Service | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| fieldManager | [string] | fieldManager is a name associated with the actor or entity that is making these changes. More info | (optional) defaults to undefined |
| fieldValidation | [string] | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. More info | (optional) defaults to undefined |
| force | [boolean] | Force is going to "force" Apply requests. More info | (optional) defaults to undefined |
Return type
patchNamespacedServiceStatus
V1Service patchNamespacedServiceStatus(body)
partially update status of the specified Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiPatchNamespacedServiceStatusRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiPatchNamespacedServiceStatusRequest = {
// name of the Service
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
body: { /* See type definition in parameter table */ },
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
// fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional)
fieldManager: "fieldManager_example",
// ...2 more optional parameter(s)
};
const data = await apiInstance.patchNamespacedServiceStatus(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | any | ||
| name | [string] | name of the Service | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| fieldManager | [string] | fieldManager is a name associated with the actor or entity that is making these changes. More info | (optional) defaults to undefined |
| fieldValidation | [string] | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. More info | (optional) defaults to undefined |
| force | [boolean] | Force is going to "force" Apply requests. More info | (optional) defaults to undefined |
Return type
replaceNamespacedService
V1Service replaceNamespacedService(body)
replace the specified Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiReplaceNamespacedServiceRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiReplaceNamespacedServiceRequest = {
// name of the Service
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
body: { apiVersion: "v1", kind: "Service", metadata: { name: "example" }, spec: { selector: { app: "example" }, ports: [{ port: 80 }] } }, // See full type: /models/core#v1service,
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
// fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional)
fieldManager: "fieldManager_example",
// ...1 more optional parameter(s)
};
const data = await apiInstance.replaceNamespacedService(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | V1Service | ||
| name | [string] | name of the Service | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| fieldManager | [string] | fieldManager is a name associated with the actor or entity that is making these changes. More info | (optional) defaults to undefined |
| fieldValidation | [string] | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. More info | (optional) defaults to undefined |
Return type
deleteCollectionNamespacedService
V1Status deleteCollectionNamespacedService()
delete collection of Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiDeleteCollectionNamespacedServiceRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiDeleteCollectionNamespacedServiceRequest = {
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional)
_continue: "continue_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
body: { /* See V1DeleteOptions: /models/other#v1deleteoptions */ },
// ...11 more optional parameter(s)
};
const data = await apiInstance.deleteCollectionNamespacedService(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | V1DeleteOptions | ||
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| _continue | [string] | The continue option should be set when retrieving more results from the server. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| fieldSelector | [string] | A selector to restrict the list of returned objects by their fields. Defaults to everything. More info | (optional) defaults to undefined |
| gracePeriodSeconds | [number] | The duration in seconds before the object should be deleted. More info | (optional) defaults to undefined |
| ignoreStoreReadErrorWithClusterBreakingPotential | [boolean] | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. More info | (optional) defaults to undefined |
| labelSelector | [string] | A selector to restrict the list of returned objects by their labels. Defaults to everything. More info | (optional) defaults to undefined |
| limit | [number] | limit is a maximum number of responses to return for a list call. More info | (optional) defaults to undefined |
| orphanDependents | [boolean] | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. More info | (optional) defaults to undefined |
| propagationPolicy | [string] | Whether and how garbage collection will be performed. More info | (optional) defaults to undefined |
| resourceVersion | [string] | resourceVersion sets a constraint on what resource versions a request may be served from. More info | (optional) defaults to undefined |
| resourceVersionMatch | [string] | resourceVersionMatch determines how resourceVersion is applied to list calls. More info | (optional) defaults to undefined |
| sendInitialEvents | [boolean] | sendInitialEvents=true may be set together with watch=true. More info | (optional) defaults to undefined |
| timeoutSeconds | [number] | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. More info | (optional) defaults to undefined |
Return type
deleteNamespacedService
V1Service deleteNamespacedService()
delete a Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiDeleteNamespacedServiceRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiDeleteNamespacedServiceRequest = {
// name of the Service
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
// The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional)
gracePeriodSeconds: 1,
body: { /* See V1DeleteOptions: /models/other#v1deleteoptions */ },
// ...3 more optional parameter(s)
};
const data = await apiInstance.deleteNamespacedService(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | V1DeleteOptions | ||
| name | [string] | name of the Service | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| gracePeriodSeconds | [number] | The duration in seconds before the object should be deleted. More info | (optional) defaults to undefined |
| ignoreStoreReadErrorWithClusterBreakingPotential | [boolean] | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. More info | (optional) defaults to undefined |
| orphanDependents | [boolean] | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. More info | (optional) defaults to undefined |
| propagationPolicy | [string] | Whether and how garbage collection will be performed. More info | (optional) defaults to undefined |
Return type
replaceNamespacedServiceStatus
V1Service replaceNamespacedServiceStatus(body)
replace status of the specified Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiReplaceNamespacedServiceStatusRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiReplaceNamespacedServiceStatusRequest = {
// name of the Service
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
body: { apiVersion: "v1", kind: "Service", metadata: { name: "example" }, spec: { selector: { app: "example" }, ports: [{ port: 80 }] } }, // See full type: /models/core#v1service,
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
// fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional)
fieldManager: "fieldManager_example",
// ...1 more optional parameter(s)
};
const data = await apiInstance.replaceNamespacedServiceStatus(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | V1Service | ||
| name | [string] | name of the Service | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| fieldManager | [string] | fieldManager is a name associated with the actor or entity that is making these changes. More info | (optional) defaults to undefined |
| fieldValidation | [string] | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. More info | (optional) defaults to undefined |
Return type
connectDeleteNamespacedServiceProxy
string connectDeleteNamespacedServiceProxy()
connect DELETE requests to proxy of Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiConnectDeleteNamespacedServiceProxyRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiConnectDeleteNamespacedServiceProxyRequest = {
// name of the ServiceProxyOptions
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. (optional)
path: "path_example",
};
const data = await apiInstance.connectDeleteNamespacedServiceProxy(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | name of the ServiceProxyOptions | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| path | [string] | Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. | (optional) defaults to undefined |
Return type
string
connectDeleteNamespacedServiceProxyWithPath
string connectDeleteNamespacedServiceProxyWithPath()
connect DELETE requests to proxy of Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiConnectDeleteNamespacedServiceProxyWithPathRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiConnectDeleteNamespacedServiceProxyWithPathRequest = {
// name of the ServiceProxyOptions
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// path to the resource
path: "path_example",
// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. (optional)
path2: "path_example",
};
const data = await apiInstance.connectDeleteNamespacedServiceProxyWithPath(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | name of the ServiceProxyOptions | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| path | [string] | path to the resource | defaults to undefined |
| path2 | [string] | Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. | (optional) defaults to undefined |
Return type
string
connectGetNamespacedServiceProxy
string connectGetNamespacedServiceProxy()
connect GET requests to proxy of Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiConnectGetNamespacedServiceProxyRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiConnectGetNamespacedServiceProxyRequest = {
// name of the ServiceProxyOptions
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. (optional)
path: "path_example",
};
const data = await apiInstance.connectGetNamespacedServiceProxy(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | name of the ServiceProxyOptions | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| path | [string] | Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. | (optional) defaults to undefined |
Return type
string
connectGetNamespacedServiceProxyWithPath
string connectGetNamespacedServiceProxyWithPath()
connect GET requests to proxy of Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiConnectGetNamespacedServiceProxyWithPathRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiConnectGetNamespacedServiceProxyWithPathRequest = {
// name of the ServiceProxyOptions
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// path to the resource
path: "path_example",
// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. (optional)
path2: "path_example",
};
const data = await apiInstance.connectGetNamespacedServiceProxyWithPath(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | name of the ServiceProxyOptions | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| path | [string] | path to the resource | defaults to undefined |
| path2 | [string] | Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. | (optional) defaults to undefined |
Return type
string
connectHeadNamespacedServiceProxy
string connectHeadNamespacedServiceProxy()
connect HEAD requests to proxy of Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiConnectHeadNamespacedServiceProxyRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiConnectHeadNamespacedServiceProxyRequest = {
// name of the ServiceProxyOptions
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. (optional)
path: "path_example",
};
const data = await apiInstance.connectHeadNamespacedServiceProxy(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | name of the ServiceProxyOptions | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| path | [string] | Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. | (optional) defaults to undefined |
Return type
string
connectHeadNamespacedServiceProxyWithPath
string connectHeadNamespacedServiceProxyWithPath()
connect HEAD requests to proxy of Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiConnectHeadNamespacedServiceProxyWithPathRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiConnectHeadNamespacedServiceProxyWithPathRequest = {
// name of the ServiceProxyOptions
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// path to the resource
path: "path_example",
// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. (optional)
path2: "path_example",
};
const data = await apiInstance.connectHeadNamespacedServiceProxyWithPath(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | name of the ServiceProxyOptions | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| path | [string] | path to the resource | defaults to undefined |
| path2 | [string] | Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. | (optional) defaults to undefined |
Return type
string
connectOptionsNamespacedServiceProxy
string connectOptionsNamespacedServiceProxy()
connect OPTIONS requests to proxy of Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiConnectOptionsNamespacedServiceProxyRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiConnectOptionsNamespacedServiceProxyRequest = {
// name of the ServiceProxyOptions
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. (optional)
path: "path_example",
};
const data = await apiInstance.connectOptionsNamespacedServiceProxy(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | name of the ServiceProxyOptions | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| path | [string] | Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. | (optional) defaults to undefined |
Return type
string
connectOptionsNamespacedServiceProxyWithPath
string connectOptionsNamespacedServiceProxyWithPath()
connect OPTIONS requests to proxy of Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiConnectOptionsNamespacedServiceProxyWithPathRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiConnectOptionsNamespacedServiceProxyWithPathRequest = {
// name of the ServiceProxyOptions
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// path to the resource
path: "path_example",
// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. (optional)
path2: "path_example",
};
const data = await apiInstance.connectOptionsNamespacedServiceProxyWithPath(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | name of the ServiceProxyOptions | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| path | [string] | path to the resource | defaults to undefined |
| path2 | [string] | Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. | (optional) defaults to undefined |
Return type
string
connectPatchNamespacedServiceProxy
string connectPatchNamespacedServiceProxy()
connect PATCH requests to proxy of Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiConnectPatchNamespacedServiceProxyRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiConnectPatchNamespacedServiceProxyRequest = {
// name of the ServiceProxyOptions
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. (optional)
path: "path_example",
};
const data = await apiInstance.connectPatchNamespacedServiceProxy(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | name of the ServiceProxyOptions | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| path | [string] | Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. | (optional) defaults to undefined |
Return type
string
connectPatchNamespacedServiceProxyWithPath
string connectPatchNamespacedServiceProxyWithPath()
connect PATCH requests to proxy of Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiConnectPatchNamespacedServiceProxyWithPathRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiConnectPatchNamespacedServiceProxyWithPathRequest = {
// name of the ServiceProxyOptions
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// path to the resource
path: "path_example",
// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. (optional)
path2: "path_example",
};
const data = await apiInstance.connectPatchNamespacedServiceProxyWithPath(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | name of the ServiceProxyOptions | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| path | [string] | path to the resource | defaults to undefined |
| path2 | [string] | Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. | (optional) defaults to undefined |
Return type
string
connectPostNamespacedServiceProxy
string connectPostNamespacedServiceProxy()
connect POST requests to proxy of Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiConnectPostNamespacedServiceProxyRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiConnectPostNamespacedServiceProxyRequest = {
// name of the ServiceProxyOptions
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. (optional)
path: "path_example",
};
const data = await apiInstance.connectPostNamespacedServiceProxy(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | name of the ServiceProxyOptions | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| path | [string] | Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. | (optional) defaults to undefined |
Return type
string
connectPostNamespacedServiceProxyWithPath
string connectPostNamespacedServiceProxyWithPath()
connect POST requests to proxy of Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiConnectPostNamespacedServiceProxyWithPathRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiConnectPostNamespacedServiceProxyWithPathRequest = {
// name of the ServiceProxyOptions
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// path to the resource
path: "path_example",
// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. (optional)
path2: "path_example",
};
const data = await apiInstance.connectPostNamespacedServiceProxyWithPath(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | name of the ServiceProxyOptions | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| path | [string] | path to the resource | defaults to undefined |
| path2 | [string] | Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. | (optional) defaults to undefined |
Return type
string
connectPutNamespacedServiceProxy
string connectPutNamespacedServiceProxy()
connect PUT requests to proxy of Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiConnectPutNamespacedServiceProxyRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiConnectPutNamespacedServiceProxyRequest = {
// name of the ServiceProxyOptions
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. (optional)
path: "path_example",
};
const data = await apiInstance.connectPutNamespacedServiceProxy(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | name of the ServiceProxyOptions | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| path | [string] | Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. | (optional) defaults to undefined |
Return type
string
connectPutNamespacedServiceProxyWithPath
string connectPutNamespacedServiceProxyWithPath()
connect PUT requests to proxy of Service
Example
import { createConfiguration, CoreV1Api } from '@kubernetes/client-node';
import type { CoreV1ApiConnectPutNamespacedServiceProxyWithPathRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new CoreV1Api(configuration);
const request: CoreV1ApiConnectPutNamespacedServiceProxyWithPathRequest = {
// name of the ServiceProxyOptions
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// path to the resource
path: "path_example",
// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. (optional)
path2: "path_example",
};
const data = await apiInstance.connectPutNamespacedServiceProxyWithPath(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | name of the ServiceProxyOptions | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| path | [string] | path to the resource | defaults to undefined |
| path2 | [string] | Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. | (optional) defaults to undefined |
Return type
string