Class V1EphemeralContainer
An EphemeralContainer is a temporary container that you may add to an existing
Pod for user-initiated activities such as debugging. Ephemeral containers have
no resource or scheduling guarantees, and they will not be restarted when they
exit or when a Pod is removed or restarted. The kubelet may evict a Pod if an
ephemeral container causes the Pod to exceed its resource allocation.
To add an ephemeral container, use the ephemeralcontainers subresource of an
existing Pod. Ephemeral containers may not be removed or restarted.
Inheritance
V1EphemeralContainer
Assembly: KubernetesClient.dll
Syntax
public record V1EphemeralContainer : IEquatable<V1EphemeralContainer>
Constructors
View Source
V1EphemeralContainer()
Declaration
public V1EphemeralContainer()
View Source
V1EphemeralContainer(V1EphemeralContainer)
Declaration
protected V1EphemeralContainer(V1EphemeralContainer original)
Parameters
Properties
View Source
Args
Arguments to the entrypoint. The image's CMD is used if this is not provided.
Variable references $(VAR_NAME) are expanded using the container's environment.
If a variable cannot be resolved, the reference in the input string will be
unchanged. Double $$ are reduced to a single $, which allows for escaping the
\((VAR_NAME) syntax: i.e. "$\)(VAR_NAME)" will produce the string literal
"$(VAR_NAME)". Escaped references will never be expanded, regardless of whether
the variable exists or not. Cannot be updated. More info:
https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
Declaration
[JsonPropertyName("args")]
public IList<string> Args { get; set; }
Property Value
View Source
Command
Entrypoint array. Not executed within a shell. The image's ENTRYPOINT is used if
this is not provided. Variable references $(VAR_NAME) are expanded using the
container's environment. If a variable cannot be resolved, the reference in the
input string will be unchanged. Double $$ are reduced to a single $, which
allows for escaping the \((VAR_NAME) syntax: i.e. "$\)(VAR_NAME)" will produce the
string literal "$(VAR_NAME)". Escaped references will never be expanded,
regardless of whether the variable exists or not. Cannot be updated. More info:
https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
Declaration
[JsonPropertyName("command")]
public IList<string> Command { get; set; }
Property Value
View Source
Env
List of environment variables to set in the container. Cannot be updated.
Declaration
[JsonPropertyName("env")]
public IList<V1EnvVar> Env { get; set; }
Property Value
View Source
EnvFrom
List of sources to populate environment variables in the container. The keys
defined within a source may consist of any printable ASCII characters except
'='. When a key exists in multiple sources, the value associated with the last
source will take precedence. Values defined by an Env with a duplicate key will
take precedence. Cannot be updated.
Declaration
[JsonPropertyName("envFrom")]
public IList<V1EnvFromSource> EnvFrom { get; set; }
Property Value
View Source
EqualityContract
Declaration
protected virtual Type EqualityContract { get; }
Property Value
View Source
Image
Declaration
[JsonPropertyName("image")]
public string Image { get; set; }
Property Value
View Source
ImagePullPolicy
Declaration
[JsonPropertyName("imagePullPolicy")]
public string ImagePullPolicy { get; set; }
Property Value
View Source
Lifecycle
Lifecycle is not allowed for ephemeral containers.
Declaration
[JsonPropertyName("lifecycle")]
public V1Lifecycle Lifecycle { get; set; }
Property Value
View Source
LivenessProbe
Probes are not allowed for ephemeral containers.
Declaration
[JsonPropertyName("livenessProbe")]
public V1Probe LivenessProbe { get; set; }
Property Value
View Source
Name
Name of the ephemeral container specified as a DNS_LABEL. This name must be
unique among all containers, init containers and ephemeral containers.
Declaration
[JsonPropertyName("name")]
public string Name { get; set; }
Property Value
View Source
Ports
Ports are not allowed for ephemeral containers.
Declaration
[JsonPropertyName("ports")]
public IList<V1ContainerPort> Ports { get; set; }
Property Value
View Source
ReadinessProbe
Probes are not allowed for ephemeral containers.
Declaration
[JsonPropertyName("readinessProbe")]
public V1Probe ReadinessProbe { get; set; }
Property Value
View Source
ResizePolicy
Resources resize policy for the container.
Declaration
[JsonPropertyName("resizePolicy")]
public IList<V1ContainerResizePolicy> ResizePolicy { get; set; }
Property Value
View Source
Resources
Resources are not allowed for ephemeral containers. Ephemeral containers use
spare resources already allocated to the pod.
Declaration
[JsonPropertyName("resources")]
public V1ResourceRequirements Resources { get; set; }
Property Value
View Source
RestartPolicy
Restart policy for the container to manage the restart behavior of each
container within a pod. You cannot set this field on ephemeral containers.
Declaration
[JsonPropertyName("restartPolicy")]
public string RestartPolicy { get; set; }
Property Value
View Source
RestartPolicyRules
Represents a list of rules to be checked to determine if the container should be
restarted on exit. You cannot set this field on ephemeral containers.
Declaration
[JsonPropertyName("restartPolicyRules")]
public IList<V1ContainerRestartRule> RestartPolicyRules { get; set; }
Property Value
View Source
SecurityContext
Optional: SecurityContext defines the security options the ephemeral container
should be run with. If set, the fields of SecurityContext override the
equivalent fields of PodSecurityContext.
Declaration
[JsonPropertyName("securityContext")]
public V1SecurityContext SecurityContext { get; set; }
Property Value
View Source
StartupProbe
Probes are not allowed for ephemeral containers.
Declaration
[JsonPropertyName("startupProbe")]
public V1Probe StartupProbe { get; set; }
Property Value
View Source
Stdin
Whether this container should allocate a buffer for stdin in the container
runtime. If this is not set, reads from stdin in the container will always
result in EOF. Default is false.
Declaration
[JsonPropertyName("stdin")]
public bool? Stdin { get; set; }
Property Value
View Source
StdinOnce
Whether the container runtime should close the stdin channel after it has been
opened by a single attach. When stdin is true the stdin stream will remain open
across multiple attach sessions. If stdinOnce is set to true, stdin is opened on
container start, is empty until the first client attaches to stdin, and then
remains open and accepts data until the client disconnects, at which time stdin
is closed and remains closed until the container is restarted. If this flag is
false, a container processes that reads from stdin will never receive an EOF.
Default is false
Declaration
[JsonPropertyName("stdinOnce")]
public bool? StdinOnce { get; set; }
Property Value
View Source
TargetContainerName
If set, the name of the container from PodSpec that this ephemeral container
targets. The ephemeral container will be run in the namespaces (IPC, PID, etc)
of this container. If not set then the ephemeral container uses the namespaces
configured in the Pod spec.
The container runtime must implement support for this feature. If the runtime
does not support namespace targeting then the result of setting this field is
undefined.
Declaration
[JsonPropertyName("targetContainerName")]
public string TargetContainerName { get; set; }
Property Value
View Source
TerminationMessagePath
Optional: Path at which the file to which the container's termination message
will be written is mounted into the container's filesystem. Message written is
intended to be brief final status, such as an assertion failure message. Will be
truncated by the node if greater than 4096 bytes. The total message length
across all containers will be limited to 12kb. Defaults to /dev/termination-log.
Cannot be updated.
Declaration
[JsonPropertyName("terminationMessagePath")]
public string TerminationMessagePath { get; set; }
Property Value
View Source
TerminationMessagePolicy
Indicate how the termination message should be populated. File will use the
contents of terminationMessagePath to populate the container status message on
both success and failure. FallbackToLogsOnError will use the last chunk of
container log output if the termination message file is empty and the container
exited with an error. The log output is limited to 2048 bytes or 80 lines,
whichever is smaller. Defaults to File. Cannot be updated.
Declaration
[JsonPropertyName("terminationMessagePolicy")]
public string TerminationMessagePolicy { get; set; }
Property Value
View Source
Tty
Whether this container should allocate a TTY for itself, also requires 'stdin'
to be true. Default is false.
Declaration
[JsonPropertyName("tty")]
public bool? Tty { get; set; }
Property Value
View Source
VolumeDevices
volumeDevices is the list of block devices to be used by the container.
Declaration
[JsonPropertyName("volumeDevices")]
public IList<V1VolumeDevice> VolumeDevices { get; set; }
Property Value
View Source
VolumeMounts
Pod volumes to mount into the container's filesystem. Subpath mounts are not
allowed for ephemeral containers. Cannot be updated.
Declaration
[JsonPropertyName("volumeMounts")]
public IList<V1VolumeMount> VolumeMounts { get; set; }
Property Value
View Source
WorkingDir
Container's working directory. If not specified, the container runtime's default
will be used, which might be configured in the container image. Cannot be
updated.
Declaration
[JsonPropertyName("workingDir")]
public string WorkingDir { get; set; }
Property Value
Methods
View Source
Equals(object?)
Declaration
public override bool Equals(object? obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
View Source
Equals(V1EphemeralContainer?)
Declaration
public virtual bool Equals(V1EphemeralContainer? other)
Parameters
Returns
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
View Source
PrintMembers(StringBuilder)
Declaration
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
Returns
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
View Source
operator ==(V1EphemeralContainer?, V1EphemeralContainer?)
Declaration
public static bool operator ==(V1EphemeralContainer? left, V1EphemeralContainer? right)
Parameters
Returns
View Source
operator !=(V1EphemeralContainer?, V1EphemeralContainer?)
Declaration
public static bool operator !=(V1EphemeralContainer? left, V1EphemeralContainer? right)
Parameters
Returns
Implements