clusterport
v0.1.0Core kubectl operations: get, describe, logs, apply, scale, patch, rollout and explain.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
kubectl_get
Get Kubernetes resources with kubectl get, as JSON by default.
| Parameter | Type | Description |
|---|---|---|
resource_type * | string | Kubernetes resource type to get, such as pods, deployments, or services. |
name | string | Name of the specific resource to get; when omitted, all resources of the type are listed. |
namespace | string | Namespace of the resource to get; when omitted, the current-context default namespace is used. |
output_format | string | Output format for kubectl get, such as json or yaml; defaults to json. |
kubectl_describe
Describe one Kubernetes resource with kubectl describe.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the resource to describe. |
resource_type * | string | Kubernetes resource type to describe, such as pod, deployment, or service. |
namespace | string | Namespace of the resource to describe; when omitted, the current-context default namespace is used. |
kubectl_logs
Fetch logs from a Kubernetes pod with kubectl logs.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the pod to fetch logs from. |
container | string | Container name within the pod to fetch logs from, for pods with multiple containers. |
namespace | string | Namespace of the pod; when omitted, the current-context default namespace is used. |
kubectl_apply
Apply a manifest with kubectl apply, sent over stdin.
| Parameter | Type | Description |
|---|---|---|
manifest * | string | Kubernetes manifest content to apply, sent to kubectl apply over stdin. |
dry_run | boolean | When true, run as a client-side dry run without persisting any changes. |
namespace | string | Namespace to apply the manifest into; when omitted, the manifest or default namespace is used. |
kubectl_create
Create a resource from a generated manifest spec, sent over stdin.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name for the resource to create. |
resource_type * | string | Kubernetes resource type to create, such as deployment or pod. |
image | string | Container image to use in the generated manifest; defaults to the resource name when omitted. |
namespace | string | Namespace to create the resource in; when omitted, no namespace is set in the generated manifest. |
kubectl_delete
Delete one Kubernetes resource with kubectl delete.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the resource to delete. |
resource_type * | string | Kubernetes resource type to delete, such as pod, deployment, or service. |
namespace | string | Namespace of the resource to delete; when omitted, the current-context default namespace is used. |
kubectl_scale
Scale a workload with kubectl scale.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the workload to scale. |
replicas * | number | Number of replicas to scale the workload to. |
resource_type * | string | Kubernetes resource type to scale, such as deployment or replicaset. |
namespace | string | Namespace of the workload to scale; when omitted, the current-context default namespace is used. |
kubectl_patch
Patch one Kubernetes resource with kubectl patch.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the resource to patch. |
patch * | string | Patch content to apply to the resource, passed to kubectl patch with -p. |
resource_type * | string | Kubernetes resource type to patch, such as deployment or service. |
namespace | string | Namespace of the resource to patch; when omitted, the current-context default namespace is used. |
kubectl_rollout
Run a kubectl rollout action (status, history, restart, undo, pause, resume).
| Parameter | Type | Description |
|---|---|---|
action * | string | Rollout action to run: status, history, restart, undo, pause, or resume. |
name * | string | Name of the resource to run the rollout action on. |
resource_type * | string | Kubernetes resource type for the rollout, such as deployment. |
namespace | string | Namespace of the resource; when omitted, the current-context default namespace is used. |
kubectl_context
Read or switch the kubectl context (current, list, use).
| Parameter | Type | Description |
|---|---|---|
operation * | string | Context operation to perform: current, list, or use. |
name | string | Name of the context to switch to; required when the operation is use. |
explain_resource
Explain a Kubernetes resource schema with kubectl explain.
| Parameter | Type | Description |
|---|---|---|
resource * | string | Kubernetes resource or field path to explain, such as pod or pod.spec.containers. |
api_version | string | API version to explain the resource against, passed as --api-version; when omitted, the default version is used. |
list_api_resources
List the API resources the cluster serves, optionally filtered by kind.
| Parameter | Type | Description |
|---|---|---|
kind | string | Kind to filter the API resource list by, matched case-insensitively; when omitted, all resources are listed. |