Show / Hide Table of Contents

Interface IKubernetes

Inherited Members
IDisposable.Dispose()
Namespace: k8s
Assembly: KubernetesClient.dll
Syntax
public interface IKubernetes : IDisposable

Properties

Admissionregistration

Declaration
IAdmissionregistrationOperations Admissionregistration { get; }
Property Value
Type Description
IAdmissionregistrationOperations

AdmissionregistrationV1

Declaration
IAdmissionregistrationV1Operations AdmissionregistrationV1 { get; }
Property Value
Type Description
IAdmissionregistrationV1Operations

AdmissionregistrationV1alpha1

Declaration
IAdmissionregistrationV1alpha1Operations AdmissionregistrationV1alpha1 { get; }
Property Value
Type Description
IAdmissionregistrationV1alpha1Operations

AdmissionregistrationV1beta1

Declaration
IAdmissionregistrationV1beta1Operations AdmissionregistrationV1beta1 { get; }
Property Value
Type Description
IAdmissionregistrationV1beta1Operations

Apiextensions

Declaration
IApiextensionsOperations Apiextensions { get; }
Property Value
Type Description
IApiextensionsOperations

ApiextensionsV1

Declaration
IApiextensionsV1Operations ApiextensionsV1 { get; }
Property Value
Type Description
IApiextensionsV1Operations

Apiregistration

Declaration
IApiregistrationOperations Apiregistration { get; }
Property Value
Type Description
IApiregistrationOperations

ApiregistrationV1

Declaration
IApiregistrationV1Operations ApiregistrationV1 { get; }
Property Value
Type Description
IApiregistrationV1Operations

Apis

Declaration
IApisOperations Apis { get; }
Property Value
Type Description
IApisOperations

Apps

Declaration
IAppsOperations Apps { get; }
Property Value
Type Description
IAppsOperations

AppsV1

Declaration
IAppsV1Operations AppsV1 { get; }
Property Value
Type Description
IAppsV1Operations

Authentication

Declaration
IAuthenticationOperations Authentication { get; }
Property Value
Type Description
IAuthenticationOperations

AuthenticationV1

Declaration
IAuthenticationV1Operations AuthenticationV1 { get; }
Property Value
Type Description
IAuthenticationV1Operations

Authorization

Declaration
IAuthorizationOperations Authorization { get; }
Property Value
Type Description
IAuthorizationOperations

AuthorizationV1

Declaration
IAuthorizationV1Operations AuthorizationV1 { get; }
Property Value
Type Description
IAuthorizationV1Operations

Autoscaling

Declaration
IAutoscalingOperations Autoscaling { get; }
Property Value
Type Description
IAutoscalingOperations

AutoscalingV1

Declaration
IAutoscalingV1Operations AutoscalingV1 { get; }
Property Value
Type Description
IAutoscalingV1Operations

AutoscalingV2

Declaration
IAutoscalingV2Operations AutoscalingV2 { get; }
Property Value
Type Description
IAutoscalingV2Operations

BaseUri

The base URI of the service.

Declaration
Uri BaseUri { get; set; }
Property Value
Type Description
Uri

Batch

Declaration
IBatchOperations Batch { get; }
Property Value
Type Description
IBatchOperations

BatchV1

Declaration
IBatchV1Operations BatchV1 { get; }
Property Value
Type Description
IBatchV1Operations

Certificates

Declaration
ICertificatesOperations Certificates { get; }
Property Value
Type Description
ICertificatesOperations

CertificatesV1

Declaration
ICertificatesV1Operations CertificatesV1 { get; }
Property Value
Type Description
ICertificatesV1Operations

CertificatesV1alpha1

Declaration
ICertificatesV1alpha1Operations CertificatesV1alpha1 { get; }
Property Value
Type Description
ICertificatesV1alpha1Operations

CertificatesV1beta1

Declaration
ICertificatesV1beta1Operations CertificatesV1beta1 { get; }
Property Value
Type Description
ICertificatesV1beta1Operations

Coordination

Declaration
ICoordinationOperations Coordination { get; }
Property Value
Type Description
ICoordinationOperations

CoordinationV1

Declaration
ICoordinationV1Operations CoordinationV1 { get; }
Property Value
Type Description
ICoordinationV1Operations

CoordinationV1alpha2

