• NeonSDK
  • NeonKUBE
Search Results for

    Show / Hide Table of Contents
    • Neon.Kube
      • ClusterContainerImage
      • ClusterDefinitionException
      • ClusterDeploymentStatus
      • ClusterDetails
      • ClusterHealth
      • ClusterHost
      • ClusterInfo
      • ClusterLock
      • ClusterManifest
      • ClusterNodeState
      • ClusterNodeTelemetry
      • ClusterSetupFailureMetadata
      • ClusterState
      • ClusterTelemetry
      • GrpcLogExporter
      • GrpcTraceExporter
      • HostingReadinessException
      • KubeClientConfig
      • KubeClientPlatform
      • KubeClusterAdvice
      • KubeConfigMapName
      • KubeConst
      • KubeDiagnostics
      • KubeDownloads
      • KubeEnv
      • KubeHelper
      • KubeImageType
      • KubeMinioBucket
      • KubeNamespace
      • KubeNodeFolder
      • KubeNodePort
      • KubePort
      • KubeSecretName
      • KubeService
      • KubeServiceAdvice
      • KubeSetupProperty
      • KubeSetupState
      • KubeVersions
      • NeonAnnotation
      • NeonKubeException
      • NeonLabel
      • NeonNodeTaskType
      • NodeImageInfo
      • PriorityClass
      • PriorityClass.PriorityDef
      • PrometheusClient
      • PrometheusMatrixResult
      • PrometheusMatrixValue
      • PrometheusResponseData<T>
      • PrometheusResponseStatus
      • PrometheusResponse<T>
      • PrometheusResult
      • PrometheusResultType
      • PrometheusTimeSeriesValue
      • PrometheusTimeSeriesValueConverter
      • PrometheusVectorResult
      • PrometheusVectorValue
      • TypedConfigMap<TConfigMapData>
      • TypedSecret<TSecretData>
      • VersionException
    • Neon.Kube.BuildInfo
      • ThisAssembly
      • ThisAssembly.Git
      • ThisAssembly.Git.BaseVersion
      • ThisAssembly.Git.SemVer
    • Neon.Kube.Clients
      • AzureComputePlan
      • AzureImageDetails
      • AzureImageReference
      • HeadendClient
      • HeadendClient.__Cluster
      • HeadendClient.__ClusterSetup
      • HeadendClient.__NeonDesktop
    • Neon.Kube.ClusterDef
      • AcmeOptions
      • AddressRule
      • AddressRuleAction
      • ApiServerOptions
      • AwsHelper
      • AwsHostingOptions
      • AwsNetworkOptions
      • AwsNodeOptions
      • AwsVolumeType
      • AzureCloudEnvironment
      • AzureCloudEnvironments
      • AzureHelper
      • AzureHostingOptions
      • AzureNetworkOptions
      • AzureNodeOptions
      • AzureStorageType
      • BareMetalHostingOptions
      • CloudOptions
      • ClusterDefinition
      • ClusterPurpose
      • ContainerOptions
      • DeploymentOptions
      • FeatureOptions
      • FeatureOptions.HarborOptions
      • GoogleHostingOptions
      • HealthCheckOptions
      • HostingEnvironment
      • HostingOptions
      • HyperVHostingOptions
      • HypervisorHost
      • HypervisorHostingOptions
      • HypervisorNodeOptions
      • IngressProtocol
      • IngressRule
      • JobOptions
      • JobSchedule
      • KubernetesOptions
      • LogOptions
      • MetricsOptions
      • MetricsStorageOptions
      • MinioOptions
      • MonitorOptions
      • NetworkCni
      • NetworkOptions
      • NodeDefinition
      • NodeLabels
      • NodeOptions
      • NodeRole
      • OpenEbsEngine
      • OpenEbsOptions
      • Registry
      • ResourceTag
      • SecurityOptions
      • StorageOptions
      • TraceOptions
      • XenServerHostingOptions
    • Neon.Kube.ClusterMetadata
      • ClusterLockState
      • ClusterLockStatus
    • Neon.Kube.Config
      • ClusterLoginExport
      • KubeClusterInfo
      • KubeConfig
      • KubeConfigAuthProvider
      • KubeConfigCluster
      • KubeConfigClusterConfig
      • KubeConfigContext
      • KubeConfigContextConfig
      • KubeConfigEnvironmentVariable
      • KubeConfigExecConfig
      • KubeConfigExecInteractiveMode
      • KubeConfigPreferences
      • KubeConfigUser
      • KubeConfigUserConfig
      • KubeContextName
      • KubeFileDetails
      • KubeSshKey
      • NeonKubeExtensions
    • Neon.Kube.Deployment
      • ClusterDeployment
      • NodeDeployment
    • Neon.Kube.DesktopService
      • DesktopService
      • GrpcDesktopService
    • Neon.Kube.Glauth
      • GlauthGroup
      • GlauthUser
      • GlauthUserCapability
    • Neon.Kube.GrpcProto
      • GrpcError
      • GrpcErrorExtensions
      • GrpcServiceException
      • NeonGrpcServices
    • Neon.Kube.GrpcProto.Desktop
      • DesktopConverters
      • GrpGetVmDrivesReply
      • GrpcAddVmDriveRequest
      • GrpcAddVmRequest
      • GrpcBaseReply
      • GrpcCompactDriveRequest
      • GrpcEjectVmDvdRequest
      • GrpcFindIPAddressReply
      • GrpcFindIPAddressRequest
      • GrpcFindNatByNameRequest
      • GrpcFindNatBySubnetRequest
      • GrpcFindNatReply
      • GrpcGetSwitchReply
      • GrpcGetSwitchRequest
      • GrpcGetVmDrivesRequest
      • GrpcGetVmNetworkAdaptersReply
      • GrpcGetVmNetworkAdaptersRequest
      • GrpcGetVmReply
      • GrpcGetVmRequest
      • GrpcGetWindowsOptionalFeaturesReply
      • GrpcGetWindowsOptionalFeaturesRequest
      • GrpcInsertVmDvdRequest
      • GrpcIsNestedVirtualizationReply
      • GrpcIsNestedVirtualizationRequest
      • GrpcListLocalHostsSectionsReply
      • GrpcListLocalHostsSectionsRequest
      • GrpcListNatsReply
      • GrpcListNatsRequest
      • GrpcListSwitchesReply
      • GrpcListSwitchesRequest
      • GrpcListVmsReply
      • GrpcListVmsRequest
      • GrpcLocalHostSection
      • GrpcNewExternalSwitchRequest
      • GrpcNewInternalSwitchRequest
      • GrpcRelayLogBatchReply
      • GrpcRelayLogBatchRequest
      • GrpcRelayTraceBatchReply
      • GrpcRelayTraceBatchRequest
      • GrpcRemoveSwitchRequest
      • GrpcRemoveVmRequest
      • GrpcSaveVmRequest
      • GrpcStartVmRequest
      • GrpcStopVmRequest
      • GrpcVirtualDrive
      • GrpcVirtualIPAddress
      • GrpcVirtualMachine
      • GrpcVirtualMachineNetworkAdapter
      • GrpcVirtualNat
      • GrpcVirtualSwitch
      • GrpcVmExistsReply
      • GrpcVmExistsRequest
      • IGrpcDesktopService
    • Neon.Kube.Hosting
      • HostedNodeInfo
      • HostingCapabilities
      • HostingConstrainedResourceType
      • HostingLoader
      • HostingManager
      • HostingManagerFactory
      • HostingProviderAttribute
      • HostingReadiness
      • HostingReadinessProblem
      • HostingResourceAvailability
      • HostingResourceConstraint
      • IHostingLoader
      • IHostingManager
      • IHostingManagerFactory
      • StopMode
    • Neon.Kube.Hosting.Aws
      • AwsHostingManager
    • Neon.Kube.Hosting.Azure
      • AzureHostingManager
    • Neon.Kube.Hosting.BareMetal
      • BareMetalHostingManager
    • Neon.Kube.Hosting.Google
      • GoogleHostingManager
    • Neon.Kube.Hosting.HyperV
      • HyperVHostingManager
    • Neon.Kube.Hosting.XenServer
      • XenServerHostingManager
      • XenServerHostingManager.DiskTemplateInfo
    • Neon.Kube.K8s
      • KubernetesExtensions
      • KubernetesObjectMetadata
      • KubernetesRetryHandler
      • LeaderElectionConfig
      • LeaderElector
      • V1CustomObjectList<T>
      • WatchEvent<T>
      • Watcher<T>
    • Neon.Kube.Models
      • AzureComputePlan
      • AzureImageDetails
      • AzureImageReference
    • Neon.Kube.Models.Headend
      • IClusterApi
      • IClusterSetupApi
      • INeonDesktopApi
      • Stub
    • Neon.Kube.Oauth2Proxy
      • Oauth2ProxyConfig
      • Oauth2ProxyHeader
      • Oauth2ProxyHeaderValue
      • Oauth2ProxyLoginUrlParameterRule
      • Oauth2ProxyLoginUrlParameters
      • Oauth2ProxyOidcOptions
      • Oauth2ProxyProvider
      • Oauth2ProxyProviderType
      • Oauth2ProxySecretSource
      • Oauth2ProxyServer
      • Oauth2ProxyTls
      • Oauth2ProxyUpstream
      • Oauth2ProxyUpstreamConfig
    • Neon.Kube.PortForward
      • IPortForwardManager
      • PortForwardManager
    • Neon.Kube.Proxy
      • ClusterProxy
      • ClusterProxy.Operation
      • ClusterResetOptions
      • NodeProxyCreator
    • Neon.Kube.Resources
      • CustomResourceException
      • ResourceHelper
    • Neon.Kube.Resources.Calico
      • V1FelixConfiguration
    • Neon.Kube.Resources.CertManager
      • AcmeChallengeSolver
      • AcmeChallengeSolverDns01
      • AcmeExternalAccountBinding
      • AcmeIssuer
      • AcmeIssuerDns01ProviderRoute53
      • AcmeIssuerDns01ProviderWebhook
      • AcmeSecretKeySelector
      • CertificateDnsNameSelector
      • ChallengeAction
      • ChallengePayload
      • ChallengeRequest
      • ChallengeResponse
      • ClusterIssuer
      • IssuerRef
      • JKS
      • KeyAlgorithm
      • KeyEncoding
      • Keystores
      • PKCS12
      • PasswordSecretRef
      • PrivateKey
      • RotationPolicy
      • Subject
      • V1Certificate
      • V1CertificateRequest
      • V1CertificateSpec
      • V1CertificateStatus
      • V1IssuerSpec
      • X509Usages
    • Neon.Kube.Resources.Cluster
      • TestStatus
      • V1CrioConfiguration
      • V1CrioConfiguration.CrioConfigurationSpec
      • V1NeonClusterJobs
      • V1NeonClusterJobs.JobSchedule
      • V1NeonClusterJobs.JobStatus
      • V1NeonClusterJobs.NeonClusterJobsSpec
      • V1NeonClusterJobs.NeonClusterJobsStatus
      • V1NeonContainerRegistry
      • V1NeonContainerRegistry.RegistrySpec
      • V1NeonDashboard
      • V1NeonDashboard.NeonDashboardSpec
      • V1NeonNodeTask
      • V1NeonNodeTask.Phase
      • V1NeonNodeTask.TaskSpec
      • V1NeonNodeTask.TaskStatus
      • V1NeonSsoCallbackUrl
      • V1NeonSsoClient
      • V1NeonSsoConnector
      • V1NeonTestObject
      • V1SsoCallbackUrlSpec
      • V1SsoCallbackUrlStatus
      • V1SsoClientSpec
      • V1SsoClientStatus
      • V1TestSpec
    • Neon.Kube.Resources.Dex
      • DexConfig
      • DexConnector
      • DexConnectorConverter
      • DexConnectorType
      • DexConnector<T>
      • DexExpiryConfig
      • DexFrontendConfig
      • DexGrpcConfig
      • DexLdapConfig
      • DexLdapSearch
      • DexLogConfig
      • DexOauth2Config
      • DexOidcClaimMapping
      • DexOidcConfig
      • DexRefreshTokenConfig
      • DexStaticUser
      • DexStorage
      • DexStorageType
      • DexTelemetryConfig
      • DexUserMatcher
      • DexWebConfig
      • IDexConnectorConfig
      • IDexConnector<T>
      • IV1DexConnector
      • Oauth2ResponseType
    • Neon.Kube.Resources.ExternalDns
      • DnsEndpoint
      • DnsRecordType
      • ExternalDnsEndpoint
      • V1DnsEndpointSpec
    • Neon.Kube.Resources.Grafana
      • V1Grafana
      • V1GrafanaDashboard
      • V1GrafanaDashboardSpec
      • V1GrafanaDatasource
    • Neon.Kube.Resources.Harbor
      • V1HarborCluster
      • V1HarborConfiguration
      • V1HarborNotaryServer
      • V1HarborNotarySigner
    • Neon.Kube.Resources.Istio
      • Abort
      • AuthorizationPolicyAction
      • AuthorizationPolicyOperation
      • AuthorizationPolicyRule
      • AuthorizationPolicyRule.From
      • AuthorizationPolicyRule.To
      • AuthorizationPolicySource
      • ClientTLSSettings
      • CorsPolicy
      • Delay
      • Delegate
      • Destination
      • ExtensionProvider
      • HTTPFaultInjection
      • HTTPMatchRequest
      • HTTPMethod
      • HTTPRedirect
      • HTTPRetry
      • HTTPRewrite
      • HTTPRoute
      • HTTPRouteDestination
      • HeaderOperations
      • Headers
      • L4MatchAttributes
      • Location
      • Percent
      • Port
      • PortProtocol
      • PortSelector
      • Resolution
      • RouteDestination
      • Server
      • ServerTLSSettings
      • ServiceEntry
      • StringMatch
      • TCPRoute
      • TLSMatchAttributes
      • TLSMode
      • TLSProtocol
      • TLSRoute
      • Tracing
      • TracingProvider
      • TrafficPolicy
      • UInt32Value
      • V1AuthorizationPolicy
      • V1AuthorizationPolicySpec
      • V1DestinationRule
      • V1DestinationRuleSpec
      • V1Gateway
      • V1GatewaySpec
      • V1ServiceEntrySpec
      • V1Telemetry
      • V1TelemetrySpec
      • V1VirtualService
      • V1VirtualServiceSpec
      • WorkloadEntry
      • WorkloadSelector
    • Neon.Kube.Resources.JsonConverters
      • DexConnectorJsonConverter
      • JsonCollectionItemConverter<TDatatype, TConverterType>
      • JsonV1ResourceConverter
    • Neon.Kube.Resources.Kiali
      • V1Kiali
    • Neon.Kube.Resources.Minio
      • BucketQuota
      • RetentionMode
      • RetentionSpec
      • V1MinioBucket
      • V1MinioBucket.V1MinioBucketSpec
      • V1MinioBucket.V1MinioBucketStatus
      • V1MinioTenant
      • VersioningMode
    • Neon.Kube.Resources.OpenEBS
      • BlockDeviceCapacity
      • BlockDeviceDetails
      • BlockDeviceDevLink
      • BlockDeviceType
      • DataRaidGroupTypes
      • DevLinkType
      • DriveType
      • FileSystemInfo
      • V1CStorBlockDevice
      • V1CStorBlockDeviceList
      • V1CStorBlockDeviceRef
      • V1CStorBlockDeviceSpec
      • V1CStorDataRaidGroup
      • V1CStorPoolCluster
      • V1CStorPoolClusterList
      • V1CStorPoolClusterSpec
      • V1CStorPoolConfig
      • V1CStorPoolSpec
    • Neon.Kube.Resources.Prometheus
      • Endpoint
      • NamespaceSelector
      • V1ServiceMonitor
      • V1ServiceMonitorSpec
    • Neon.Kube.SSH
      • INodeSshProxy
      • NodeSshProxyExtensions
      • NodeSshProxy<TMetadata>
    • Neon.Kube.Setup
      • DesktopServiceProxy
      • ISetupController
      • ISetupControllerStep
      • KubeSetup
      • NodeLog
      • PrepareClusterOptions
      • SetupClusterOptions
      • SetupClusterStatus
      • SetupConsoleWriter
      • SetupController<NodeMetadata>
      • SetupDisposition
      • SetupNodeStatus
      • SetupProgressDelegate
      • SetupProgressMessage
      • SetupStatusChangedDelegate
      • SetupStepDetails
      • SetupStepState
      • SetupStepStatus
    • Neon.Kube.Xunit
      • AwsClusterDefinitions
      • AzureClusterDefinitions
      • ClusterFactAttribute
      • ClusterFixture
      • ClusterFixtureOptions
      • ClusterTheoryAttribute
      • HyperVClusterDefinitions
      • KubeTestHelper
      • KubeTestManager
      • XenServerClustersDefinitions

    Class KubeConfig

    Used to manage serialization of Kubernetes kubeconfig files. These are used to manage cluster contexts on client machines: more information.

    Inheritance
    object
    KubeConfig
    Namespace: Neon.Kube.Config
    Assembly: Neon.Kube.dll
    Syntax
    public class KubeConfig

    Constructors

    KubeConfig()

    Default constructor.

    Declaration
    public KubeConfig()

    Properties

    ApiVersion

    Specifies cluster API server protocol version (defaults to v1).

    Declaration
    [JsonProperty(PropertyName = "apiVersion", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
    [YamlMember(Alias = "apiVersion", ApplyNamingConventions = false)]
    public string ApiVersion { get; set; }
    Property Value
    Type Description
    string

    Cluster

    Returns the current cluster or null.

    Declaration
    [JsonIgnore]
    [YamlIgnore]
    public KubeConfigCluster Cluster { get; }
    Property Value
    Type Description
    KubeConfigCluster

    Clusters

    Lists cluster configurations.

    Declaration
    [JsonProperty(PropertyName = "clusters", Required = Required.Always)]
    [YamlMember(Alias = "clusters", ApplyNamingConventions = false)]
    public List<KubeConfigCluster> Clusters { get; set; }
    Property Value
    Type Description
    List<KubeConfigCluster>

    Context

    Returns the current context or null.

    Declaration
    [JsonIgnore]
    [YamlIgnore]
    public KubeConfigContext Context { get; }
    Property Value
    Type Description
    KubeConfigContext

    Contexts

    Lists config contexts.

    Declaration
    [JsonProperty(PropertyName = "contexts", Required = Required.Always)]
    [YamlMember(Alias = "contexts", ApplyNamingConventions = false)]
    public List<KubeConfigContext> Contexts { get; set; }
    Property Value
    Type Description
    List<KubeConfigContext>

    CurrentContext

    Specifies the name of the current context or null when there is no current context.

    Declaration
    [JsonProperty(PropertyName = "current-context", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
    [YamlMember(Alias = "current-context", ApplyNamingConventions = false)]
    public string CurrentContext { get; set; }
    Property Value
    Type Description
    string

    Kind

    Identifies the document type: Config.

    Declaration
    [JsonProperty(PropertyName = "kind", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
    [YamlMember(Alias = "kind", ApplyNamingConventions = false)]
    public string Kind { get; set; }
    Property Value
    Type Description
    string

    Preferences

    Optional global kubeconfig preferences.

    Declaration
    [JsonProperty(PropertyName = "preferences", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
    [YamlMember(Alias = "preferences", ApplyNamingConventions = false)]
    public KubeConfigPreferences Preferences { get; set; }
    Property Value
    Type Description
    KubeConfigPreferences

    User

    Returns the current user or null.

    Declaration
    [JsonIgnore]
    [YamlIgnore]
    public KubeConfigUser User { get; }
    Property Value
    Type Description
    KubeConfigUser

    Users

    Lists the user configurations.

    Declaration
    [JsonProperty(PropertyName = "users", Required = Required.Always)]
    [YamlMember(Alias = "users", ApplyNamingConventions = false)]
    public List<KubeConfigUser> Users { get; set; }
    Property Value
    Type Description
    List<KubeConfigUser>

    Methods

    Clone(bool)

    Constructs a deep clone of the instance.

    Declaration
    public KubeConfig Clone(bool currentOnly = false)
    Parameters
    Type Name Description
    bool currentOnly

    Optionally strips out the non-current contexts, clusters, and users.

    Returns
    Type Description
    KubeConfig

    The deep cloned KubeConfig.

    CloneAndSetContext(string)

    Searches the config for the named context. If it's present, the method will clone the config, make the named context as current and then remove all other contexts and users. null will be returned if the named context doesn't exist.

    This is handy when you need to operate on a cluster that's not the current one.

    Declaration
    public KubeConfig CloneAndSetContext(string contextName)
    Parameters
    Type Name Description
    string contextName
    Returns
    Type Description
    KubeConfig

    The new KubeConfig with the specified context set or null when the desired context does exist.

    GetCluster(string)

    Returns a Kubernetes context by name.

    Declaration
    public KubeConfigCluster GetCluster(string name)
    Parameters
    Type Name Description
    string name

    The cluster name.

    Returns
    Type Description
    KubeConfigCluster

    The KubeConfigCluster or null.

    GetContext(KubeContextName)

    Returns a Kubernetes context by name.

    Declaration
    public KubeConfigContext GetContext(KubeContextName name)
    Parameters
    Type Name Description
    KubeContextName name

    The raw context name.

    Returns
    Type Description
    KubeConfigContext

    The KubeConfigContext or null.

    GetContext(string)

    Returns a Kubernetes context using a raw context name.

    Declaration
    public KubeConfigContext GetContext(string rawName)
    Parameters
    Type Name Description
    string rawName

    The raw context name.

    Returns
    Type Description
    KubeConfigContext

    The KubeConfigContext or null.

    GetCurrent(out KubeConfigContext, out KubeConfigCluster, out KubeConfigUser)

    Obtains the current context, cluster, and user in one go.

    Declaration
    public void GetCurrent(out KubeConfigContext context, out KubeConfigCluster cluster, out KubeConfigUser user)
    Parameters
    Type Name Description
    KubeConfigContext context

    Returns as the current context or null.

    KubeConfigCluster cluster

    Returns as the current cluster or null.

    KubeConfigUser user

    Returns as the current user or null.

    Remarks
    note

    This method returns null for all values when there is no current context and when there is a current context, it ensures that the referenced context, cluster and user actually exists, throwing an InvalidDataException when any are missing.

    Exceptions
    Type Condition
    InvalidDataException

    Thrown when one or both of the referenced current context, cluster or user doesn't exist.

    GetUser(string)

    Returns a Kubernetes user by name.

    Declaration
    public KubeConfigUser GetUser(string name)
    Parameters
    Type Name Description
    string name

    The user name.

    Returns
    Type Description
    KubeConfigUser

    The KubeConfigUser or null.

    Load(string)

    Reads and returns information loaded from the user's ~/.kube/config file or the specified file.

    Declaration
    public static KubeConfig Load(string configPath = null)
    Parameters
    Type Name Description
    string configPath

    Optionally specifies the location of the kubeconfig file. This defaults to the user's ~/.kube/config file.

    Returns
    Type Description
    KubeConfig

    The parsed KubeConfig or an empty config if the file doesn't exist.

    Exceptions
    Type Condition
    NeonKubeException

    Thrown when the current config is invalid.

    Reload()

    Reloads the kubeconfig from the global config file.

    Declaration
    public void Reload()
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown when the config is not backed by a file.

    RemoveCluster(string)

    Removes a cluster from the config as well as any contexts referencing it.

    Declaration
    public void RemoveCluster(string clusterName)
    Parameters
    Type Name Description
    string clusterName

    RemoveContext(KubeConfigContext, bool, bool)

    Removes a Kubernetes context, if it exists.

    Declaration
    public void RemoveContext(KubeConfigContext context, bool removeClusterAndUser = true, bool noSave = false)
    Parameters
    Type Name Description
    KubeConfigContext context

    The context to be removed.

    bool removeClusterAndUser

    Optionally disable removal of the referenced cluster and user if they're not referenced elsewhere (defaults to true).

    bool noSave

    Optionally prevent context save after the change.

    RemoveContext(KubeContextName, bool)

    Removes a Kubernetes context by name, if it exists.

    Declaration
    public void RemoveContext(KubeContextName name, bool noSave = false)
    Parameters
    Type Name Description
    KubeContextName name

    The context name.

    bool noSave

    Optionally prevent context save after the change.

    Save(string)

    Persists the KubeConfig to the user's ~/.kube/config file or the specified file.

    Declaration
    public void Save(string configPath = null)
    Parameters
    Type Name Description
    string configPath

    Optionally specifies the location of the kubeconfig file. This defaults to the path the config was loaded from.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown when the config was not loaded from a file and configPath is not specified.

    SetContext(string)

    Sets the current context.

    Declaration
    public void SetContext(string contextName = null)
    Parameters
    Type Name Description
    string contextName

    The name of the current context or null to deselect the current context.

    Exceptions
    Type Condition
    NeonKubeException

    Thrown if the context does not exist.

    Validate(bool)

    Validates the kubeconfig.

    Declaration
    public void Validate(bool needsCurrentCluster = false)
    Parameters
    Type Name Description
    bool needsCurrentCluster

    Optionally specifies that the config must have a current context identifying the cluster and user.

    Exceptions
    Type Condition
    NeonKubeException

    Thrown when the current config is invalid.

    In this article
    Back to top © Copyright 2005-2023 by NEONFORGE LLC