create_network_policy
Create Kubernetes NetworkPolicies using basic configuration or raw YAML manifests to control pod network traffic.
Instructions
Creates a new NetworkPolicy. Use either basic configuration or provide a raw YAML manifest.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | If true, simulates the action without making changes | |
| cluster | No | Target cluster name (default: 'default') | |
| namespace | Yes | The Kubernetes namespace | |
| policyName | No | The name of the NetworkPolicy | |
| podSelector | No | Label selector for the pods this policy applies to | |
| policyTypes | No | List of policy types (Ingress, Egress) | |
| yamlManifest | No | Full YAML manifest for advanced NetworkPolicy creation |