K8sManifest
K8sManifest deploys arbitrary Kubernetes manifests to the target cluster. Use it for resources that don’t have a dedicated Kyku resource type, or for applying pre-existing YAML files.
Supports inline manifest strings, file paths, entire directories, or raw JavaScript objects.
Config
Section titled “Config”| Property | Type | Required | Description |
|---|---|---|---|
cluster |
KubernetesCluster | string |
✅ | Target cluster |
namespace |
K8sNamespace | string |
❌ | Default namespace for resources without one |
dependsOn |
string[] |
❌ | Explicit dependency ordering |
manifest |
string |
❌ | Inline YAML manifest string |
manifestFile |
string |
❌ | Path to a YAML file |
manifestDir |
string |
❌ | Path to a directory of YAML files (applied recursively) |
manifestObject |
Record<string, unknown> |
❌ | Raw JavaScript object (converted to YAML) |
prune |
boolean |
❌ | Remove resources not in the manifest (defaults to true) |
forceConflicts |
boolean |
❌ | Force apply on resource conflicts (defaults to true) |
At least one of manifest, manifestFile, manifestDir, or manifestObject must be provided.
Example
Section titled “Example”// Inline manifestconst dashboard = new K8sManifest({ name: 'kubernetes-dashboard', cluster: myCluster, manifest: `apiVersion: v1kind: ServiceAccountmetadata: name: dashboard-admin---apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRoleBindingmetadata: name: dashboard-adminroleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: cluster-adminsubjects: - kind: ServiceAccount name: dashboard-admin namespace: default`,})
// From fileconst monitoring = new K8sManifest({ name: 'prometheus-stack', cluster: myCluster, manifestFile: './manifests/prometheus.yaml', prune: false,})
// From objectconst crd = new K8sManifest({ name: 'custom-resource', cluster: myCluster, manifestObject: { apiVersion: 'example.com/v1', kind: 'MyResource', metadata: { name: 'my-instance' }, spec: { replicas: 3 }, },})Provider support
Section titled “Provider support”| Provider | Supported |
|---|---|
| Kubernetes | ✅ |
| Hetzner | ❌ |
| DigitalOcean | ❌ |
| AWS | ❌ |
| GCP | ❌ |