Show / Hide Table of Contents

Class V1ContainerPort

ContainerPort represents a network port in a single container.

Inheritance
object
V1ContainerPort
Implements
IEquatable<V1ContainerPort>
Inherited Members
object.GetType()
object.MemberwiseClone()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: k8s.Models
Assembly: KubernetesClient.dll
Syntax
public record V1ContainerPort : IEquatable<V1ContainerPort>

Constructors

View Source

V1ContainerPort()

Declaration
public V1ContainerPort()
View Source

V1ContainerPort(V1ContainerPort)

Declaration
protected V1ContainerPort(V1ContainerPort original)
Parameters
Type Name Description
V1ContainerPort original

Properties

View Source

ContainerPort

Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.

Declaration
[JsonPropertyName("containerPort")]
public int ContainerPort { get; set; }
Property Value
Type Description
int
View Source

EqualityContract

Declaration
protected virtual Type EqualityContract { get; }
Property Value
Type Description
Type
View Source

HostIP

What host IP to bind the external port to.

Declaration
[JsonPropertyName("hostIP")]
public string HostIP { get; set; }
Property Value
Type Description
string
View Source

HostPort

Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.

Declaration
[JsonPropertyName("hostPort")]
public int? HostPort { get; set; }
Property Value
Type Description
int?
View Source

Name

If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.

Declaration
[JsonPropertyName("name")]
public string Name { get; set; }
Property Value
Type Description
string
View Source

Protocol

Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP".

Declaration
[JsonPropertyName("protocol")]
public string Protocol { get; set; }
Property Value
Type Description
string

Methods

View Source

Equals(object?)

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
object.Equals(object)
View Source

Equals(V1ContainerPort?)

Declaration
public virtual bool Equals(V1ContainerPort? other)
Parameters
Type Name Description
V1ContainerPort other
Returns
Type Description
bool
View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
object.GetHashCode()
View Source

PrintMembers(StringBuilder)

Declaration
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
Type Name Description
StringBuilder builder
Returns
Type Description
bool
View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()

Operators

View Source

operator ==(V1ContainerPort?, V1ContainerPort?)

Declaration
public static bool operator ==(V1ContainerPort? left, V1ContainerPort? right)
Parameters
Type Name Description
V1ContainerPort left
V1ContainerPort right
Returns
Type Description
bool
View Source

operator !=(V1ContainerPort?, V1ContainerPort?)

Declaration
public static bool operator !=(V1ContainerPort? left, V1ContainerPort? right)
Parameters
Type Name Description
V1ContainerPort left
V1ContainerPort right
Returns
Type Description
bool

Implements

IEquatable<T>
  • View Source
In this article
Back to top Generated by DocFX