Class KubeConfigContext
Describes a Kubernetes cluster configuration.
Namespace: Neon.Kube.Config
Assembly: Neon.Kube.dll
Syntax
public class KubeConfigContext
Constructors
KubeConfigContext()
Default constructor.
Declaration
public KubeConfigContext()
KubeConfigContext(string)
Specifies the context name.
Declaration
public KubeConfigContext(string clusterName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | clusterName | Specifies the cluster name. |
Properties
Context
The cluster properties.
Declaration
[JsonProperty(PropertyName = "context", Required = Required.Always)]
[YamlMember(Alias = "context", ApplyNamingConventions = false)]
public KubeConfigContextConfig Context { get; set; }
Property Value
| Type | Description |
|---|---|
| KubeConfigContextConfig |
Name
Specifies the context name.
Declaration
[JsonProperty(PropertyName = "name", Required = Required.Always)]
[YamlMember(Alias = "name", ApplyNamingConventions = false)]
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
GetExtensionValue<T>(string, T)
Returns an extension value.
Declaration
public T GetExtensionValue<T>(string name, T @default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Specifies the extension name. |
| T | default | Specifies the value to be returned when the extension is not found. |
Returns
| Type | Description |
|---|---|
| T | The extension value. |
Type Parameters
| Name | Description |
|---|---|
| T | Specifies the value type. |
SetExtensionValue<T>(string, T)
Sets an extension value.
Declaration
public void SetExtensionValue<T>(string name, T value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Specifies the extension name. |
| T | value | Specifies the value being set. |
Type Parameters
| Name | Description |
|---|---|
| T | Specifies the value type. |