Kubernetes models in TypeScript.
Install with npm.
npm install kubernetes-models
import { Pod } from "kubernetes-models/v1";
// Create a new instance
const pod = new Pod({
metadata: {
name: "foo"
},
spec: {
containers: []
}
});
// Validate against JSON schema
pod.validate();
See examples folder for more examples.
import { iPodSchema } from "kubernetes-models/v1/Pod.schema";
const pod: unknown = {
apiVersion: "v1",
kind: "Pod",
spec: {
containers: []
}
};
// Validate against zod schema
iPodSchema.parse(pod);
- kubernetes-models - Kubernetes models.
- @kubernetes-models/apimachinery - Types for Kubernetes API objects.
- @kubernetes-models/argo-cd - Argo CD models.
- @kubernetes-models/argo-rollouts - Argo Rollouts models.
- @kubernetes-models/autoscaler - Kubernetes Autoscaler models.
- @kubernetes-models/cert-manager - cert-manager models.
- @kubernetes-models/cilium - Cilium CRD.
- @kubernetes-models/contour - Contour models.
- @kubernetes-models/elastic-cloud - Elastic Cloud on Kubernetes (ECK) models.
- @kubernetes-models/envoy-gateway - Envoy Gateway models.
- @kubernetes-models/external-secrets - External secrets models.
- @kubernetes-models/flagger - Flagger models.
- @kubernetes-models/flux-cd - Flux CD models.
- @kubernetes-models/gateway-api - Gateway API models.
- @kubernetes-models/gke - Google Kubernetes Engine (GKE) models.
- @kubernetes-models/grafana-agent-operator - Grafana agent operator models.
- @kubernetes-models/grafana-operator - Grafana operator models.
- @kubernetes-models/hierarchical-namespaces - Hierarchical Namespace models.
- @kubernetes-models/istio - Istio models.
- @kubernetes-models/jaeger-operator - Jaeger operator models.
- @kubernetes-models/k8ssandra-operator - K8ssandra models.
- @kubernetes-models/kapp-controller - Carvel kapp contoller models.
- @kubernetes-models/karpenter - Karpenter models.
- @kubernetes-models/keda - KEDA models.
- @kubernetes-models/knative - Knative models.
- @kubernetes-models/kubedb - KubeDB models.
- @kubernetes-models/kyverno - Kyverno models.
- @kubernetes-models/linkerd - Linkerd models.
- @kubernetes-models/nats - NATS models.
- @kubernetes-models/pipelines-as-code - Pipelines-as-Code models.
- @kubernetes-models/postgres-operator - PostgreSQL operator models.
- @kubernetes-models/prometheus-operator - Prometheus operator models.
- @kubernetes-models/rabbitmq-cluster-operator - RabbitMQ cluster operator models.
- @kubernetes-models/rabbitmq-messaging-topology-operator - RabbitMQ Messaging Topology Operator models.
- @kubernetes-models/redis-operator - Redis Operator models.
- @kubernetes-models/sealed-secrets - sealed-secrets models.
- @kubernetes-models/seldon-core-operator - SeldonCore operator models.
- @kubernetes-models/shipwright - Shipwright CRD.
- @kubernetes-models/smi - Service Mesh Interface (SMI) models.
- @kubernetes-models/spicedb - SpiceDB models.
- @kubernetes-models/spiffe - SPIFFE models.
- @kubernetes-models/thanos-operator - Thanos operator models.
- @kubernetes-models/tidb-operator - TiDB Operator models.
- @kubernetes-models/traefik - Traefik Operator models.
- @kubernetes-models/victoria-metrics-operator - VictoriaMetrics operator models.
- @kubernetes-models/crd-generate - Generate Kubernetes models for custom resource definitions (CRD).
- @kubernetes-models/openapi-generate - Generate Kubernetes models from OpenAPI schema.
- @kubernetes-models/base - Base model for Kubernetes models.
- @kubernetes-models/validate - Validation library for Kubernetes models.
- @kubernetes-models/generate - Type declarations and utilities for Kubernetes model generation.
- @kubernetes-models/read-input - Read input from file, URL or stdin.
- @kubernetes-models/string-util - Utility functions for strings.
MIT