kubernetes
Generated by tinox doc
Kubernetes REST API client for tinox.core -- kubeconfig/in-cluster auth (incl. TLS client certs), a generic dynamic resource client that works with any Group/Version/Kind (including CRDs), and typed convenience classes for the common built-in resource kinds (Pod, Deployment, Service, ConfigMap, Secret, Job, Ingress, RBAC, ...).
| Module | Version | Group |
|---|---|---|
json (no local docs) | 1.1.4 | tinox.core |
http (no local docs) | 1.3.2 | tinox.core |
yaml (no local docs) | 1.1.3 | tinox.core |
class ClusterAuth
Fields
serverUrl | String | |
caCertPath | String | |
clientCertPath | String | |
clientKeyPath | String | |
bearerToken | String | |
namespace | String | |
insecureSkipTlsVerify | Bool |
@JsonSerializableclass ClusterRole
Fields
apiVersion | String | |
kind | String | |
metadata | ObjectMeta | |
rules | List<PolicyRule> |
Methods
fnc create(name: String, rules: List<PolicyRule>) → ClusterRole
@JsonSerializableclass ClusterRoleBinding
Fields
apiVersion | String | |
kind | String | |
metadata | ObjectMeta | |
subjects | List<Subject> | |
roleRef | RoleRef |
Methods
fnc create(name: String, subjects: List<Subject>, roleRef: RoleRef) → ClusterRoleBinding
@JsonSerializableclass ConfigMap
Fields
apiVersion | String | |
kind | String | |
metadata | ObjectMeta | |
data | Map<String, String> |
Methods
fnc create(name: String, namespace: String, data: Map<String, String>) → ConfigMap
@JsonSerializableclass Container
Fields
name | String | |
image | String | |
command | List<String> | |
args | List<String> | |
ports | List<ContainerPort> | |
env | List<EnvVar> | |
resources | ResourceRequirements |
Methods
fnc simple(name: String, image: String) → Container
@JsonSerializableclass ContainerPort
Fields
name | String | |
containerPort | Int64 | |
protocol | String |
@JsonSerializableclass ContainerStatus
Fields
name | String | |
ready | Bool | |
restartCount | Int64 | |
image | String |
@JsonSerializableclass CronJob
Fields
apiVersion | String | |
kind | String | |
metadata | ObjectMeta | |
spec | CronJobSpec | |
status | CronJobStatus |
Methods
fnc create(name: String, namespace: String, schedule: String, containers: List<Container>) → CronJob
@JsonSerializableclass CronJobSpec
Fields
schedule | String | |
jobTemplate | JobTemplateSpec | |
suspend | Bool |
@JsonSerializableclass CronJobStatus
Fields
lastScheduleTime | String |
@JsonSerializableclass DaemonSet
Fields
apiVersion | String | |
kind | String | |
metadata | ObjectMeta | |
spec | DaemonSetSpec | |
status | DaemonSetStatus |
Methods
fnc create(name: String, namespace: String, labels: Map<String, String>, containers: List<Container>) → DaemonSet
@JsonSerializableclass DaemonSetSpec
Fields
selector | LabelSelector | |
template | PodTemplateSpec |
@JsonSerializableclass DaemonSetStatus
Fields
desiredNumberScheduled | Int64 | |
currentNumberScheduled | Int64 | |
numberReady | Int64 |
@JsonSerializableclass Deployment
Fields
apiVersion | String | |
kind | String | |
metadata | ObjectMeta | |
spec | DeploymentSpec | |
status | DeploymentStatus |
Methods
fnc create(name: String, namespace: String, replicas: Int64, labels: Map<String, String>, containers: List<Container>) → Deployment
@JsonSerializableclass DeploymentSpec
Fields
replicas | Int64 | |
selector | LabelSelector | |
template | PodTemplateSpec |
@JsonSerializableclass DeploymentStatus
Fields
replicas | Int64 | |
readyReplicas | Int64 | |
availableReplicas | Int64 | |
updatedReplicas | Int64 |
@JsonSerializableclass EnvVar
Fields
name | String | |
value | String |
class GenericResourceOperations
Fields
client | KubernetesClient | |
group | String | |
version | String | |
plural | String | |
namespaced | Bool | |
namespace | String |
Methods
fnc of(client: KubernetesClient, group: String, version: String, plural: String, namespaced: Bool, namespace: String) → GenericResourceOperations
fn inNamespace(namespace: String) → GenericResourceOperations
fn basePath() → String
fn list() → JsonValue
fn get(name: String) → JsonValue
fn exists(name: String) → Bool
fn create(bodyJson: String) → JsonValue
fn update(name: String, bodyJson: String) → JsonValue
fn patchMerge(name: String, patchJson: String) → JsonValue
fn applyServerSide(name: String, bodyJson: String, fieldManager: String) → JsonValue
fn delete(name: String) → Nothing
fn watch() → Watch
@JsonSerializableclass HttpIngressPath
Fields
path | String | |
pathType | String | |
backend | IngressBackend |
Methods
fnc prefix(path: String, serviceName: String, port: Int64) → HttpIngressPath
@JsonSerializableclass HttpIngressRuleValue
Fields
paths | List<HttpIngressPath> |
@JsonSerializableclass Ingress
Fields
apiVersion | String | |
kind | String | |
metadata | ObjectMeta | |
spec | IngressSpec |
Methods
fnc create(name: String, namespace: String, ingressClassName: String, rules: List<IngressRule>) → Ingress
@JsonSerializableclass IngressBackend
Fields
service | IngressServiceBackend |
@JsonSerializableclass IngressRule
Fields
host | String | |
http | HttpIngressRuleValue |
Methods
fnc create(host: String, paths: List<HttpIngressPath>) → IngressRule
@JsonSerializableclass IngressServiceBackend
Fields
name | String | |
port | IngressServiceBackendPort |
@JsonSerializableclass IngressServiceBackendPort
Fields
number | Int64 |
@JsonSerializableclass IngressSpec
Fields
ingressClassName | String | |
rules | List<IngressRule> | |
tls | List<IngressTLS> |
@JsonSerializableclass IngressTLS
Fields
hosts | List<String> | |
secretName | String |
@JsonSerializableclass Job
Fields
apiVersion | String | |
kind | String | |
metadata | ObjectMeta | |
spec | JobSpec | |
status | JobStatus |
Methods
fnc create(name: String, namespace: String, containers: List<Container>) → Job
@JsonSerializableclass JobSpec
Fields
template | PodTemplateSpec | |
completions | Int64 | |
parallelism | Int64 | |
backoffLimit | Int64 |
@JsonSerializableclass JobStatus
Fields
succeeded | Int64 | |
failed | Int64 | |
active | Int64 |
@JsonSerializableclass JobTemplateSpec
Fields
metadata | ObjectMeta | |
spec | JobSpec |
class KubeConfigLoader
Methods
@Throwsfnc fromDefaultLocation() → ClusterAuth
@Throwsfnc fromDefaultLocationWithContext(contextName: String) → ClusterAuth
fnc defaultConfigPath() → String
@Throwsfnc fromFile(path: String) → ClusterAuth
@Throwsfnc fromFileWithContext(path: String, contextName: String) → ClusterAuth
@Throwsfnc inCluster() → ClusterAuth
fnc listContextNames(path: String) → List<String>
fnc currentContextName(path: String) → String
fnc findByName(list: YamlValue, name: String) → YamlValue
fnc resolveCertOrKeyFile(filePath: String, base64Data: String, tag: String) → String
class KubeResponse
Fields
statusCode | Int64 | |
body | String |
Methods
fn isSuccess() → Bool
fn json() → JsonValue
@Throwsfn throwIfError(context: String) → Nothing
class KubernetesClient
Fields
auth | ClusterAuth |
Methods
fnc fromDefaultConfig() → KubernetesClient
fnc fromKubeconfig(path: String) → KubernetesClient
fnc fromDefaultConfigWithContext(contextName: String) → KubernetesClient
fnc inCluster() → KubernetesClient
fnc withAuth(auth: ClusterAuth) → KubernetesClient
fn defaultNamespace() → String
fn resource(group: String, version: String, plural: String, namespaced: Bool) → GenericResourceOperations
fn pods() → GenericResourceOperations
fn services() → GenericResourceOperations
fn configMaps() → GenericResourceOperations
fn secrets() → GenericResourceOperations
fn serviceAccounts() → GenericResourceOperations
fn persistentVolumeClaims() → GenericResourceOperations
fn endpoints() → GenericResourceOperations
fn namespaces() → GenericResourceOperations
fn nodes() → GenericResourceOperations
fn persistentVolumes() → GenericResourceOperations
fn deployments() → GenericResourceOperations
fn replicaSets() → GenericResourceOperations
fn statefulSets() → GenericResourceOperations
fn daemonSets() → GenericResourceOperations
fn jobs() → GenericResourceOperations
fn cronJobs() → GenericResourceOperations
fn ingresses() → GenericResourceOperations
fn networkPolicies() → GenericResourceOperations
fn roles() → GenericResourceOperations
fn roleBindings() → GenericResourceOperations
fn clusterRoles() → GenericResourceOperations
fn clusterRoleBindings() → GenericResourceOperations
fn storageClasses() → GenericResourceOperations
fn applyTlsConfig() → Nothing
@Throwsfn request(method: String, path: String, body: String) → KubeResponse
@Throwsfn requestWithContentType(method: String, path: String, body: String, contentType: String) → KubeResponse
@Errorclass KubernetesError
* A Kubernetes client or API operation failed.
Fields
message | String |
@JsonSerializableclass LabelSelector
Fields
matchLabels | Map<String, String> |
@JsonSerializableclass Namespace
Fields
apiVersion | String | |
kind | String | |
metadata | ObjectMeta | |
status | NamespaceStatus |
Methods
fnc create(name: String) → Namespace
@JsonSerializableclass NamespaceStatus
Fields
phase | String |
@JsonSerializableclass Node
Fields
apiVersion | String | |
kind | String | |
metadata | ObjectMeta | |
status | NodeStatus |
@JsonSerializableclass NodeAddress
Fields
type | String | |
address | String |
@JsonSerializableclass NodeCondition
Fields
type | String | |
status | String |
@JsonSerializableclass NodeStatus
Fields
conditions | List<NodeCondition> | |
addresses | List<NodeAddress> |
@JsonSerializableclass ObjectMeta
Fields
name | String | |
namespace | String | |
uid | String | |
resourceVersion | String | |
creationTimestamp | String | |
labels | Map<String, String> | |
annotations | Map<String, String> |
Methods
fnc withName(name: String) → ObjectMeta
fnc withNameAndNamespace(name: String, namespace: String) → ObjectMeta
class ParsedUrl
Fields
host | String | |
port | Int64 | |
isHttps | Bool |
Methods
fnc parse(url: String) → ParsedUrl
@JsonSerializableclass PersistentVolumeClaim
Fields
apiVersion | String | |
kind | String | |
metadata | ObjectMeta | |
spec | PersistentVolumeClaimSpec | |
status | PersistentVolumeClaimStatus |
Methods
fnc create(name: String, namespace: String, accessMode: String, storageRequest: String, storageClassName: String) → PersistentVolumeClaim
@JsonSerializableclass PersistentVolumeClaimSpec
Fields
accessModes | List<String> | |
resources | ResourceRequirements | |
storageClassName | String |
Methods
fnc create(accessMode: String, storageRequest: String, storageClassName: String) → PersistentVolumeClaimSpec
@JsonSerializableclass PersistentVolumeClaimStatus
Fields
phase | String |
@JsonSerializableclass Pod
Fields
apiVersion | String | |
kind | String | |
metadata | ObjectMeta | |
spec | PodSpec | |
status | PodStatus |
Methods
fnc create(name: String, namespace: String, containers: List<Container>) → Pod
@JsonSerializableclass PodSpec
Fields
containers | List<Container> | |
initContainers | List<Container> | |
restartPolicy | String | |
serviceAccountName | String | |
nodeName | String | |
hostNetwork | Bool |
Methods
fnc withContainers(containers: List<Container>) → PodSpec
@JsonSerializableclass PodStatus
Fields
phase | String | |
podIP | String | |
hostIP | String | |
startTime | String | |
containerStatuses | List<ContainerStatus> |
@JsonSerializableclass PodTemplateSpec
Fields
metadata | ObjectMeta | |
spec | PodSpec |
Methods
fnc create(labels: Map<String, String>, containers: List<Container>) → PodTemplateSpec
@JsonSerializableclass PolicyRule
Fields
apiGroups | List<String> | |
resources | List<String> | |
verbs | List<String> |
Methods
fnc create(apiGroups: List<String>, resources: List<String>, verbs: List<String>) → PolicyRule
@JsonSerializableclass ReplicaSet
Fields
apiVersion | String | |
kind | String | |
metadata | ObjectMeta | |
spec | ReplicaSetSpec | |
status | ReplicaSetStatus |
Methods
fnc create(name: String, namespace: String, replicas: Int64, labels: Map<String, String>, containers: List<Container>) → ReplicaSet
@JsonSerializableclass ReplicaSetSpec
Fields
replicas | Int64 | |
selector | LabelSelector | |
template | PodTemplateSpec |
@JsonSerializableclass ReplicaSetStatus
Fields
replicas | Int64 | |
readyReplicas | Int64 | |
availableReplicas | Int64 |
@JsonSerializableclass ResourceRequirements
Fields
requests | Map<String, String> | |
limits | Map<String, String> |
Methods
fnc empty() → ResourceRequirements
@JsonSerializableclass Role
Fields
apiVersion | String | |
kind | String | |
metadata | ObjectMeta | |
rules | List<PolicyRule> |
Methods
fnc create(name: String, namespace: String, rules: List<PolicyRule>) → Role
@JsonSerializableclass RoleBinding
Fields
apiVersion | String | |
kind | String | |
metadata | ObjectMeta | |
subjects | List<Subject> | |
roleRef | RoleRef |
Methods
fnc create(name: String, namespace: String, subjects: List<Subject>, roleRef: RoleRef) → RoleBinding
@JsonSerializableclass RoleRef
Fields
apiGroup | String | |
kind | String | |
name | String |
Methods
fnc role(name: String) → RoleRef
fnc clusterRole(name: String) → RoleRef
@JsonSerializableclass Secret
Fields
apiVersion | String | |
kind | String | |
metadata | ObjectMeta | |
type | String | |
data | Map<String, String> | |
stringData | Map<String, String> |
Methods
fnc create(name: String, namespace: String, stringData: Map<String, String>) → Secret
@JsonSerializableclass Service
Fields
apiVersion | String | |
kind | String | |
metadata | ObjectMeta | |
spec | ServiceSpec |
Methods
fnc create(name: String, namespace: String, selector: Map<String, String>, ports: List<ServicePort>) → Service
@JsonSerializableclass ServiceAccount
Fields
apiVersion | String | |
kind | String | |
metadata | ObjectMeta |
Methods
fnc create(name: String, namespace: String) → ServiceAccount
@JsonSerializableclass ServicePort
Fields
name | String | |
port | Int64 | |
targetPort | Int64 | |
protocol | String | |
nodePort | Int64 |
Methods
fnc tcp(port: Int64, targetPort: Int64) → ServicePort
@JsonSerializableclass ServiceSpec
Fields
selector | Map<String, String> | |
ports | List<ServicePort> | |
type | String | |
clusterIP | String |
@JsonSerializableclass StatefulSet
Fields
apiVersion | String | |
kind | String | |
metadata | ObjectMeta | |
spec | StatefulSetSpec | |
status | StatefulSetStatus |
Methods
fnc create(name: String, namespace: String, serviceName: String, replicas: Int64, labels: Map<String, String>, containers: List<Container>) → StatefulSet
@JsonSerializableclass StatefulSetSpec
Fields
replicas | Int64 | |
selector | LabelSelector | |
serviceName | String | |
template | PodTemplateSpec |
@JsonSerializableclass StatefulSetStatus
Fields
replicas | Int64 | |
readyReplicas | Int64 |
@JsonSerializableclass Subject
Fields
kind | String | |
name | String | |
namespace | String |
Methods
fnc serviceAccount(name: String, namespace: String) → Subject
fnc user(name: String) → Subject
fn tinoxBytesToString(bytes: List<Int64>) → String
fn httpConnReadLine(conn: Int64) → String
class Watch
Fields
conn | Int64 | |
buffer | String | |
streamEnded | Bool |
Methods
@Throwsfnc open(client: KubernetesClient, path: String) → Watch
@Throwsfnc openRaw(client: KubernetesClient, path: String) → Watch
fn next() → String
fn readNextChunk() → String
fnc parseHex(s: String) → Int64
fn close() → Nothing