Declaration
ICoordinationV1alpha2Operations CoordinationV1alpha2 { get; }
Property Value
Type Description
ICoordinationV1alpha2Operations

CoordinationV1beta1

Declaration
ICoordinationV1beta1Operations CoordinationV1beta1 { get; }
Property Value
Type Description
ICoordinationV1beta1Operations

Core

Declaration
ICoreOperations Core { get; }
Property Value
Type Description
ICoreOperations

CoreV1

Declaration
ICoreV1Operations CoreV1 { get; }
Property Value
Type Description
ICoreV1Operations

CustomObjects

Declaration
ICustomObjectsOperations CustomObjects { get; }
Property Value
Type Description
ICustomObjectsOperations

Discovery

Declaration
IDiscoveryOperations Discovery { get; }
Property Value
Type Description
IDiscoveryOperations

DiscoveryV1

Declaration
IDiscoveryV1Operations DiscoveryV1 { get; }
Property Value
Type Description
IDiscoveryV1Operations

Events

Declaration
IEventsOperations Events { get; }
Property Value
Type Description
IEventsOperations

EventsV1

Declaration
IEventsV1Operations EventsV1 { get; }
Property Value
Type Description
IEventsV1Operations

FlowcontrolApiserver

Declaration
IFlowcontrolApiserverOperations FlowcontrolApiserver { get; }
Property Value
Type Description
IFlowcontrolApiserverOperations

FlowcontrolApiserverV1

Declaration
IFlowcontrolApiserverV1Operations FlowcontrolApiserverV1 { get; }
Property Value
Type Description
IFlowcontrolApiserverV1Operations

InternalApiserver

Declaration
IInternalApiserverOperations InternalApiserver { get; }
Property Value
Type Description
IInternalApiserverOperations

InternalApiserverV1alpha1

Declaration
IInternalApiserverV1alpha1Operations InternalApiserverV1alpha1 { get; }
Property Value
Type Description
IInternalApiserverV1alpha1Operations

Logs

Declaration
ILogsOperations Logs { get; }
Property Value
Type Description
ILogsOperations

Networking

Declaration
INetworkingOperations Networking { get; }
Property Value
Type Description
INetworkingOperations

NetworkingV1

Declaration
INetworkingV1Operations NetworkingV1 { get; }
Property Value
Type Description
INetworkingV1Operations

NetworkingV1beta1

Declaration
INetworkingV1beta1Operations NetworkingV1beta1 { get; }
Property Value
Type Description
INetworkingV1beta1Operations

Node

Declaration
INodeOperations Node { get; }
Property Value
Type Description
INodeOperations

NodeV1

Declaration
INodeV1Operations NodeV1 { get; }
Property Value
Type Description
INodeV1Operations

Openid

Declaration
IOpenidOperations Openid { get; }
Property Value
Type Description
IOpenidOperations

Policy

Declaration
IPolicyOperations Policy { get; }
Property Value
Type Description
IPolicyOperations

PolicyV1

Declaration
IPolicyV1Operations PolicyV1 { get; }
Property Value
Type Description
IPolicyV1Operations

RbacAuthorization

Declaration
IRbacAuthorizationOperations RbacAuthorization { get; }
Property Value
Type Description
IRbacAuthorizationOperations

RbacAuthorizationV1

Declaration
IRbacAuthorizationV1Operations RbacAuthorizationV1 { get; }
Property Value
Type Description
IRbacAuthorizationV1Operations

Resource

Declaration
IResourceOperations Resource { get; }
Property Value
Type Description
IResourceOperations

ResourceV1

Declaration
IResourceV1Operations ResourceV1 { get; }
Property Value
Type Description
IResourceV1Operations

ResourceV1alpha3

Declaration
IResourceV1alpha3Operations ResourceV1alpha3 { get; }
Property Value
Type Description
IResourceV1alpha3Operations

ResourceV1beta1

Declaration
IResourceV1beta1Operations ResourceV1beta1 { get; }
Property Value
Type Description
IResourceV1beta1Operations

ResourceV1beta2

Declaration
IResourceV1beta2Operations ResourceV1beta2 { get; }
Property Value
Type Description
IResourceV1beta2Operations

Scheduling

Declaration
ISchedulingOperations Scheduling { get; }
Property Value
Type Description
ISchedulingOperations

SchedulingV1

