kubectl_create
Create Kubernetes resources from manifests, files, or subcommands to manage namespaces, deployments, services, configmaps, and secrets.
Instructions
Create Kubernetes resources using various methods (from file or using subcommands)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name of the resource to create | |
| port | No | Port that the container exposes | |
| image | No | Image to use for the containers in the deployment | |
| dryRun | No | If true, only validate the resource, don't actually execute the operation | |
| labels | No | Labels to apply to the resource (e.g. ["key1=value1", "key2=value2"]) | |
| output | No | Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file | yaml |
| command | No | Command to run in the container | |
| context | No | Kubeconfig Context to use for the command (optional - defaults to null) | |
| suspend | No | Whether to suspend the CronJob | |
| tcpPort | No | Port pairs for tcp service (e.g. ["80:8080", "443:8443"]) | |
| filename | No | Path to a YAML file to create resources from | |
| fromFile | No | Path to file for creating configmap (e.g. ["key1=/path/to/file1", "key2=/path/to/file2"]) | |
| manifest | No | YAML manifest to create resources from | |
| replicas | No | Number of replicas to create for the deployment | |
| schedule | No | Cron schedule expression for the CronJob (e.g. "*/5 * * * *") | |
| validate | No | If true, validate resource schema against server schema | |
| namespace | No | Kubernetes namespace | default |
| secretType | No | Type of secret to create (generic, docker-registry, tls) | |
| annotations | No | Annotations to apply to the resource (e.g. ["key1=value1", "key2=value2"]) | |
| fromLiteral | No | Key-value pair for creating configmap (e.g. ["key1=value1", "key2=value2"]) | |
| serviceType | No | Type of service to create (clusterip, nodeport, loadbalancer, externalname) | |
| resourceType | No | Type of resource to create (namespace, configmap, deployment, service, etc.) |