K8sNamespace
K8sNamespace creates a Kubernetes namespace inside the target cluster. Namespaces provide scope for other K8s resources like deployments, services, and config maps.
Config
Section titled “Config”| Property | Type | Required | Description |
|---|---|---|---|
cluster |
KubernetesCluster | string |
✅ | Target cluster |
namespace |
K8sNamespace | string |
❌ | Parent namespace (for nested scoping) |
dependsOn |
string[] |
❌ | Explicit dependency ordering |
labels |
Record<string, string> |
❌ | Kubernetes labels applied to the namespace |
annotations |
Record<string, string> |
❌ | Kubernetes annotations applied to the namespace |
Example
Section titled “Example”const teamNamespace = new K8sNamespace({ name: 'team-a', cluster: myCluster, labels: { environment: 'staging', team: 'platform', }, annotations: { 'owner': 'platform-team', },})Provider support
Section titled “Provider support”| Provider | Supported |
|---|---|
| Kubernetes | ✅ |
| Hetzner | ❌ |
| DigitalOcean | ❌ |
| AWS | ❌ |
| GCP | ❌ |