Declaration
ISchedulingV1Operations SchedulingV1 { get; }
Property Value
Type Description
ISchedulingV1Operations

SchedulingV1alpha2

Declaration
ISchedulingV1alpha2Operations SchedulingV1alpha2 { get; }
Property Value
Type Description
ISchedulingV1alpha2Operations

Storage

Declaration
IStorageOperations Storage { get; }
Property Value
Type Description
IStorageOperations

StorageV1

Declaration
IStorageV1Operations StorageV1 { get; }
Property Value
Type Description
IStorageV1Operations

StorageV1beta1

Declaration
IStorageV1beta1Operations StorageV1beta1 { get; }
Property Value
Type Description
IStorageV1beta1Operations

Storagemigration

Declaration
IStoragemigrationOperations Storagemigration { get; }
Property Value
Type Description
IStoragemigrationOperations

StoragemigrationV1beta1

Declaration
IStoragemigrationV1beta1Operations StoragemigrationV1beta1 { get; }
Property Value
Type Description
IStoragemigrationV1beta1Operations

Version

Declaration
IVersionOperations Version { get; }
Property Value
Type Description
IVersionOperations

WellKnown

Declaration
IWellKnownOperations WellKnown { get; }
Property Value
Type Description
IWellKnownOperations

Methods

MuxedStreamNamespacedPodExecAsync(string, string, IEnumerable<string>, string, bool, bool, bool, bool, string, Dictionary<string, List<string>>, CancellationToken)

Executes a command in a pod.

