Show / Hide Table of Contents

Class KubernetesObject

Represents a generic Kubernetes object.

Inheritance
object
KubernetesObject
Implements
IKubernetesObject
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: k8s
Assembly: KubernetesClient.dll
Syntax
public class KubernetesObject : IKubernetesObject
Remarks

You can use the KubernetesObject if you receive JSON from a Kubernetes API server but are unsure which object the API server is about to return. You can parse the JSON as a KubernetesObject and use the ApiVersion and Kind properties to get basic metadata about any Kubernetes object. You can then

Constructors

View Source

KubernetesObject()

Declaration
public KubernetesObject()

Properties

View Source

ApiVersion

Gets or sets aPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources

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

Kind

Gets or sets kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

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

Implements

IKubernetesObject

Extension Methods

ModelExtensions.ApiGroup(IKubernetesObject)
ModelExtensions.ApiGroupAndVersion(IKubernetesObject)
ModelExtensions.ApiGroupVersion(IKubernetesObject)
ModelExtensions.GetApiGroupAndVersion(IKubernetesObject, out string, out string)
Extensions.GetKubernetesTypeMetadata<T>(T)
Extensions.Initialize<T>(T)
  • View Source
In this article
Back to top Generated by DocFX