Declaration
Task<IStreamDemuxer> MuxedStreamNamespacedPodExecAsync(string name, string @namespace = "default", IEnumerable<string> command = null, string container = null, bool stderr = true, bool stdin = true, bool stdout = true, bool tty = true, string webSocketSubProtocol = "v4.channel.k8s.io", Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string name

name of the Pod

string namespace

object name and auth scope, such as for teams and projects

IEnumerable<string> command

Command is the remote command to execute. argv array. Not executed within a shell.

string container

Container in which to execute the command. Defaults to only container if there is only one container in the pod.

bool stderr

Redirect the standard error stream of the pod for this call. Defaults to true.

bool stdin

Redirect the standard input stream of the pod for this call. Defaults to true.

bool stdout

Redirect the standard output stream of the pod for this call. Defaults to true.

bool tty

TTY if true indicates that a tty will be allocated for the exec call. Defaults to true.

string webSocketSubProtocol

The Kubernetes-specific WebSocket sub protocol to use. See WebSocketProtocol for a list of available protocols.

Dictionary<string, List<string>> customHeaders

Headers that will be added to request.

CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
Task<IStreamDemuxer>

A IStreamDemuxer which can be used to communicate with the process running in the pod.

Exceptions
Type Condition
ArgumentNullException

Thrown when a required parameter is null

NamespacedPodExecAsync(string, string, string, IEnumerable<string>, bool, ExecAsyncCallback, CancellationToken)

Executes a command in a container in a pod.

Declaration
Task<int> NamespacedPodExecAsync(string name, string @namespace, string container, IEnumerable<string> command, bool tty, ExecAsyncCallback action, CancellationToken cancellationToken)
Parameters
Type Name Description
string name

The name of the pod which contains the container in which to execute the command.

string namespace

The namespace of the container.

string container

The container in which to run the command.

IEnumerable<string> command

The command to execute.

bool tty

if allocate a pseudo-TTY

ExecAsyncCallback action

A callback which processes the standard input, standard output and standard error.

CancellationToken cancellationToken

A CancellationToken which can be used to cancel the asynchronous operation.

Returns
Type Description
Task<int>

A Task which represents the asynchronous operation.

WebSocketNamespacedPodAttachAsync(string, string, string, bool, bool, bool, bool, string, Dictionary<string, List<string>>, CancellationToken)

connect GET requests to attach of Pod

Declaration
Task<WebSocket> WebSocketNamespacedPodAttachAsync(string name, string @namespace, string container = null, bool stderr = true, bool stdin = false, bool stdout = true, bool tty = false, string webSocketSubProtocol = null, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string name

name of the Pod

string namespace

object name and auth scope, such as for teams and projects

string container

The container in which to execute the command. Defaults to only container if there is only one container in the pod.

bool stderr

Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.

bool stdin

stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.

bool stdout

Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.

bool tty

TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false.

string webSocketSubProtocol

The Kubernetes-specific WebSocket sub protocol to use. See WebSocketProtocol for a list of available protocols.

Dictionary<string, List<string>> customHeaders

Headers that will be added to request.

CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
Task<WebSocket>

A response object containing the response body and response headers.

WebSocketNamespacedPodExecAsync(string, string, IEnumerable<string>, string, bool, bool, bool, bool, string, Dictionary<string, List<string>>, CancellationToken)

Executes a command in a pod.

Declaration
Task<WebSocket> WebSocketNamespacedPodExecAsync(string name, string @namespace = "default", IEnumerable<string> command = null, string container = null, bool stderr = true, bool stdin = true, bool stdout = true, bool tty = true, string webSocketSubProtocol = null, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string name

name of the Pod

string namespace

object name and auth scope, such as for teams and projects

IEnumerable<string> command

Command is the remote command to execute. argv array. Not executed within a shell.

string container

Container in which to execute the command. Defaults to only container if there is only one container in the pod.

bool stderr

Redirect the standard error stream of the pod for this call. Defaults to true.

bool stdin

Redirect the standard input stream of the pod for this call. Defaults to true.

bool stdout

Redirect the standard output stream of the pod for this call. Defaults to true.

bool tty

TTY if true indicates that a tty will be allocated for the exec call. Defaults to true.

string webSocketSubProtocol

The Kubernetes-specific WebSocket sub protocol to use. See WebSocketProtocol for a list of available protocols.

Dictionary<string, List<string>> customHeaders

Headers that will be added to request.

CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
Task<WebSocket>

A ClientWebSocket which can be used to communicate with the process running in the pod.

Exceptions
Type Condition
ArgumentNullException

Thrown when a required parameter is null

WebSocketNamespacedPodExecAsync(string, string, string, string, bool, bool, bool, bool, string, Dictionary<string, List<string>>, CancellationToken)

Executes a command in a pod.

Declaration
Task<WebSocket> WebSocketNamespacedPodExecAsync(string name, string @namespace = "default", string command = null, string container = null, bool stderr = true, bool stdin = true, bool stdout = true, bool tty = true, string webSocketSubProtocol = null, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string name

name of the Pod

string namespace

object name and auth scope, such as for teams and projects

string command

Command is the remote command to execute. argv array. Not executed within a shell.

string container

Container in which to execute the command. Defaults to only container if there is only one container in the pod.

bool stderr

Redirect the standard error stream of the pod for this call. Defaults to true.

bool stdin

Redirect the standard input stream of the pod for this call. Defaults to true.

bool stdout

Redirect the standard output stream of the pod for this call. Defaults to true.

bool tty

TTY if true indicates that a tty will be allocated for the exec call. Defaults to true.

string webSocketSubProtocol

The Kubernetes-specific WebSocket sub protocol to use. See WebSocketProtocol for a list of available protocols.

Dictionary<string, List<string>> customHeaders

Headers that will be added to request.

CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
Task<WebSocket>

A ClientWebSocket which can be used to communicate with the process running in the pod.

Exceptions
Type Condition
ArgumentNullException

Thrown when a required parameter is null

WebSocketNamespacedPodPortForwardAsync(string, string, IEnumerable<int>, string, Dictionary<string, List<string>>, CancellationToken)

Start port forwarding one or more ports of a pod.

Declaration
Task<WebSocket> WebSocketNamespacedPodPortForwardAsync(string name, string @namespace, IEnumerable<int> ports, string webSocketSubProtocol = null, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string name

The name of the Pod

string namespace

The object name and auth scope, such as for teams and projects

IEnumerable<int> ports

List of ports to forward.

string webSocketSubProtocol

The Kubernetes-specific WebSocket sub protocol to use. See WebSocketProtocol for a list of available protocols.

Dictionary<string, List<string>> customHeaders

The headers that will be added to request.

CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
Task<WebSocket>

A ClientWebSocket which can be used to communicate with the process running in the pod.

Extension Methods

KubernetesMetricsExtensions.GetKubernetesNodesMetricsAsync(IKubernetes)
KubernetesMetricsExtensions.GetKubernetesPodsMetricsAsync(IKubernetes)
KubernetesMetricsExtensions.GetKubernetesPodsMetricsByNamespaceAsync(IKubernetes, string)
In this article
Back to top Generated by DocFX